aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Fix broken html doctype highlighting (#4829)Chickenkeeper2022-11-20
|
* Add `:reload-all` command (#4663)Filipe Azevedo2022-11-20
|
* build(nix): update nci (#4823)Matthew Toohey2022-11-20
|
* Make `r<tab>` and `f<tab>` work (#4817)Lennard Hofmann2022-11-19
| | | | | Previously, commands such as `r<tab>` (replace with tab) or `t<tab>` (select till tab) had no effect. This is because `KeyCode::Tab` needs special treatment (like `KeyCode::Enter`).
* minor: render_diagnostics doesn't require &self eitherBlaž Hrastnik2022-11-19
|
* Avoid repeatedly loading configBlaž Hrastnik2022-11-19
|
* Handle language server termination (#4797)Michael Davis2022-11-19
| | | | | | | | | | | | | This change handles a language server exiting. This was a UX sore-spot: if a language server crashed, Helix did not recognize the exit and continued to send requests to it. All requests would timeout since they would not receive responses. This would also hold-up Helix closing itself down since it would try to gracefully shutdown the server which is implemented in the LSP spec as a request. We could attempt to automatically restart the language server on crash. I left this for future work since that change will need to be slightly complicated: it will need to cover the case of a language server repeatedly crashing.
* Update tree-sitter-cmake (#4809)ath32022-11-18
|
* lsp: Resolve completion item asynchronously on idle-timeout (#4781)Michael Davis2022-11-18
| | | | | | | | | | | | | | | | | | | | | d7d0d5ffb79b6f2e09c6ab8af6e112c41e6f73e8 resolves completion items on the idle-timeout event. The `Completion::resolve_completion_item` function blocks on the LSP request though, which blocks the compositor and in turn blocks the event loop. So until the language server returns the resolved completion item, Helix is unable to respond to keypresses or other LSP messages. This is typically ok since the resolution request is fast but for some language servers this can be problematic, and ideally we shouldn't be blocking like this anyways. When receiving a `completionItem/resolve` request, the Volar server sends a `workspace/configuration` request to Helix and blocks itself on the response, leading to a deadlock. Eventually the resolve request times out within Helix but Helix is locked up and unresponsive in that window. This change resolves the completion item without blocking the compositor.
* Match `.hs-boot` files to Haskell (#4800)Ollie Charles2022-11-18
| | | Haskell source files are now either `.hs` (as before) or `.hs-boot`, which is a type of Haskell file that only contains type declarations (https://downloads.haskell.org/ghc/latest/docs/users_guide/separate_compilation.html#how-to-compile-mutually-recursive-modules)
* Theme: Mellow (#4770)Rohit K Viswanath2022-11-18
|
* When buffer closes, focus on parent buffer (#4766)wes adams2022-11-18
|
* Select surrounding characters when using match/surround (m) mode (#4752)Austen Adler2022-11-18
| | | Co-authored-by: Austen Adler <agadler@austenadler.com>
* Add support for color modes with Monokai Pro (#4789)Felipe S. S. Schneider2022-11-18
|
* Update lang-support docBlaž Hrastnik2022-11-18
|
* Make nil the preferred language server over rnix-lspBlaž Hrastnik2022-11-18
|
* Remove prefix filtering from autocomplete menu (#4578)ChrHorn2022-11-17
| | | | | | | | | PR #4134 switched the autocomplete menu from alphabetical to fuzzy sorting. This commit removes the still existing filtering by prefix and should enable full fuzzy sorting of the autocomplete menu. closes #3084, #1807 Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* update `x_offset` calculation in Buffer::set_string_truncated (#3839)kristopherbullinger2022-11-17
| | | | when `truncate_start` is `true`, the `x_offset` is now properly updated according to the width of the content or the truncated length.
* Use TreeCursor to pretty-print :tree-sitter-subtree (#4606)Michael Davis2022-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current `:tree-sitter-subtree` has a bug for field-names when the field name belongs to an unnamed child node. Take this ruby example: def self.method_name true end The subtree given by tree-sitter-cli is: (singleton_method [2, 0] - [4, 3] object: (self [2, 4] - [2, 8]) name: (identifier [2, 9] - [2, 20]) body: (body_statement [3, 2] - [3, 6] (true [3, 2] - [3, 6]))) But the `:tree-sitter-subtree` output was (singleton_method object: (self) body: (identifier) (body_statement (true))) The `singleton_method` rule defines the `name` and `body` fields in an unnamed helper rule `_method_rest` and the old implementation of `pretty_print_tree_impl` would pass the `field_name` down from the named `singleton_method` node. To fix it we switch to the [TreeCursor] API which is recommended by the tree-sitter docs for traversing the tree. `TreeCursor::field_name` accurately determines the field name for the current cursor position even when the node is unnamed. [TreeCursor]: https://docs.rs/tree-sitter/0.20.9/tree_sitter/struct.TreeCursor.html
* Capture word parts while calculating shellwords (#4632)Michael Davis2022-11-17
| | | | | | | | | | | | | | | | | | | This fixes an edge case for completing shellwords. With a file "a b.txt" in the current directory, the sequence `:open a\<tab>` will result in the prompt containing `:open aa\ b.txt`. This is because the length of the input which is trimmed when replacing with completion is calculated on the part of the input which is parsed by shellwords and then escaped (in a separate operation), which is lossy. In this case it loses the trailing backslash. The fix provided here refactors shellwords to track both the _words_ (shellwords with quotes and escapes resolved) and the _parts_ (chunks of the input which turned into each word, with separating whitespace removed). When calculating how much of the input to delete when replacing with the completion item, we now use the length of the last part. This also allows us to eliminate the duplicate work done in the `ends_with_whitespace` check.
* Factor out common code for focusing the next view (#4607)Michael Davis2022-11-17
| | | | | There is some common code between Editor::focus_next and Editor::focus that can be eliminated by refactoring Tree::focus_next into a function that only returns the next ViewId.
* Use key-sequence format for command palette keybinds (#4712)Michael Davis2022-11-17
| | | | | The text within the command palette used a custom format to display the keybinding for a command. This change switches to the key sequence format that we use for pending keys and macros.
* sort fuzzy matches with equal score by length in picker (#4698)Pascal Kuthe2022-11-16
|
* minor: Simplify some command codeBlaž Hrastnik2022-11-16
|
* minor: cloning filter and using count() is wasteful hereBlaž Hrastnik2022-11-16
|
* Improvements to Meson syntax. (#4572)Garrett D'Amore2022-11-16
| | | | Co-authored-by: Garrett D'Amore <garrett.damore@weka.io> Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
* build(deps): bump chrono from 0.4.22 to 0.4.23 (#4747)dependabot[bot]2022-11-15
| | | | | | | | | | | | | | | | | | Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.22 to 0.4.23. - [Release notes](https://github.com/chronotope/chrono/releases) - [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md) - [Commits](https://github.com/chronotope/chrono/compare/v0.4.22...v0.4.23) --- updated-dependencies: - dependency-name: chrono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix deprecation warnings for chrono 0.4.23 (#4738)dxtr852022-11-15
| | | Co-authored-by: dxtr <dxtr@W540.mito>
* fix buildBlaž Hrastnik2022-11-15
|
* Add command to add word boundaries to search (#4322)Armin Ronacher2022-11-15
| | | | | * Add command to add word boundaries to search * Calculate string capacity before building
* Popup scrollbar (#4449)Manos Mertzianis2022-11-15
| | | | | | | | | | | | | | | * init * cargo fmt * optimisation of the scrollbar render both for Menu and Popup. Toggling off scrollbar for Popup<Menu>, since Menu has its own * rendering scroll track * removed unnecessary cast * improve memory allocation * small correction
* Refactor blackhole register (#4504)ath32022-11-15
|
* Use tree-sitter-bicep fork with sources checked in (#4751)Michael Davis2022-11-15
|
* Remove Statement in Zig indentation query (#4745)Sora2022-11-15
|
* Add global error/warning count statusline element (#4569)Gaurav Tyagi2022-11-15
|
* Add support for Bicep files (#4403)Jonathan2022-11-15
|
* build(deps): bump cc from 1.0.74 to 1.0.76 (#4748)dependabot[bot]2022-11-15
| | | | | | | | | | | | | | | | | Bumps [cc](https://github.com/rust-lang/cc-rs) from 1.0.74 to 1.0.76. - [Release notes](https://github.com/rust-lang/cc-rs/releases) - [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.74...1.0.76) --- updated-dependencies: - dependency-name: cc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump similar from 2.2.0 to 2.2.1 (#4746)dependabot[bot]2022-11-15
| | | | | | | | | | | | | | | | | | Bumps [similar](https://github.com/mitsuhiko/similar) from 2.2.0 to 2.2.1. - [Release notes](https://github.com/mitsuhiko/similar/releases) - [Changelog](https://github.com/mitsuhiko/similar/blob/main/CHANGELOG.md) - [Commits](https://github.com/mitsuhiko/similar/compare/2.2.0...2.2.1) --- updated-dependencies: - dependency-name: similar dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix range offsets for multiple shell insertions (#4619)Michael Davis2022-11-14
| | | | | | | | | | | | | d6323b7cbc21a9d3ba29738c76581dad93f9f415 introduced a regression for shell commands like `|`, `!`, and `<A-!>` which caused the new selections to be incorrect. This caused a panic when piping (`|`) would cause the new range to extend past the document end. The paste version of this bug was fixed in 48a3965ab43718ce2a49724cbcc294b04c328b81. This change also inherits the direction of the new range from the old range and adds integration tests to ensure that the behavior isn't broken in the future.
* Statusline indicator to show number of selected chars (#4682)wes adams2022-11-12
| | | Co-authored-by: wes adams <wadams@grayshift.com>
* rename description for `goto_line_end_newline`asvln2022-11-12
|
* add `extend_prev_word_end` commandasvln2022-11-12
|
* fix: Outdated Rust queries after TS updateAlexis (Poliorcetics) Bourget2022-11-12
| | | | Ref: https://github.com/tree-sitter/tree-sitter-rust/commit/3ddebf46e6fe5e27fa03dc07a829a766b9979c8d
* deps: Update tree-sitter-rust (supports let-else && let-chains)Alexis (Poliorcetics) Bourget2022-11-12
|
* feat(commands): increment by range (#4418)Bruce Hopkins2022-11-11
|
* Add port of VIM's Zenburn, a low-contrast color scheme for Vim (#4613)Anton Romanov2022-11-11
|
* update scala roots (#4701)Chris Kipp2022-11-11
| | | | | | | This adds in a couple more roots that are common in Scala. - `build.sc` which is used in Mill - `build.gradle` for Scala Gradle projects - `.scala-build` for scala-cli projects
* Update typescript grammar and queries (#4703)Gabriel Dinner-David2022-11-11
| | | | | | | | | * fix(grammars): update treesitter grammar and queries * add override keyword * Update runtime/queries/typescript/highlights.scm Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* improve performance of tree sitter query captures (for text object motions ↵Pascal Kuthe2022-11-11
| | | | | | | | | | | | | | | | in particular) (#4707) * add tree sitter match limit to avoid slowdowns for larger files Affects all tree sitter queries and should speedup both syntax highlighting and text object queries. This has been shown to fix significant slowdowns with textobjects for rust files as small as 3k loc. * Apply suggestions from code review Co-authored-by: Blaž Hrastnik <blaz@mxxn.io> Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Enable elixir-ls for heex language (#4679)Philip Giuliani2022-11-10
|