aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
Commit message (Collapse)AuthorAge
* Fix issue with ltex-ls, filtering params is not what we want herePhilipp Mildenberger2023-05-18
|
* Fix hardcoded offset_encodingPhilipp Mildenberger2023-05-18
|
* Fix some lints/docgen hintsPhilipp Mildenberger2023-05-18
|
* Fix 'WorkspaceConfiguration' request with empty configuration section stringsPhilipp Mildenberger2023-05-18
|
* Adds support for multiple language servers per language.Philipp Mildenberger2023-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Language Servers are now configured in a separate table in `languages.toml`: ```toml [langauge-server.mylang-lsp] command = "mylang-lsp" args = ["--stdio"] config = { provideFormatter = true } [language-server.efm-lsp-prettier] command = "efm-langserver" [language-server.efm-lsp-prettier.config] documentFormatting = true languages = { typescript = [ { formatCommand ="prettier --stdin-filepath ${INPUT}", formatStdin = true } ] } ``` The language server for a language is configured like this (`typescript-language-server` is configured by default): ```toml [[language]] name = "typescript" language-servers = [ { name = "efm-lsp-prettier", only-features = [ "format" ] }, "typescript-language-server" ] ``` or equivalent: ```toml [[language]] name = "typescript" language-servers = [ { name = "typescript-language-server", except-features = [ "format" ] }, "efm-lsp-prettier" ] ``` Each requested LSP feature is priorized in the order of the `language-servers` array. For example the first `goto-definition` supported language server (in this case `typescript-language-server`) will be taken for the relevant LSP request (command `goto_definition`). If no `except-features` or `only-features` is given all features for the language server are enabled, as long as the language server supports these. If it doesn't the next language server which supports the feature is tried. The list of supported features are: - `format` - `goto-definition` - `goto-declaration` - `goto-type-definition` - `goto-reference` - `goto-implementation` - `signature-help` - `hover` - `document-highlight` - `completion` - `code-action` - `workspace-command` - `document-symbols` - `workspace-symbols` - `diagnostics` - `rename-symbol` - `inlay-hints` Another side-effect/difference that comes with this PR, is that only one language server instance is started if different languages use the same language server.
* Fix completion on paths containing spaces (#6779)Ivan Gulakov2023-05-18
| | | | | | | | | | | There was an issue with autocompletion of a path with a space in it. Before: :o test\ dir -> <TAB> -> test\ dirfile1 After: :o test\ dir -> <TAB> -> test\ dir\file1
* automatically disable TS when parsing takes longer than 500msPascal Kuthe2023-05-18
|
* async picker syntax highlightingPascal Kuthe2023-05-18
|
* don't move cursor while forward deleting in append modePascal Kuthe2023-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when forward deleting (`delete_char_forward` bound to `del`, `delete_word_forward`, `kill_to_line_end`) the cursor is moved to the left in append mode (or generally when the cursor is at the end of the selection). For example in a document `|abc|def` (|indicates selection) if enter append mode the cursor is moved to `c` and the selection becomes: `|abcd|ef`. When deleting forward (`del`) `d` is deleted. The expectation would be that the selection doesn't shrink so that `del` again deletes `e` and then `f`. This would look as follows: `|abcd|ef` `|abce|f` `|abcf|` `|abc |` This is inline with how other editors like kakoune work. However, helix currently moves the selection backwards leading to the following behavior: `|abcd|ef` `|abc|ef` `|ab|ef` `ef` This means that `delete_char_forward` essentially acts like `delete_char_backward` after deleting the first character in append mode. To fix the problem the cursor must be moved to the right while deleting forward (first fix in this commit). Furthermore, when the EOF char is reached a newline char must be inserted (just like when entering appendmode) to prevent the cursor from moving to the right
* cleanup delete_by_selection_insert_mode functionPascal Kuthe2023-05-18
|
* fix panic when deleting overlapping rangesPascal Kuthe2023-05-18
| | | | | | | | | | | | | Some deletion operations (especially those that use indentation) can generate overlapping deletion ranges when using multiple cursors. To fix that problem a new `Transaction::delete` and `Transaction:delete_by_selection` function were added. These functions merge overlapping deletion ranges instead of generating an invalid transaction. This merging of changes is only possible for deletions and not for other changes and therefore require its own function. The function has been used in all commands that currently delete text by using `Transaction::change_by_selection`.
* clarify comments about completion savepointsPascal Kuthe2023-05-18
| | | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* only resolve completion items oncePascal Kuthe2023-05-18
|
* ensure correct trigger/start completion offsetPascal Kuthe2023-05-18
| | | | | | | When re requesting a completion that already has a selected item we reuse that selections savepoint. However, the selection has likely changed since that savepoint which requires us to use the selection from that savepoint
* resolve completions before applying transactionsPascal Kuthe2023-05-18
|
* correctly handle completion rerequestPascal Kuthe2023-05-18
|
* Replace DAP vars popup, instead of adding new (#7034)A-Walrus2023-05-13
|
* Fix warnings from clippy (#7013)ZJPzjp2023-05-11
| | | | | * Fix warnings from clippy * revert MAIN_SEPARATOR_STR
* Add wbc and wbc! commands (#6947)Kitsu2023-05-09
|
* Conserve BOM and properly support UTF16 (#6497)Alexis-Lapierre2023-04-30
|
* Sort the buffer picker by most recent access (#2980)Evgeniy Tatarkin2023-04-28
|
* inject language based on file extension & shebang (#3970)Timothy DeHerrera2023-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * inject language based on file extension Nodes can now be captured with "injection.filename". If this capture contains a valid file extension known to Helix, then the content will be highlighted as that language. * inject language by shebang Nodes can now be captured with "injection.shebang". If this capture contains a valid shebang line known to Helix, then the content will be highlighted as the language the shebang calls for. * add documentation for language injection * nix: fix highlights The `@` is now highlighted properly on either side of the function arg. Also, extending the phases with `buildPhase = prev.buildPhase + ''''` is now highlighted properly. Fix highlighting of `''$` style escapes (requires tree-sitter-nix bump) Fix `inherit` highlighting. * simplify injection_for_match Split out injection pair logic into its own method to make the overall flow easier to follow. Also transform the top-level function into a method on a HighlightConfiguration. * markdown: add shebang injection query
* feat(commands): add clear-register typable command (#5695)jorge2023-04-27
| | | Co-authored-by: Jorge <chorcheus@tutanota.com>
* feat: add a config option to exclude declaration from LSP references (#6886)Vitalii Solodilov2023-04-27
| | | | | | | | | * feat: added the config option to exclude declaration from reference query Fixes: #5344 * fix: review * fix: review
* fix panic in inlay hint computation when view anchor is out of bounds (#6883)Pascal Kuthe2023-04-27
|
* Add extend_to_first_nonwhitespace (#6837)Dimitri Sabadie2023-04-25
| | | Closes #6836
* make `:u` alias `:update` (#6835)Atticus Sebastiani2023-04-23
| | | | | | | * Gave the command update the alias u * Re added trailing newline * generated docs
* tui: Allow toggling mouse capture at runtime (#6675)Michael Davis2023-04-21
| | | | | This picks up changes to the `editor.mouse` option at runtime - either through `:set-option` or `:config-reload`. When the value changes, we tell the terminal to enable or disable mouse capture sequences.
* flip symbol range in LSP goto commands (#6794)Pascal Kuthe2023-04-21
|
* Fix crash on opening from suspend state (#6764)shem2023-04-16
| | | | | | | | | | | * Fix crash on opening from suspend state (#6725) * Fix code style * revert using of the imperative code style. Add panic if couldn't set terminal raw mode * remove redundant import of core::panic macros * small refactoring
* make :toggle-option print the new value (#6774)Aleksey Kuznetsov2023-04-16
| | | | Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* Fix #6669: Theme preview doesn't return theme to normal (#6694)shem2023-04-12
| | | | | * Fix #6669: Theme preview doesn't return theme to normal when delete name with Alt-Backspace * Fix #6669: Return theme preview to normal theme for all remaining keybinds that change the promt text
* Fix crash on opening jumplist (#6672)EsfoNL2023-04-11
| | | Co-authored-by: Esra Fokker <esra.fokker@finalist.nl>
* 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
|
* 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.