aboutsummaryrefslogtreecommitdiff
path: root/helix-term
Commit message (Collapse)AuthorAge
* Fix crash on opening jumplist (#6672)EsfoNL2023-04-11
| | | Co-authored-by: Esra Fokker <esra.fokker@finalist.nl>
* build(deps): bump libc from 0.2.140 to 0.2.141 (#6700)dependabot[bot]2023-04-11
| | | | | | | | | | | | | | | Bumps [libc](https://github.com/rust-lang/libc) from 0.2.140 to 0.2.141. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.140...0.2.141) --- updated-dependencies: - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* LSP: Gracefully handle 'workspace/configuration' from a stopped server (#6693)Konstantin Keller2023-04-10
|
* Fix typos (#6643)Daniel Sedlak2023-04-07
|
* Fix line number display for LSP goto pickers (#6559)Dmitry Ulyanov2023-04-03
| | | | Line numbers are 0-indexed in the LSP spec but 1-indexed for display and jumping purposes in Helix.
* Let..else refactor (#6562)Casper Rogild Storm2023-04-03
|
* robustly handle invalid LSP ranges (#6512)Pascal Kuthe2023-04-03
|
* add option to enable/disable lsp snippetsPascal Kuthe2023-03-31
|
* Hide signature help if it overlays completion menu (#5523)Pascal Kuthe2023-03-31
|
* Correctly reload theme on :config-reloadPascal Kuthe2023-03-31
| | | | | | The current implementation didn't reload the theme if no no theme was explicitly configured (so the default theme was used). This commit brings `refresh_theme` in line with the initialization code.
* Truncate paths in the file picker (#6410)mWalrus2023-03-31
|
* Canonicalize paths before stripping current dir as prefix (#6290)jazzfool2023-03-30
| | | Co-authored-by: jazzfool <shamoslover69@gmail.com>
* implement proper lsp-workspace supportPascal Kuthe2023-03-29
| | | | | | fix typo Co-authored-by: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com>
* add workspace config and manual LSP root managementPascal Kuthe2023-03-29
| | | | | | | | | | fixup documentation Co-authored-by: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com> fixup typo Co-authored-by: LeoniePhiline <22329650+LeoniePhiline@users.noreply.github.com>
* feat(debug): highlight current line (#5957)Filip Dutescu2023-03-29
| | | | | | | | | | | | | | | | | | Add new theme highlight keys, for setting the colour of the breakpoint character and the current line at which execution has been paused at. The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`. Highlight according to those keys, both the line at which debugging is paused at and the breakpoint indicator. Add an indicator for the current line at which execution is paused at, themed by the `ui.debug.active` theme scope. Update various themes to showcase how the new functionality works. Better icons are dependent on #2869, and as such will be handled in the future, once it lands. Closes: #5952 Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
* Fix clippy lints (#6454)Philipp Mildenberger2023-03-27
|
* do not ignore mouse scrolling when on top of virtual textPascal Kuthe2023-03-27
|
* make scrolloff calculation consistentPascal Kuthe2023-03-27
| | | | | | While scrolling (with the `scroll`) command scrolloff was calculated slightly differently than in `ensure_cursor_in_view` which could cause the cursor to get stuck while scrolling
* allow scrolling past virtual text linePascal Kuthe2023-03-27
| | | | | | | | | | | | | Virtual text lines (either caused by softwrapped inlay hints that take multiple or line annotations) currently block scrolling downwards. if the visual offset passed to char_idx_at_visual_offset or visual_offset_from_block is within a virtual text line then the char position before the virtual text and a visual offset are returned. We previously ignored that visual offset and as a result the cursor would be stuck at the start of the virtual text. This commit fixes that by simply moving the cursor to the next char (so past the virtual text) if this visual offset is non-zero
* remove incorrect assertPascal Kuthe2023-03-27
| | | | | This assert was added during early development of #5420 and makes no sense with the current code. We simply forgot to remove it.
* Show diagnostic codes for LSP diagnostics (#6378)Francesc Elies2023-03-21
| | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Run shell commands asynchronously (#6373)sarah2023-03-21
|
* migrate test_with_config to use AppBuilderSkyler Hawthorne2023-03-20
|
* fix test::plainSkyler Hawthorne2023-03-20
| | | | test::plain uses char indices when it should use byte indices
* Allow explicit newlines in test DSLSkyler Hawthorne2023-03-20
| | | | | | | | | | | | | The current test DSL currently has no way to express being at the end of a line, save for putting an explicit LF or CRLF inside the `#[|]#`. The problem with this approach is that it can add unintended extra new lines if used in conjunction with raw strings, which insert newlines for you. This is a simple attempt to mitigate this problem. If there is an explicit newline character at the end of the selection, and then it is immediately followed by the same newline character at the right end of the selection, this following newline is removed. This way, one can express a cursor at the end of a line explicitly.
* refactor test editor configSkyler Hawthorne2023-03-20
|
* print doc state during testsSkyler Hawthorne2023-03-20
|
* make TestCase::From more genericSkyler Hawthorne2023-03-20
|
* factor write command tests to own moduleSkyler Hawthorne2023-03-20
|
* Fix highlighting in picker with multiple columns (#6333)exp802023-03-18
|
* discard outdated workspace edits recived from the LSPascal Kuthe2023-03-16
|
* discard outdated diagnostics recived by the LSPascal Kuthe2023-03-16
|
* Prevent whitespace from rendering inside inlay hints (#6312)Thomas Schollenberger2023-03-16
| | | | | | | | | | | * fix spaces and nbsps showing in inlay hints * remove origin * virtual tab + fix unneeded clone * update virtual tab determining location * fix clippy lint
* fix compilationBlaž Hrastnik2023-03-14
|
* Only complete appropriate arguments for typed commands. (#5966)Kyle Smith2023-03-14
|
* Add undercurl config option #6196 (#6253)Jonatan Pettersson2023-03-14
| | | If set to 'true' this option will force terminal undercurl support.
* build(deps): bump indoc from 2.0.0 to 2.0.1 (#6302)dependabot[bot]2023-03-14
| | | | | | | | | | | | | | | Bumps [indoc](https://github.com/dtolnay/indoc) from 2.0.0 to 2.0.1. - [Release notes](https://github.com/dtolnay/indoc/releases) - [Commits](https://github.com/dtolnay/indoc/compare/2.0.0...2.0.1) --- updated-dependencies: - dependency-name: indoc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump libc from 0.2.139 to 0.2.140 (#6304)dependabot[bot]2023-03-14
| | | | | | | | | | | | | | | Bumps [libc](https://github.com/rust-lang/libc) from 0.2.139 to 0.2.140. - [Release notes](https://github.com/rust-lang/libc/releases) - [Commits](https://github.com/rust-lang/libc/compare/0.2.139...0.2.140) --- updated-dependencies: - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* LSP: Separate diagnostic picker message and code (#6095)Francesc Elies2023-03-13
|
* Check language server symbol renaming support before prompting (#6257)misiasty32023-03-13
| | | Co-authored-by: Poliorcetics <poliorcetics@users.noreply.github.com>
* helix-term: send the STOP signal to all processes in the process group (#3546)Cole Helbling2023-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * helix-term: send the STOP signal to all processes in the process group From kill(3p): If pid is 0, sig shall be sent to all processes (excluding an unspecified set of system processes) whose process group ID is equal to the process group ID of the sender, and for which the process has permission to send a signal. This fixes the issue of running `git commit`, attempting to suspend helix with ^Z, and then not regaining control over the terminal and having to press ^Z again. * helix-term: use libc directly to send STOP signal * helix-term: document safety of libc::kill * helix-term: properly handle libc::kill's failure I misread the manpage for POSIX `kill` -- it returns `-1` in the failure case, and sets `errno`, which is retrieved via `std::io::Error::last_os_error()`, has its string representation printed out, and then exits with the matching status code (or 1 if, for whatever reason, there is no matching status code). * helix-term: expand upon why we need to SIGSTOP the entire process group Also add a link back to one of the upstream issues.
* LSP: No-op client/registerCapability requests (#6258)Michael Davis2023-03-13
|
* indent snippets to line indent instead of completion start (#6263)Pascal Kuthe2023-03-11
|
* Feat: LSP Type Hints (#5934)Poliorcetics2023-03-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * misc: missing inline, outdated link * doc: Add new theme keys and config option to book * fix: don't panic in Tree::try_get(view_id) Necessary for later, where we could be receiving an LSP response for a closed window, in which case we don't want to crash while checking for its existence * fix: reset idle timer on all mouse events * refacto: Introduce Overlay::new and InlineAnnotation::new * refacto: extract make_job_callback from Context::callback * feat: add LSP display_inlay_hint option to config * feat: communicate inlay hints support capabilities of helix to LSP server * feat: Add function to request range of inlay hint from LSP * feat: Save inlay hints in document, per view * feat: Update inlay hints on document changes * feat: Compute inlay hints on idle timeout * nit: Add todo's about inlay hints for later * fix: compute text annotations for current view in view.rs, not document.rs * doc: Improve Document::text_annotations() description * nit: getters don't use 'get_' in front * fix: Drop inlay hints annotations on config refresh if necessary * fix: padding theming for LSP inlay hints * fix: tracking of outdated inlay hints should not be dependant on document revision (because of undos and such) * fix: follow LSP spec and don't highlight padding as virtual text * config: add some LSP inlay hint configs
* Add a version-control statusline element (#5682)Dimitar Gyurov2023-03-10
|
* treat replace/insertmode consistently, default to insertPascal Kuthe2023-03-10
|
* fix snippet bugs and multicursor completion edgecasesPascal Kuthe2023-03-10
| | | | | | | | | | | | | | | | Multicursor completions may overlap and therefore overlapping completions must be dropped to avoid crashes. Furthermore, multicursor edits might simply be out of range if the word before/after the cursor is shorter. This currently leads to crashes, instead these selections are now also removed for completions. This commit also significantly refactors snippet transaction generation so that tabstops behave correctly with the above rules. Furthermore, snippet tabstops need to be carefully mapped to ensure their position is correct and consistent with our selection semantics. Finally, we now keep a partially updated Rope while creating snippet transactions so that we can fill information into snippets that depends on the position in the document.
* allow LSP insert text to replace non-matching prefixes (#5469)Taylor C. Richberger2023-03-10
| | | | | | | Most LSPs will complete case-insensitive matches, particularly from lowercase to uppercase. In some cases, notably Pyright, this is given as a simple insert text instead of TextEdit. When this happens, the prefix text was left unedited.
* Generalised to multiple runtime directories with priorities (#5411)paul-scott2023-03-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Generalised to multiple runtime directories with priorities This is an implementation for #3346. Previously, one of the following runtime directories were used: 1. `$HELIX_RUNTIME` 2. sibling directory to `$CARGO_MANIFEST_DIR` 3. subdirectory of user config directory 4. subdirectory of path to helix executable The first directory provided / found to exist in this order was used as a root for all runtime file searches (grammars, themes, queries). This change lowers the priority of `$HELIX_RUNTIME` so that the user config runtime has higher priority. More significantly, all of these directories are now searched for runtime files, enabling a user to override default or system-level runtime files. If the same file name appears in multiple runtime directories, the following priority is now used: 1. sibling directory to `$CARGO_MANIFEST_DIR` 2. subdirectory of user config directory 3. `$HELIX_RUNTIME` 4. subdirectory of path to helix executable One exception to this rule is that a user can have a `themes` directory directly in the user config directory that has higher piority to `themes` directories in runtime directories. That behaviour has been preserved. As part of implementing this feature `theme::Loader` was simplified and the cycle detection logic of the theme inheritance was improved to cover more cases and to be more explicit. * Removed AsRef usage to avoid binary growth * Health displaying ;-separated runtime dirs * Changed HELIX_RUNTIME build from src instructions * Updated doc for more detail on runtime directories * Improved health symlink printing and theme cycle errors The health display of runtime symlinks now prints both ends of the link. Separate errors are given when theme file is not found and when the only theme file found would form an inheritence cycle. * Satisfied clippy on passing Path * Clarified highest priority runtime directory purpose * Further clarified multiple runtime details in book Also gave markdown headings to subsections. Fixed a error with table indentation not building table that also appears present on master. --------- Co-authored-by: Paul Scott <paul.scott@anu.edu.au> Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Fix `shrink_selection` with multiple cursors. (#6093)gibbz002023-03-09
| | | | | | | | | | | * Fix #6092 Cause were some incorrect assumptions that missed an edge case in the `Selection.contains()` calculation. Tests were added accordingly. * Fix Selection.contains() edge-case handling. Removing the len check short-circuit was the only thing needed as pointed out by @dead10ck.