Compare commits

..

4 Commits

Author SHA1 Message Date
Michael Davis
5ea92d1713 Use syntax symbol pickers for Erlang
Neither language server robustly supports workspace symbol search.
`erlang-ls`'s symbol picker takes a long time to open successfully on
boot. `elp`'s is faster but not faster than the tags query.
2025-07-14 19:52:38 -04:00
Michael Davis
ece331855e Document tags.scm queries, commands and language support 2025-07-14 19:52:38 -04:00
Michael Davis
4d49513c9e Add syntax symbol pickers based on tags.scm queries 2025-07-14 19:52:38 -04:00
Michael Davis
b24024f93f Add initial tags.scm queries
Co-authored-by: cgahr <26804763+cgahr@users.noreply.github.com>
Co-authored-by: eh <correia.eh@gmail.com>
2025-07-14 19:52:38 -04:00
43 changed files with 1116 additions and 720 deletions

View File

@@ -20,302 +20,6 @@ Updated languages and queries:
Packaging:
-->
# 25.07 (2025-07-15)
As always, a big thank you to all of the contributors! This release saw changes from 195 contributors.
Breaking changes:
* The parsing of the command line has been rewritten and now supports flags and expansions ([#12527](https://github.com/helix-editor/helix/pull/12527), [#13018](https://github.com/helix-editor/helix/pull/13018), [9574e55](https://github.com/helix-editor/helix/commit/9574e55), [2d4c2a1](https://github.com/helix-editor/helix/commit/2d4c2a1), [#13192](https://github.com/helix-editor/helix/pull/13192), [67f1fe2](https://github.com/helix-editor/helix/commit/67f1fe2), [#13466](https://github.com/helix-editor/helix/pull/13466), [#13467](https://github.com/helix-editor/helix/pull/13467), [#13840](https://github.com/helix-editor/helix/pull/13840))
* Quoting and spaces are now handled differently. This can break existing keymaps which use typable commands, in particular `:sh`, `:set-option` or `:toggle-option`.
* The `:rsort` command has been removed. Use the reverse flag instead: `:sort --reverse`
Features:
* Add a picker which explores directories ([#11285](https://github.com/helix-editor/helix/pull/11285), [d4aed40](https://github.com/helix-editor/helix/commit/d4aed40))
* Allow cycling through multiple LSP Hover responses with `A-n`/`A-p` ([#10122](https://github.com/helix-editor/helix/pull/10122), [2367b20](https://github.com/helix-editor/helix/commit/2367b20))
* Add support for incomplete LSP completions ([5c1f3f8](https://github.com/helix-editor/helix/commit/5c1f3f8))
* Add support for EditorConfig ([#13056](https://github.com/helix-editor/helix/pull/13056), [#13443](https://github.com/helix-editor/helix/pull/13443))
* Add support for LSP document colors ([#12308](https://github.com/helix-editor/helix/pull/12308), [d43de14](https://github.com/helix-editor/helix/commit/d43de14), [47cdd23](https://github.com/helix-editor/helix/commit/47cdd23), [ba54b6a](https://github.com/helix-editor/helix/commit/ba54b6a), [#13188](https://github.com/helix-editor/helix/pull/13188))
* Support expansions in external formatter arguments ([#13429](https://github.com/helix-editor/helix/pull/13429))
* Switch out the highlighter for the `tree-house` crate ([#12972](https://github.com/helix-editor/helix/pull/12972), [09bc67a](https://github.com/helix-editor/helix/commit/09bc67a), [a7c3a43](https://github.com/helix-editor/helix/commit/a7c3a43), [3ceae88](https://github.com/helix-editor/helix/commit/3ceae88), [05ae617](https://github.com/helix-editor/helix/commit/05ae617), [5a1dcc2](https://github.com/helix-editor/helix/commit/5a1dcc2), [ebf96bd](https://github.com/helix-editor/helix/commit/ebf96bd), [#13644](https://github.com/helix-editor/helix/pull/13644), [b1f4717](https://github.com/helix-editor/helix/commit/b1f4717), [7410fe3](https://github.com/helix-editor/helix/commit/7410fe3), [633c5fb](https://github.com/helix-editor/helix/commit/633c5fb), [362e97e](https://github.com/helix-editor/helix/commit/362e97e), [#13828](https://github.com/helix-editor/helix/pull/13828), [6fd1efd](https://github.com/helix-editor/helix/commit/6fd1efd))
* This fixes a number of highlighter bugs.
* Locals like parameter highlights are now highlighted even when the definition is not in view.
* Markdown is now injected into rust doc comments (`///` and `//!`).
* Add support for the DAP `startDebugging` reverse request ([#13403](https://github.com/helix-editor/helix/pull/13403))
Commands:
* Add `copy_between_registers` for interactive copying between two registers ([066e938](https://github.com/helix-editor/helix/commit/066e938))
* Add `extend_to_file_{start,end}`, select-mode variants of `goto_file_{start,end}` ([#11767](https://github.com/helix-editor/helix/pull/11767))
* Add `:!` alias for `:sh` and `:|` for `:pipe` ([#13263](https://github.com/helix-editor/helix/pull/13263))
* Add `goto_column` and `extend_to_column` ([#13440](https://github.com/helix-editor/helix/pull/13440))
* Add an `--insensitive`/`-i` flag to the `:sort` command ([#13560](https://github.com/helix-editor/helix/pull/13560))
* Add `rotate_selections_first` and `rotate_selections_last` ([#13615](https://github.com/helix-editor/helix/pull/13615))
* Add a `--no-format` flag for all `:write` commands ([2f56091](https://github.com/helix-editor/helix/commit/2f56091))
* Add a `--skip-visible` flag for `:buffer-close-others` and `:buffer-close-others!` ([#5393](https://github.com/helix-editor/helix/pull/5393))
Usability improvements:
* Replace current file using `A-ret` in pickers rather than loading it in the background ([#12605](https://github.com/helix-editor/helix/pull/12605))
* Set multiple selections when passing a file with multiple locations to `hx` ([#12192](https://github.com/helix-editor/helix/pull/12192))
* Add path completion for multiple cursors ([#12550](https://github.com/helix-editor/helix/pull/12550), [c9dc940](https://github.com/helix-editor/helix/commit/c9dc940))
* Truncate long prompt lines with "…" ([#12036](https://github.com/helix-editor/helix/pull/12036), [9d6ea77](https://github.com/helix-editor/helix/commit/9d6ea77), [0b9701e](https://github.com/helix-editor/helix/commit/0b9701e), [d3fb8fc](https://github.com/helix-editor/helix/commit/d3fb8fc))
* Allow specifying languages in `:lsp-stop` and `:lsp-restart` ([#12578](https://github.com/helix-editor/helix/pull/12578), [3d7e273](https://github.com/helix-editor/helix/commit/3d7e273))
* Add `m` (nearest matching pair) to infobox popups for `md` and `mr` ([#12650](https://github.com/helix-editor/helix/pull/12650))
* Add a hint message in the statusline when using `:sort` on a single selection ([#12585](https://github.com/helix-editor/helix/pull/12585))
* Avoid wrapping around in `goto_{next,prev}_diag` ([#12704](https://github.com/helix-editor/helix/pull/12704))
* Support responses from multiple language servers for LSP goto-definition (and declaration, type definition and implementation) and goto-references ([f7394d5](https://github.com/helix-editor/helix/commit/f7394d5), [1a821ac](https://github.com/helix-editor/helix/commit/1a821ac), [d285a8a](https://github.com/helix-editor/helix/commit/d285a8a))
* Show formatter errors in `:format` ([47f84d0](https://github.com/helix-editor/helix/commit/47f84d0))
* Show typable command docs in keybinding infobox popups when the command takes no arguments ([e9c16b7](https://github.com/helix-editor/helix/commit/e9c16b7))
* Add per-command titles to register selection infobox popups for `select_register`, `insert_register` and `copy_between_registers` ([e0da129](https://github.com/helix-editor/helix/commit/e0da129))
* Add container name column to the LSP symbol picker ([#12930](https://github.com/helix-editor/helix/pull/12930))
* Add a theme key for highlighting directories in completions and picker items ([#12855](https://github.com/helix-editor/helix/pull/12855), [7bebe0a](https://github.com/helix-editor/helix/commit/7bebe0a))
* Add `editor.trim-final-newlines` and `editor.trim-trailing-whitespace` config options ([aa20eb8](https://github.com/helix-editor/helix/commit/aa20eb8))
* Warn when the configured theme is unusable because true-color is not available ([#13058](https://github.com/helix-editor/helix/pull/13058))
* Allow configuring `[workspace-]diagnostic` statusline element severities ([#13288](https://github.com/helix-editor/helix/pull/13288), [b0528bb](https://github.com/helix-editor/helix/commit/b0528bb))
* Improve completion for shell commands ([#12883](https://github.com/helix-editor/helix/pull/12883), [532f241](https://github.com/helix-editor/helix/commit/532f241))
* Show the primary selection index in the `selections` statusline element when there are multiple selections ([#12326](https://github.com/helix-editor/helix/pull/12326))
* Use configured language server names when possible in `--health` output ([#13573](https://github.com/helix-editor/helix/pull/13573))
* Add a statusline element for indentation style ([#13632](https://github.com/helix-editor/helix/pull/13632))
* Set the working directory of language server commands to the workspace root ([#13691](https://github.com/helix-editor/helix/pull/13691))
* Avoid jumpiness in the picker preview for languages with non-default tab widths ([#13761](https://github.com/helix-editor/helix/pull/13761))
* Add a config option for limiting LSP inlay hint length ([#13742](https://github.com/helix-editor/helix/pull/13742))
* Improve heuristics used in the diff gutter ([#13722](https://github.com/helix-editor/helix/pull/13722))
* Allow moving a file with `:move` when its old path does not exist ([#13748](https://github.com/helix-editor/helix/pull/13748))
* Allow moving a file into a directory with `:move` ([#13922](https://github.com/helix-editor/helix/pull/13922))
* Show human-readable file sizes in the statusline message for file writes ([#13627](https://github.com/helix-editor/helix/pull/13627))
* Add diagnostic source to the diagnosics pickers ([#13758](https://github.com/helix-editor/helix/pull/13758))
* Show all active scopes under the cursor in `:tree-sitter-highlight-name` ([4a85171](https://github.com/helix-editor/helix/commit/4a85171))
* Auto-close the LSP code-actions popup ([#13832](https://github.com/helix-editor/helix/pull/13832))
* Add a configuration option for controlling atomic writes to disk ([#13656](https://github.com/helix-editor/helix/pull/13656))
Fixes:
* Fix panic from using `search_selection_detect_word_boundaries` (`*`) at the end of the file ([#12611](https://github.com/helix-editor/helix/pull/12611))
* Discard placeholder text for zero tabstop `${0:placeholder}` ([#12647](https://github.com/helix-editor/helix/pull/12647))
* Fix panic in `goto_file` (`gf`) on file names with non-ASCII characters ([#12673](https://github.com/helix-editor/helix/pull/12673))
* Only accept unmodified characters in `goto_word` (`gw`) ([f5f9f49](https://github.com/helix-editor/helix/commit/f5f9f49), [0364521](https://github.com/helix-editor/helix/commit/0364521))
* Skip recording keys pressed by macros while recording a macro ([#12733](https://github.com/helix-editor/helix/pull/12733))
* Deny unknown fields in `editor.smart-tab` config ([28047fe](https://github.com/helix-editor/helix/commit/28047fe))
* Fix soft-wrap word boundary detection for Unicode combining accent characters ([#12483](https://github.com/helix-editor/helix/pull/12483))
* Fix clearing of infobox popups in `select_register` and `insert_register` commands ([e882a75](https://github.com/helix-editor/helix/commit/e882a75))
* Fix handling of `stderr` of DAP child processes ([d0d1693](https://github.com/helix-editor/helix/commit/d0d1693))
* Cancel all pending requests when a DAP session terminates ([26db541](https://github.com/helix-editor/helix/commit/26db541))
* Properly discard out-of-date diagnostics ([313a647](https://github.com/helix-editor/helix/commit/313a647))
* Fix display of multiple language servers in `hx --health` ([#12841](https://github.com/helix-editor/helix/pull/12841))
* Respect `editor.default-yank-register` in `:yank-joined` ([#12890](https://github.com/helix-editor/helix/pull/12890))
* Escape percent character when pasting the history register into the picker ([#12886](https://github.com/helix-editor/helix/pull/12886))
* Render rulers before the cursor ([2d3b75a](https://github.com/helix-editor/helix/commit/2d3b75a))
* Avoid inserting final newlines in empty files ([67879a1](https://github.com/helix-editor/helix/commit/67879a1))
* Gracefully handle partial failure in multi-language-server requests ([#13156](https://github.com/helix-editor/helix/pull/13156), [14cab4b](https://github.com/helix-editor/helix/commit/14cab4b))
* Improve LSP progress message display in the statusline ([#13180](https://github.com/helix-editor/helix/pull/13180))
* Fix behavior of `<esc>` removing added indentation in documents with CRLF line endings ([702a961](https://github.com/helix-editor/helix/commit/702a961))
* Append changes to document history before pushing jumplist jumps ([#13619](https://github.com/helix-editor/helix/pull/13619))
* Fix overflow in the display of large chunks of text in the signature-help component ([#13566](https://github.com/helix-editor/helix/pull/13566))
* Fix panic from clearing whitespace when changing multiple selections on one line ([#13673](https://github.com/helix-editor/helix/pull/13673))
* Include formatting options in LSP range formatting request ([#13734](https://github.com/helix-editor/helix/pull/13734))
* Consistently set statusline errors when LSP features are not available ([#12577](https://github.com/helix-editor/helix/pull/12577))
* Fix `goto_file` on Windows ([#13770](https://github.com/helix-editor/helix/pull/13770))
* Fix crash in `goto_word` (`gw`) when `editor.jump-label-alphabet` is configured to be empty ([#13863](https://github.com/helix-editor/helix/pull/13863))
* Fix `open_above` / `open_below` (`o` / `O`) when using a count on a document with CRLF line-endings ([#13905](https://github.com/helix-editor/helix/pull/13905))
Themes:
* Update `modus` themes ([#12670](https://github.com/helix-editor/helix/pull/12670))
* Update `snazzy` ([#11089](https://github.com/helix-editor/helix/pull/11089))
* Update `gruber-darker` ([#12797](https://github.com/helix-editor/helix/pull/12797))
* Update `cyan_light` ([#12864](https://github.com/helix-editor/helix/pull/12864), [#12891](https://github.com/helix-editor/helix/pull/12891))
* Update `onedarker` ([#12833](https://github.com/helix-editor/helix/pull/12833))
* Update `github_light` ([#12907](https://github.com/helix-editor/helix/pull/12907))
* Update `kanagawa` ([#12895](https://github.com/helix-editor/helix/pull/12895))
* Add `beans` ([#12963](https://github.com/helix-editor/helix/pull/12963))
* Update `base16_transparent` ([#13080](https://github.com/helix-editor/helix/pull/13080))
* Update `sunset` ([#13086](https://github.com/helix-editor/helix/pull/13086))
* Add `carbon` ([#13067](https://github.com/helix-editor/helix/pull/13067))
* Update `soralized` ([#13121](https://github.com/helix-editor/helix/pull/13121))
* Add `focus_nova` ([#13144](https://github.com/helix-editor/helix/pull/13144))
* Update `onedark` ([#13166](https://github.com/helix-editor/helix/pull/13166))
* Update `adwaita-light` ([#13174](https://github.com/helix-editor/helix/pull/13174))
* Add `earl_grey` ([#13203](https://github.com/helix-editor/helix/pull/13203))
* Update `spacebones` ([#13213](https://github.com/helix-editor/helix/pull/13213))
* Add `peachpuff` ([#13225](https://github.com/helix-editor/helix/pull/13225))
* Update catppuccin themes ([#13262](https://github.com/helix-editor/helix/pull/13262))
* Update gruvbox themes ([#13315](https://github.com/helix-editor/helix/pull/13315))
* Update serika themes ([#13341](https://github.com/helix-editor/helix/pull/13341))
* Add `gruvbox-material` ([#13311](https://github.com/helix-editor/helix/pull/13311))
* Add `ashen` ([#13366](https://github.com/helix-editor/helix/pull/13366))
* Update Zed themes ([#13370](https://github.com/helix-editor/helix/pull/13370))
* Update Tokyonight themes ([#13375](https://github.com/helix-editor/helix/pull/13375))
* Update `onelight` ([#13413](https://github.com/helix-editor/helix/pull/13413))
* Add `ataraxia` ([#13390](https://github.com/helix-editor/helix/pull/13390))
* Add `vesper` ([#13394](https://github.com/helix-editor/helix/pull/13394))
* Add `kinda_nvim` and `kinda_nvim_light` ([#13406](https://github.com/helix-editor/helix/pull/13406))
* Update `sonokai` ([#13410](https://github.com/helix-editor/helix/pull/13410))
* Add `nyxvamp` themes ([#12185](https://github.com/helix-editor/helix/pull/12185))
* Update nord themes ([#13574](https://github.com/helix-editor/helix/pull/13574))
* Add `lapis_aquamarine` ([#13726](https://github.com/helix-editor/helix/pull/13726))
* Add `sidra` ([#13575](https://github.com/helix-editor/helix/pull/13575))
* Add `dark-synthwave` ([#13857](https://github.com/helix-editor/helix/pull/13857))
* Update `rose_pine` ([#13908](https://github.com/helix-editor/helix/pull/13908))
* Add `doom-one` ([#13933](https://github.com/helix-editor/helix/pull/13933))
* Update `nightfox` ([#13957](https://github.com/helix-editor/helix/pull/13957))
New languages:
* Ghostty config ([#12703](https://github.com/helix-editor/helix/pull/12703))
* Tera ([#12756](https://github.com/helix-editor/helix/pull/12756))
* FGA ([#12763](https://github.com/helix-editor/helix/pull/12763))
* CSV ([#11973](https://github.com/helix-editor/helix/pull/11973))
* Yara ([#12753](https://github.com/helix-editor/helix/pull/12753))
* Djot ([#12562](https://github.com/helix-editor/helix/pull/12562))
* Ink ([#12773](https://github.com/helix-editor/helix/pull/12773))
* Mail ([#12945](https://github.com/helix-editor/helix/pull/12945))
* SourcePawn ([#13028](https://github.com/helix-editor/helix/pull/13028))
* TLA+ ([#13081](https://github.com/helix-editor/helix/pull/13081))
* Werk ([#13136](https://github.com/helix-editor/helix/pull/13136))
* Debian control file ([#13245](https://github.com/helix-editor/helix/pull/13245))
* WESL ([#13267](https://github.com/helix-editor/helix/pull/13267))
* Fennel ([#13260](https://github.com/helix-editor/helix/pull/13260), [6081a5d](https://github.com/helix-editor/helix/commit/6081a5d))
* Quarto ([#13339](https://github.com/helix-editor/helix/pull/13339))
* Pug ([#13435](https://github.com/helix-editor/helix/pull/13435))
* Slang ([#13449](https://github.com/helix-editor/helix/pull/13449))
* Dunst config ([#13458](https://github.com/helix-editor/helix/pull/13458))
* Luau ([#13702](https://github.com/helix-editor/helix/pull/13702))
* Caddyfile ([#13859](https://github.com/helix-editor/helix/pull/13859))
* Java properties ([#13874](https://github.com/helix-editor/helix/pull/13874))
* Git notes ([#13885](https://github.com/helix-editor/helix/pull/13885))
* systemd (split from INI) ([#13907](https://github.com/helix-editor/helix/pull/13907))
* JSON-LD (split from JSON) ([#13925](https://github.com/helix-editor/helix/pull/13925))
* Django HTML ([#13935](https://github.com/helix-editor/helix/pull/13935))
Updated languages and queries:
* Add `ruby-lsp` for Ruby ([#12511](https://github.com/helix-editor/helix/pull/12511))
* Add `wat_server` for Wat ([#12581](https://github.com/helix-editor/helix/pull/12581))
* Recognize `bun.lock` as JSONC ([fcf981b](https://github.com/helix-editor/helix/commit/fcf981b))
* Update tree-sitter-rust ([#12607](https://github.com/helix-editor/helix/pull/12607), [1afa63d](https://github.com/helix-editor/helix/commit/1afa63d))
* Fix configuration of `cs-lsp` ([#12615](https://github.com/helix-editor/helix/pull/12615))
* Add `beancount-language-server` for Beancount ([#12610](https://github.com/helix-editor/helix/pull/12610))
* Update tree-sitter-fish ([#12456](https://github.com/helix-editor/helix/pull/12456))
* Add `fish-lsp` for Fish ([#12456](https://github.com/helix-editor/helix/pull/12456))
* Update tree-sitter-ini ([#12456](https://github.com/helix-editor/helix/pull/12456), [#13088](https://github.com/helix-editor/helix/pull/13088))
* Recognize `hgrc` as INI ([#12456](https://github.com/helix-editor/helix/pull/12456))
* Restrict tagged template injection languages for ECMA languages ([#12217](https://github.com/helix-editor/helix/pull/12217))
* Update tree-sitter-zig ([#11980](https://github.com/helix-editor/helix/pull/11980), [#12708](https://github.com/helix-editor/helix/pull/12708))
* Update tree-sitter-elixir ([8bf9adf](https://github.com/helix-editor/helix/commit/8bf9adf))
* Add `asm-lsp` for Assembly dialects ([#12684](https://github.com/helix-editor/helix/pull/12684))
* Update tree-sitter-just ([#12692](https://github.com/helix-editor/helix/pull/12692), #)
* Update tree-sitter-cairo ([#12712](https://github.com/helix-editor/helix/pull/12712))
* Configure a comment token for Svelte ([#12743](https://github.com/helix-editor/helix/pull/12743))
* Recognize `.sublime-*` files ([#12750](https://github.com/helix-editor/helix/pull/12750))
* Highlight `$` tagged templates as shell commands in ECMA languages ([#12751](https://github.com/helix-editor/helix/pull/12751))
* Add `#'` comment token for R ([#12748](https://github.com/helix-editor/helix/pull/12748))
* Fix module/namespace highlight in Unison ([93fa990](https://github.com/helix-editor/helix/commit/93fa990))
* Add missing `#not-eq?` and `#not-match?` highlights in TSQ ([3824010](https://github.com/helix-editor/helix/commit/3824010))
* Reverse the precedence order of highlight queries ([#9458](https://github.com/helix-editor/helix/pull/9458), [#12777](https://github.com/helix-editor/helix/pull/12777), [#12795](https://github.com/helix-editor/helix/pull/12795), [144a4f4](https://github.com/helix-editor/helix/commit/144a4f4), [e1c26eb](https://github.com/helix-editor/helix/commit/e1c26eb), [e1060a2](https://github.com/helix-editor/helix/commit/e1060a2), [7f41670](https://github.com/helix-editor/helix/commit/7f41670), [#13293](https://github.com/helix-editor/helix/pull/13293))
* Update Rust highlights ([b8bfc44](https://github.com/helix-editor/helix/commit/b8bfc44), [#12871](https://github.com/helix-editor/helix/pull/12871), [#13664](https://github.com/helix-editor/helix/pull/13664))
* Add block comment configuration for PHP ([0ab403d](https://github.com/helix-editor/helix/commit/0ab403d))
* Update Gren highlights ([#12769](https://github.com/helix-editor/helix/pull/12769))
* Remove `ERROR` node highlighting from all highlight queries ([16ff063](https://github.com/helix-editor/helix/commit/16ff063))
* Update tree-sitter-erlang and highlights ([18b9eb9](https://github.com/helix-editor/helix/commit/18b9eb9), [9f3b193](https://github.com/helix-editor/helix/commit/9f3b193), [12139a4](https://github.com/helix-editor/helix/commit/12139a4))
* Update Nix injections ([#12776](https://github.com/helix-editor/helix/pull/12776), [#12774](https://github.com/helix-editor/helix/pull/12774), [#13851](https://github.com/helix-editor/helix/pull/13851))
* Add indent queries for Nix ([#12829](https://github.com/helix-editor/helix/pull/12829))
* Update Markdown highlights ([#12696](https://github.com/helix-editor/helix/pull/12696))
* Recognize `xsl` as XML ([#12834](https://github.com/helix-editor/helix/pull/12834))
* Remove deprecated `typst-lsp` config ([5a66270](https://github.com/helix-editor/helix/commit/5a66270))
* Replace `pkgbuild-language-server` with `termux-language-server` ([c3c9a0d](https://github.com/helix-editor/helix/commit/c3c9a0d))
* Update SQL highlights ([#12837](https://github.com/helix-editor/helix/pull/12837))
* Recognize `mpd` and `smil` as XML ([#12916](https://github.com/helix-editor/helix/pull/12916))
* Add indents and textojbects for Kotlin ([#12925](https://github.com/helix-editor/helix/pull/12925))
* Fix module highlights in Koto ([7e87a36](https://github.com/helix-editor/helix/commit/7e87a36))
* Update language servers for Protobuf ([#12936](https://github.com/helix-editor/helix/pull/12936))
* Add `astro-ls` for Astro ([#12939](https://github.com/helix-editor/helix/pull/12939))
* Fix recognition of "scons*" files as Python ([#12943](https://github.com/helix-editor/helix/pull/12943))
* Update C# queries ([#12948](https://github.com/helix-editor/helix/pull/12948))
* Add comment textojbect to TOML ([#12952](https://github.com/helix-editor/helix/pull/12952))
* Add `starpls` as Starlark language server ([#12958](https://github.com/helix-editor/helix/pull/12958))
* Add `pkl-lsp` for PKL ([#12962](https://github.com/helix-editor/helix/pull/12962))
* Add `kdlfmt` formatter for KDL ([#12967](https://github.com/helix-editor/helix/pull/12967))
* Update CSS highlights ([#12497](https://github.com/helix-editor/helix/pull/12497), [fed3edc](https://github.com/helix-editor/helix/commit/fed3edc))
* Add `harper-ls` ([#13029](https://github.com/helix-editor/helix/pull/13029))
* Change `wgsl_analyzer` to `wgsl-analyzer` ([#13063](https://github.com/helix-editor/helix/pull/13063))
* Update tree-sitter-vhdl ([#13091](https://github.com/helix-editor/helix/pull/13091))
* Update tree-sitter-openscad ([#13033](https://github.com/helix-editor/helix/pull/13033))
* Update Rust injections ([694b615](https://github.com/helix-editor/helix/commit/694b615), [1bd7a39](https://github.com/helix-editor/helix/commit/1bd7a39))
* Update Ruby highlights ([#13055](https://github.com/helix-editor/helix/pull/13055))
* Recognize `gitconfig` as an extension ([#13115](https://github.com/helix-editor/helix/pull/13115))
* Add `///` comment token for Amber ([#13122](https://github.com/helix-editor/helix/pull/13122))
* Add indent queries for Starlark ([#13126](https://github.com/helix-editor/helix/pull/13126))
* Recognize more systemd file types as INI ([#13139](https://github.com/helix-editor/helix/pull/13139))
* Update scheme queries ([#13143](https://github.com/helix-editor/helix/pull/13143))
* Recognize `tmTheme` as XML ([#13202](https://github.com/helix-editor/helix/pull/13202))
* Update `golangci-lint` command for v2 ([#13204](https://github.com/helix-editor/helix/pull/13204))
* Add `just-lsp` for Just ([#13276](https://github.com/helix-editor/helix/pull/13276))
* Add a tree-sitter-prolog grammar ([#11611](https://github.com/helix-editor/helix/pull/11611))
* Fix typos in Ada queries ([#13251](https://github.com/helix-editor/helix/pull/13251))
* Update mint language server args ([#13248](https://github.com/helix-editor/helix/pull/13248))
* Update typescript highlights ([#13250](https://github.com/helix-editor/helix/pull/13250))
* Update tree-sitter-jjdescription ([#13329](https://github.com/helix-editor/helix/pull/13329))
* Add injection queries for Quint ([#13322](https://github.com/helix-editor/helix/pull/13322))
* Update tree-sitter-scss and highlights ([#13414](https://github.com/helix-editor/helix/pull/13414))
* Update tree-sitter-go-mod ([#13395](https://github.com/helix-editor/helix/pull/13395))
* Update tree-sitter-svelte ([#13423](https://github.com/helix-editor/helix/pull/13423))
* Update Lua highlights ([#13401](https://github.com/helix-editor/helix/pull/13401))
* Update Go highlights ([#13425](https://github.com/helix-editor/helix/pull/13425), [25b299a](https://github.com/helix-editor/helix/commit/25b299a), [#13825](https://github.com/helix-editor/helix/pull/13825))
* Recognize `.git-blame-ignore-revs` as gitignore ([#13460](https://github.com/helix-editor/helix/pull/13460))
* Update Verilog highlights ([#13473](https://github.com/helix-editor/helix/pull/13473), [#13493](https://github.com/helix-editor/helix/pull/13493))
* Update tree-sitter-v ([#13469](https://github.com/helix-editor/helix/pull/13469))
* Update WGSL highlights ([#13479](https://github.com/helix-editor/helix/pull/13479))
* Update Bash highlights ([#13477](https://github.com/helix-editor/helix/pull/13477))
* Update tree-sitter-cpp ([#13504](https://github.com/helix-editor/helix/pull/13504))
* Update rust-analyzer config to use server-side file watching ([#13432](https://github.com/helix-editor/helix/pull/13432))
* Update Vue injections ([#13511](https://github.com/helix-editor/helix/pull/13511))
* Recognize `sld` as Scheme ([#13528](https://github.com/helix-editor/helix/pull/13528))
* Recognize more files as git-attributes ([#13540](https://github.com/helix-editor/helix/pull/13540))
* Update tree-sitter-haskell and queries ([#13475](https://github.com/helix-editor/helix/pull/13475))
* Align INI highlights with TOML ([#13589](https://github.com/helix-editor/helix/pull/13589))
* Add tree-sitter-rust-format-args for `format_args!` injections in Rust ([#13533](https://github.com/helix-editor/helix/pull/13533), [#13657](https://github.com/helix-editor/helix/pull/13657), [4dd4ba7](https://github.com/helix-editor/helix/commit/4dd4ba7), [86f10ae](https://github.com/helix-editor/helix/commit/86f10ae))
* Update Ungrammar highlights ([8d58f6c](https://github.com/helix-editor/helix/commit/8d58f6c))
* Add `ty` language server for Python ([#13643](https://github.com/helix-editor/helix/pull/13643))
* Add `clarinet` language server for Clarity ([#13647](https://github.com/helix-editor/helix/pull/13647))
* Update prisma config to avoid a crash in the language server ([f6878f6](https://github.com/helix-editor/helix/commit/f6878f6))
* Add `pyrefly` for Python ([#13713](https://github.com/helix-editor/helix/pull/13713))
* Update Python highlights ([#13715](https://github.com/helix-editor/helix/pull/13715))
* Update Mojo language server and formatter to `pixi` ([#13648](https://github.com/helix-editor/helix/pull/13648))
* Add `tombi` for TOML ([#13723](https://github.com/helix-editor/helix/pull/13723))
* Add `neocmakelsp` for CMake ([#13740](https://github.com/helix-editor/helix/pull/13740))
* Update C and C++ highlights ([#13747](https://github.com/helix-editor/helix/pull/13747), [#13772](https://github.com/helix-editor/helix/pull/13772))
* Highlight escape sequences in ECMA languages ([#13762](https://github.com/helix-editor/helix/pull/13762))
* Add an external formatter config for Crystal ([#13759](https://github.com/helix-editor/helix/pull/13759))
* Add `amber-lsp` for Amber ([#13763](https://github.com/helix-editor/helix/pull/13763))
* Update HTML highlights ([#13753](https://github.com/helix-editor/helix/pull/13753))
* Update tree-sitter-purescript and highlights ([#13782](https://github.com/helix-editor/helix/pull/13782))
* Update tree-sitter-gleam and highlights ([#13793](https://github.com/helix-editor/helix/pull/13793), [#13807](https://github.com/helix-editor/helix/pull/13807), [#13813](https://github.com/helix-editor/helix/pull/13813))
* Recognize Buck files as Starlark ([#13810](https://github.com/helix-editor/helix/pull/13810))
* Use tree-sitter-crystal instead of tree-sitter-ruby for Crystal and add custom queries ([#13805](https://github.com/helix-editor/helix/pull/13805))
* Update tree-sitter-twig ([#13689](https://github.com/helix-editor/helix/pull/13689))
* Recognize `jsconfig.json` as JSONC, use as JavaScript and JSX roots ([#13822](https://github.com/helix-editor/helix/pull/13822))
* Recognize `.gem/credentials` as YAML ([#13843](https://github.com/helix-editor/helix/pull/13843))
* Update Dockerfile injections ([#13845](https://github.com/helix-editor/helix/pull/13845), 13852)
* Change tree-sitter parser for Git commit message files ([44293df](https://github.com/helix-editor/helix/commit/44293df))
* Recognize `mimeapps.list` as INI ([#13850](https://github.com/helix-editor/helix/pull/13850))
* Update tree-sitter-odin, highlights and indents ([#13877](https://github.com/helix-editor/helix/pull/13877), [#13917](https://github.com/helix-editor/helix/pull/13917))
* Add locals queries for C, improve parameter highlighting ([#13876](https://github.com/helix-editor/helix/pull/13876))
* Add textobjects for QML ([#13855](https://github.com/helix-editor/helix/pull/13855))
* Add comment tokens for DTD ([#13904](https://github.com/helix-editor/helix/pull/13904))
* Add `dts-lsp` for DeviceTree ([#13907](https://github.com/helix-editor/helix/pull/13907))
* Update gomod highlights ([#13913](https://github.com/helix-editor/helix/pull/13913))
* Recognize `compose.yaml` and `compose.yml` as Docker Compose ([#13930](https://github.com/helix-editor/helix/pull/13930))
Packaging:
* Fix handling of spaces in Bash completion ([#12828](https://github.com/helix-editor/helix/pull/12828))
* Refactor Nix flake ([#12831](https://github.com/helix-editor/helix/pull/12831), [#13024](https://github.com/helix-editor/helix/pull/13024), [cb1ecc9](https://github.com/helix-editor/helix/commit/cb1ecc9), [#13305](https://github.com/helix-editor/helix/pull/13305))
* Add `ConsoleOnly` to `Helix.desktop` categories ([#13236](https://github.com/helix-editor/helix/pull/13236))
* Drop Nix flake dependency on flake-utils ([60a03a3](https://github.com/helix-editor/helix/commit/60a03a3))
* Increase the MSRV to 1.82 ([#13275](https://github.com/helix-editor/helix/pull/13275))
# 25.01.1 (2025-01-19)
25.01.1 is a patch release focusing on fixing bugs and panics from changes in 25.01.

83
Cargo.lock generated
View File

@@ -1397,7 +1397,7 @@ dependencies = [
[[package]]
name = "helix-core"
version = "25.7.0"
version = "25.1.1"
dependencies = [
"anyhow",
"arc-swap",
@@ -1435,7 +1435,7 @@ dependencies = [
[[package]]
name = "helix-dap"
version = "25.7.0"
version = "25.1.1"
dependencies = [
"anyhow",
"fern",
@@ -1454,7 +1454,7 @@ dependencies = [
[[package]]
name = "helix-event"
version = "25.7.0"
version = "25.1.1"
dependencies = [
"anyhow",
"foldhash",
@@ -1468,7 +1468,7 @@ dependencies = [
[[package]]
name = "helix-loader"
version = "25.7.0"
version = "25.1.1"
dependencies = [
"anyhow",
"cc",
@@ -1485,7 +1485,7 @@ dependencies = [
[[package]]
name = "helix-lsp"
version = "25.7.0"
version = "25.1.1"
dependencies = [
"anyhow",
"arc-swap",
@@ -1518,11 +1518,11 @@ dependencies = [
[[package]]
name = "helix-parsec"
version = "25.7.0"
version = "25.1.1"
[[package]]
name = "helix-stdx"
version = "25.7.0"
version = "25.1.1"
dependencies = [
"bitflags",
"dunce",
@@ -1540,13 +1540,14 @@ dependencies = [
[[package]]
name = "helix-term"
version = "25.7.0"
version = "25.1.1"
dependencies = [
"anyhow",
"arc-swap",
"chrono",
"content_inspector",
"crossterm",
"dashmap",
"fern",
"futures-util",
"grep-regex",
@@ -1586,7 +1587,7 @@ dependencies = [
[[package]]
name = "helix-tui"
version = "25.7.0"
version = "25.1.1"
dependencies = [
"bitflags",
"cassowary",
@@ -1601,7 +1602,7 @@ dependencies = [
[[package]]
name = "helix-vcs"
version = "25.7.0"
version = "25.1.1"
dependencies = [
"anyhow",
"arc-swap",
@@ -1617,7 +1618,7 @@ dependencies = [
[[package]]
name = "helix-view"
version = "25.7.0"
version = "25.1.1"
dependencies = [
"anyhow",
"arc-swap",
@@ -1986,7 +1987,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a793df0d7afeac54f95b471d3af7f0d4fb975699f972341a4b76988d49cdf0c"
dependencies = [
"cfg-if",
"windows-targets 0.53.2",
"windows-targets 0.52.6",
]
[[package]]
@@ -2462,9 +2463,9 @@ dependencies = [
[[package]]
name = "serde_spanned"
version = "1.0.0"
version = "0.6.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40734c41988f7306bb04f0ecf60ec0f3f1caa34290e4e8ea471dcd3346483b83"
checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"
dependencies = [
"serde",
]
@@ -2786,42 +2787,44 @@ dependencies = [
[[package]]
name = "toml"
version = "0.9.2"
version = "0.8.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed0aee96c12fa71097902e0bb061a5e1ebd766a6636bb605ba401c45c1650eac"
checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362"
dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"toml_edit",
]
[[package]]
name = "toml_datetime"
version = "0.6.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c"
dependencies = [
"serde",
]
[[package]]
name = "toml_edit"
version = "0.22.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a"
dependencies = [
"indexmap",
"serde",
"serde_spanned",
"toml_datetime",
"toml_parser",
"toml_writer",
"toml_write",
"winnow",
]
[[package]]
name = "toml_datetime"
version = "0.7.0"
name = "toml_write"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bade1c3e902f58d73d3f294cd7f20391c1cb2fbcb643b73566bc773971df91e3"
dependencies = [
"serde",
]
[[package]]
name = "toml_parser"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97200572db069e74c512a14117b296ba0a80a30123fbbb5aa1f4a348f639ca30"
dependencies = [
"winnow",
]
[[package]]
name = "toml_writer"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcc842091f2def52017664b53082ecbbeb5c7731092bad69d2c63050401dfd64"
checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801"
[[package]]
name = "tree-house"
@@ -3279,7 +3282,7 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
[[package]]
name = "xtask"
version = "25.7.0"
version = "25.1.1"
dependencies = [
"helix-core",
"helix-loader",

View File

@@ -50,10 +50,9 @@ parking_lot = "0.12"
futures-executor = "0.3"
futures-util = { version = "0.3", features = ["std", "async-await"], default-features = false }
tokio-stream = "0.1.17"
toml = "0.9"
[workspace.package]
version = "25.7.0"
version = "25.1.1"
edition = "2021"
authors = ["Blaž Hrastnik <blaz@mxxn.io>"]
categories = ["editor"]

View File

@@ -28,3 +28,4 @@
- [Adding textobject queries](./guides/textobject.md)
- [Adding indent queries](./guides/indent.md)
- [Adding injection queries](./guides/injection.md)
- [Adding tags queries](./guides/tags.md)

View File

@@ -467,3 +467,13 @@ fn main() {
└─ no such value in this scope
}
```
The new diagnostic rendering is not yet enabled by default. As soon as end of line or inline diagnostics are enabled the old diagnostics rendering is automatically disabled. The recommended default setting are:
```toml
[editor]
end-of-line-diagnostics = "hint"
[editor.inline-diagnostics]
cursor-line = "warning" # show warnings and errors on the cursorline inline
```

View File

@@ -1,282 +1,279 @@
| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Default language servers |
| --- | --- | --- | --- | --- |
| ada | ✓ | ✓ | | `ada_language_server` |
| adl | ✓ | ✓ | ✓ | |
| agda | ✓ | | | |
| alloy | ✓ | | | |
| amber | ✓ | | | `amber-lsp` |
| astro | ✓ | | | `astro-ls` |
| awk | ✓ | ✓ | | `awk-language-server` |
| bash | ✓ | ✓ | ✓ | `bash-language-server` |
| bass | ✓ | | | `bass` |
| beancount | ✓ | | | `beancount-language-server` |
| bibtex | ✓ | | | `texlab` |
| bicep | ✓ | | | `bicep-langserver` |
| bitbake | ✓ | | | `bitbake-language-server` |
| blade | ✓ | | | |
| blueprint | ✓ | | | `blueprint-compiler` |
| c | ✓ | ✓ | ✓ | `clangd` |
| c-sharp | ✓ | ✓ | | `OmniSharp` |
| cabal | | | | `haskell-language-server-wrapper` |
| caddyfile | ✓ | ✓ | ✓ | |
| cairo | ✓ | ✓ | ✓ | `cairo-language-server` |
| capnp | ✓ | | ✓ | |
| cel | ✓ | | | |
| circom | ✓ | | | `circom-lsp` |
| clarity | ✓ | | | `clarinet` |
| clojure | ✓ | | | `clojure-lsp` |
| cmake | ✓ | ✓ | ✓ | `neocmakelsp`, `cmake-language-server` |
| codeql | ✓ | ✓ | | `codeql` |
| comment | ✓ | | | |
| common-lisp | ✓ | | ✓ | `cl-lsp` |
| cpon | ✓ | | ✓ | |
| cpp | ✓ | ✓ | ✓ | `clangd` |
| crystal | ✓ | ✓ | ✓ | `crystalline`, `ameba-ls` |
| css | ✓ | | ✓ | `vscode-css-language-server` |
| csv | ✓ | | | |
| cue | ✓ | | | `cuelsp` |
| cylc | ✓ | ✓ | ✓ | |
| d | ✓ | ✓ | ✓ | `serve-d` |
| dart | ✓ | ✓ | ✓ | `dart` |
| dbml | ✓ | | | |
| debian | ✓ | | | |
| devicetree | ✓ | | | `dts-lsp` |
| dhall | ✓ | ✓ | | `dhall-lsp-server` |
| diff | ✓ | | | |
| djot | ✓ | | | |
| docker-compose | ✓ | ✓ | ✓ | `docker-compose-langserver`, `yaml-language-server` |
| dockerfile | ✓ | ✓ | | `docker-langserver` |
| dot | ✓ | | | `dot-language-server` |
| dtd | ✓ | | | |
| dune | ✓ | | | |
| dunstrc | ✓ | | | |
| earthfile | ✓ | ✓ | ✓ | `earthlyls` |
| edoc | ✓ | | | |
| eex | ✓ | | | |
| ejs | ✓ | | | |
| elisp | ✓ | | | |
| elixir | ✓ | ✓ | ✓ | `elixir-ls` |
| elm | ✓ | ✓ | | `elm-language-server` |
| elvish | ✓ | | | `elvish` |
| env | ✓ | ✓ | | |
| erb | ✓ | | | |
| erlang | ✓ | ✓ | | `erlang_ls`, `elp` |
| esdl | ✓ | | | |
| fennel | ✓ | | | `fennel-ls` |
| fga | ✓ | ✓ | ✓ | |
| fidl | ✓ | | | |
| fish | ✓ | ✓ | ✓ | `fish-lsp` |
| forth | ✓ | | | `forth-lsp` |
| fortran | ✓ | | ✓ | `fortls` |
| fsharp | ✓ | | | `fsautocomplete` |
| gas | ✓ | ✓ | | `asm-lsp` |
| gdscript | ✓ | ✓ | ✓ | |
| gemini | ✓ | | | |
| gherkin | ✓ | | | |
| ghostty | ✓ | | | |
| git-attributes | ✓ | | | |
| git-commit | ✓ | ✓ | | |
| git-config | ✓ | ✓ | | |
| git-ignore | ✓ | | | |
| git-notes | ✓ | | | |
| git-rebase | ✓ | | | |
| gjs | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
| gleam | ✓ | ✓ | | `gleam` |
| glimmer | ✓ | | | `ember-language-server` |
| glsl | ✓ | ✓ | ✓ | `glsl_analyzer` |
| gn | ✓ | | | |
| go | ✓ | ✓ | ✓ | `gopls`, `golangci-lint-langserver` |
| godot-resource | ✓ | ✓ | | |
| gomod | ✓ | | | `gopls` |
| gotmpl | ✓ | | | `gopls` |
| gowork | ✓ | | | `gopls` |
| gpr | ✓ | | | `ada_language_server` |
| graphql | ✓ | ✓ | | `graphql-lsp` |
| gren | ✓ | ✓ | | |
| groovy | ✓ | | | |
| gts | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
| hare | ✓ | | | |
| haskell | ✓ | ✓ | | `haskell-language-server-wrapper` |
| haskell-persistent | ✓ | | | |
| hcl | ✓ | ✓ | ✓ | `terraform-ls` |
| heex | ✓ | ✓ | | `elixir-ls` |
| helm | ✓ | | | `helm_ls` |
| hocon | ✓ | ✓ | ✓ | |
| hoon | ✓ | | | |
| hosts | ✓ | | | |
| html | ✓ | | | `vscode-html-language-server`, `superhtml` |
| htmldjango | ✓ | | | `djlsp`, `vscode-html-language-server`, `superhtml` |
| hurl | ✓ | ✓ | ✓ | |
| hyprlang | ✓ | | ✓ | `hyprls` |
| idris | | | | `idris2-lsp` |
| iex | ✓ | | | |
| ini | ✓ | | | |
| ink | ✓ | | | |
| inko | ✓ | ✓ | ✓ | |
| janet | ✓ | | | |
| java | ✓ | ✓ | ✓ | `jdtls` |
| javascript | ✓ | ✓ | ✓ | `typescript-language-server` |
| jinja | ✓ | | | |
| jjconfig | ✓ | ✓ | ✓ | `taplo`, `tombi` |
| jjdescription | ✓ | | | |
| jjrevset | ✓ | | | |
| jjtemplate | ✓ | | | |
| jq | ✓ | ✓ | | `jq-lsp` |
| jsdoc | ✓ | | | |
| json | ✓ | ✓ | | `vscode-json-language-server` |
| json-ld | ✓ | | | `vscode-json-language-server` |
| json5 | ✓ | | | |
| jsonc | ✓ | | ✓ | `vscode-json-language-server` |
| jsonnet | ✓ | | | `jsonnet-language-server` |
| jsx | ✓ | ✓ | ✓ | `typescript-language-server` |
| julia | ✓ | | ✓ | `julia` |
| just | ✓ | ✓ | ✓ | `just-lsp` |
| kdl | ✓ | ✓ | ✓ | |
| koka | ✓ | | | `koka` |
| kotlin | ✓ | | ✓ | `kotlin-language-server` |
| koto | ✓ | | | `koto-ls` |
| latex | ✓ | | | `texlab` |
| ld | ✓ | | | |
| ldif | ✓ | | | |
| lean | ✓ | | | `lean` |
| ledger | ✓ | | | |
| llvm | ✓ | | | |
| llvm-mir | ✓ | | | |
| llvm-mir-yaml | ✓ | | ✓ | |
| log | ✓ | | | |
| lpf | ✓ | | | |
| lua | ✓ | | ✓ | `lua-language-server` |
| luau | ✓ | | | `luau-lsp` |
| mail | ✓ | ✓ | | |
| make | ✓ | | | |
| markdoc | ✓ | | | `markdoc-ls` |
| markdown | ✓ | | | `marksman`, `markdown-oxide` |
| markdown-rustdoc | ✓ | | | |
| markdown.inline | ✓ | | | |
| matlab | | | | |
| mermaid | ✓ | | | |
| meson | ✓ | | ✓ | `mesonlsp` |
| mint | | | | `mint` |
| mojo | ✓ | ✓ | | `pixi` |
| move | ✓ | | | |
| msbuild | ✓ | | | |
| nasm | ✓ | ✓ | | `asm-lsp` |
| nestedtext | ✓ | ✓ | ✓ | |
| nginx | ✓ | | | |
| nickel | ✓ | | | `nls` |
| nim | ✓ | | | `nimlangserver` |
| nix | ✓ | ✓ | | `nil`, `nixd` |
| nu | ✓ | | | `nu` |
| nunjucks | ✓ | | | |
| ocaml | ✓ | | ✓ | `ocamllsp` |
| ocaml-interface | ✓ | | | `ocamllsp` |
| odin | ✓ | | | `ols` |
| ohm | ✓ | | | |
| opencl | ✓ | ✓ | | `clangd` |
| openscad | ✓ | | | `openscad-lsp` |
| org | ✓ | | | |
| pascal | ✓ | ✓ | | `pasls` |
| passwd | ✓ | | | |
| pem | ✓ | | | |
| perl | ✓ | | ✓ | `perlnavigator` |
| pest | ✓ | ✓ | ✓ | `pest-language-server` |
| php | ✓ | | ✓ | `intelephense` |
| php-only | ✓ | | | |
| pkgbuild | ✓ | | | `termux-language-server`, `bash-language-server` |
| pkl | ✓ | | ✓ | `pkl-lsp` |
| po | ✓ | | | |
| pod | ✓ | | | |
| ponylang | ✓ | ✓ | | |
| powershell | ✓ | | | |
| prisma | ✓ | ✓ | | `prisma-language-server` |
| prolog | ✓ | | ✓ | `swipl` |
| properties | ✓ | | | |
| protobuf | ✓ | ✓ | | `buf`, `pb`, `protols` |
| prql | ✓ | | | |
| pug | ✓ | | | |
| purescript | ✓ | ✓ | | `purescript-language-server` |
| python | ✓ | | | `ty`, `ruff`, `jedi-language-server`, `pylsp` |
| qml | ✓ | | | `qmlls` |
| quarto | ✓ | | ✓ | |
| quint | ✓ | | | `quint-language-server` |
| r | ✓ | | | `R` |
| racket | ✓ | | | `racket` |
| regex | ✓ | | | |
| rego | ✓ | | | `regols` |
| rescript | ✓ | ✓ | | `rescript-language-server` |
| rmarkdown | ✓ | | ✓ | `R` |
| robot | ✓ | | | `robotframework_ls` |
| ron | ✓ | | ✓ | |
| rst | ✓ | | | |
| ruby | ✓ | ✓ | ✓ | `ruby-lsp`, `solargraph` |
| rust | ✓ | ✓ | | `rust-analyzer` |
| rust-format-args | ✓ | | | |
| rust-format-args-macro | ✓ | ✓ | | |
| sage | ✓ | | | |
| scala | ✓ | ✓ | ✓ | `metals` |
| scheme | ✓ | | ✓ | |
| scss | ✓ | | | `vscode-css-language-server` |
| slang | ✓ | | | `slangd` |
| slint | ✓ | ✓ | ✓ | `slint-lsp` |
| smali | ✓ | | ✓ | |
| smithy | ✓ | | | `cs` |
| sml | ✓ | | | |
| snakemake | ✓ | | ✓ | `pylsp` |
| solidity | ✓ | ✓ | | `solc` |
| sourcepawn | ✓ | ✓ | | `sourcepawn-studio` |
| spade | ✓ | | ✓ | `spade-language-server` |
| spicedb | ✓ | | | |
| sql | ✓ | | | |
| sshclientconfig | ✓ | | | |
| starlark | ✓ | ✓ | | `starpls` |
| strace | ✓ | | | |
| supercollider | ✓ | | | |
| svelte | ✓ | | | `svelteserver` |
| sway | ✓ | | | `forc` |
| swift | ✓ | ✓ | | `sourcekit-lsp` |
| systemd | ✓ | | | `systemd-lsp` |
| t32 | ✓ | | | |
| tablegen | ✓ | ✓ | ✓ | |
| tact | ✓ | | | |
| task | ✓ | | | |
| tcl | ✓ | | | |
| teal | ✓ | | | `teal-language-server` |
| templ | ✓ | | | `templ` |
| tera | ✓ | | | |
| textproto | ✓ | | | |
| tfvars | ✓ | | ✓ | `terraform-ls` |
| thrift | ✓ | | | |
| tlaplus | ✓ | | | |
| todotxt | ✓ | | | |
| toml | ✓ | | | `taplo`, `tombi` |
| tsq | ✓ | | | `ts_query_ls` |
| tsx | ✓ | ✓ | ✓ | `typescript-language-server` |
| twig | ✓ | | | |
| typescript | ✓ | | | `typescript-language-server` |
| typespec | ✓ | ✓ | ✓ | `tsp-server` |
| typst | ✓ | | | `tinymist` |
| ungrammar | ✓ | | | |
| unison | ✓ | ✓ | | |
| uxntal | ✓ | | | |
| v | ✓ | ✓ | | `v-analyzer` |
| vala | ✓ | ✓ | | `vala-language-server` |
| vento | ✓ | | | |
| verilog | ✓ | | | `svlangserver` |
| vhdl | ✓ | | | `vhdl_ls` |
| vhs | ✓ | | | |
| vue | ✓ | | | `vue-language-server` |
| wast | ✓ | | | |
| wat | ✓ | | | `wat_server` |
| webc | ✓ | | | |
| werk | ✓ | | | |
| wesl | ✓ | ✓ | | |
| wgsl | ✓ | | | `wgsl-analyzer` |
| wit | ✓ | | ✓ | |
| wren | ✓ | | | |
| xit | ✓ | | | |
| xml | ✓ | | | |
| xtc | ✓ | | | |
| yaml | ✓ | ✓ | ✓ | `yaml-language-server`, `ansible-language-server` |
| yara | ✓ | | | `yls` |
| yuck | ✓ | | | |
| zig | ✓ | ✓ | ✓ | `zls` |
| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Code Navigation Tags | Default language servers |
| --- | --- | --- | --- | --- | --- |
| ada | ✓ | ✓ | | | `ada_language_server` |
| adl | ✓ | ✓ | ✓ | | |
| agda | ✓ | | | | |
| alloy | ✓ | | | | |
| amber | ✓ | | | | `amber-lsp` |
| astro | ✓ | | | | `astro-ls` |
| awk | ✓ | ✓ | | | `awk-language-server` |
| bash | ✓ | ✓ | ✓ | | `bash-language-server` |
| bass | ✓ | | | | `bass` |
| beancount | ✓ | | | | `beancount-language-server` |
| bibtex | ✓ | | | | `texlab` |
| bicep | ✓ | | | | `bicep-langserver` |
| bitbake | ✓ | | | | `bitbake-language-server` |
| blade | ✓ | | | | |
| blueprint | ✓ | | | | `blueprint-compiler` |
| c | ✓ | ✓ | ✓ | ✓ | `clangd` |
| c-sharp | ✓ | ✓ | | ✓ | `OmniSharp` |
| cabal | | | | | `haskell-language-server-wrapper` |
| caddyfile | ✓ | ✓ | ✓ | | |
| cairo | ✓ | ✓ | ✓ | | `cairo-language-server` |
| capnp | ✓ | | ✓ | | |
| cel | ✓ | | | | |
| circom | ✓ | | | | `circom-lsp` |
| clarity | ✓ | | | | `clarinet` |
| clojure | ✓ | | | | `clojure-lsp` |
| cmake | ✓ | ✓ | ✓ | | `neocmakelsp`, `cmake-language-server` |
| codeql | ✓ | ✓ | | | `codeql` |
| comment | ✓ | | | | |
| common-lisp | ✓ | | ✓ | | `cl-lsp` |
| cpon | ✓ | | ✓ | | |
| cpp | ✓ | ✓ | ✓ | ✓ | `clangd` |
| crystal | ✓ | ✓ | ✓ | ✓ | `crystalline`, `ameba-ls` |
| css | ✓ | | ✓ | | `vscode-css-language-server` |
| csv | ✓ | | | | |
| cue | ✓ | | | | `cuelsp` |
| cylc | ✓ | ✓ | ✓ | | |
| d | ✓ | ✓ | ✓ | | `serve-d` |
| dart | ✓ | ✓ | ✓ | | `dart` |
| dbml | ✓ | | | | |
| debian | ✓ | | | | |
| devicetree | ✓ | | | | `dts-lsp` |
| dhall | ✓ | ✓ | | | `dhall-lsp-server` |
| diff | ✓ | | | | |
| djot | ✓ | | | | |
| docker-compose | ✓ | ✓ | ✓ | | `docker-compose-langserver`, `yaml-language-server` |
| dockerfile | ✓ | ✓ | | | `docker-langserver` |
| dot | ✓ | | | | `dot-language-server` |
| dtd | ✓ | | | | |
| dune | ✓ | | | | |
| dunstrc | ✓ | | | | |
| earthfile | ✓ | ✓ | ✓ | | `earthlyls` |
| edoc | ✓ | | | | |
| eex | ✓ | | | | |
| ejs | ✓ | | | | |
| elisp | ✓ | | | ✓ | |
| elixir | ✓ | ✓ | ✓ | ✓ | `elixir-ls` |
| elm | ✓ | ✓ | | ✓ | `elm-language-server` |
| elvish | ✓ | | | | `elvish` |
| env | ✓ | ✓ | | | |
| erb | ✓ | | | | |
| erlang | ✓ | ✓ | | ✓ | `erlang_ls`, `elp` |
| esdl | ✓ | | | | |
| fennel | ✓ | | | | `fennel-ls` |
| fga | ✓ | ✓ | ✓ | | |
| fidl | ✓ | | | | |
| fish | ✓ | ✓ | ✓ | | `fish-lsp` |
| forth | ✓ | | | | `forth-lsp` |
| fortran | ✓ | | ✓ | | `fortls` |
| fsharp | ✓ | | | | `fsautocomplete` |
| gas | ✓ | ✓ | | | `asm-lsp` |
| gdscript | ✓ | ✓ | ✓ | ✓ | |
| gemini | ✓ | | | | |
| gherkin | ✓ | | | | |
| ghostty | ✓ | | | | |
| git-attributes | ✓ | | | | |
| git-commit | ✓ | ✓ | | | |
| git-config | ✓ | ✓ | | | |
| git-ignore | ✓ | | | | |
| git-notes | ✓ | | | | |
| git-rebase | ✓ | | | | |
| gjs | ✓ | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
| gleam | ✓ | ✓ | | | `gleam` |
| glimmer | ✓ | | | | `ember-language-server` |
| glsl | ✓ | ✓ | ✓ | | `glsl_analyzer` |
| gn | ✓ | | | | |
| go | ✓ | ✓ | ✓ | ✓ | `gopls`, `golangci-lint-langserver` |
| godot-resource | ✓ | ✓ | | | |
| gomod | ✓ | | | | `gopls` |
| gotmpl | ✓ | | | | `gopls` |
| gowork | ✓ | | | | `gopls` |
| gpr | ✓ | | | | `ada_language_server` |
| graphql | ✓ | ✓ | | | `graphql-lsp` |
| gren | ✓ | ✓ | | | |
| groovy | ✓ | | | | |
| gts | ✓ | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
| hare | ✓ | | | | |
| haskell | ✓ | ✓ | | | `haskell-language-server-wrapper` |
| haskell-persistent | ✓ | | | | |
| hcl | ✓ | ✓ | ✓ | | `terraform-ls` |
| heex | ✓ | ✓ | | | `elixir-ls` |
| helm | ✓ | | | | `helm_ls` |
| hocon | ✓ | ✓ | ✓ | | |
| hoon | ✓ | | | | |
| hosts | ✓ | | | | |
| html | ✓ | | | | `vscode-html-language-server`, `superhtml` |
| htmldjango | ✓ | | | | `djlsp`, `vscode-html-language-server`, `superhtml` |
| hurl | ✓ | ✓ | ✓ | | |
| hyprlang | ✓ | | ✓ | | `hyprls` |
| idris | | | | | `idris2-lsp` |
| iex | ✓ | | | | |
| ini | ✓ | | | | |
| ink | ✓ | | | | |
| inko | ✓ | ✓ | ✓ | | |
| janet | ✓ | | | | |
| java | ✓ | ✓ | ✓ | | `jdtls` |
| javascript | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` |
| jinja | ✓ | | | | |
| jjdescription | ✓ | | | | |
| jq | ✓ | ✓ | | | `jq-lsp` |
| jsdoc | ✓ | | | | |
| json | ✓ | ✓ | ✓ | | `vscode-json-language-server` |
| json-ld | ✓ | ✓ | ✓ | | `vscode-json-language-server` |
| json5 | ✓ | | | | |
| jsonc | ✓ | | ✓ | | `vscode-json-language-server` |
| jsonnet | ✓ | | | | `jsonnet-language-server` |
| jsx | ✓ | | ✓ | ✓ | `typescript-language-server` |
| julia | ✓ | | ✓ | | `julia` |
| just | ✓ | ✓ | ✓ | | `just-lsp` |
| kdl | ✓ | ✓ | ✓ | | |
| koka | ✓ | | ✓ | | `koka` |
| kotlin | ✓ | ✓ | ✓ | | `kotlin-language-server` |
| koto | ✓ | ✓ | ✓ | | `koto-ls` |
| latex | ✓ | ✓ | | | `texlab` |
| ld | ✓ | | ✓ | | |
| ldif | ✓ | | | | |
| lean | ✓ | | | | `lean` |
| ledger | ✓ | | | | |
| llvm | ✓ | ✓ | | | |
| llvm-mir | ✓ | ✓ | ✓ | | |
| llvm-mir-yaml | ✓ | | ✓ | | |
| log | ✓ | | | | |
| lpf | ✓ | | | | |
| lua | ✓ | ✓ | ✓ | | `lua-language-server` |
| luau | ✓ | ✓ | ✓ | | `luau-lsp` |
| mail | ✓ | ✓ | | | |
| make | ✓ | | ✓ | | |
| markdoc | ✓ | | | | `markdoc-ls` |
| markdown | ✓ | | | ✓ | `marksman`, `markdown-oxide` |
| markdown-rustdoc | ✓ | | | | |
| markdown.inline | ✓ | | | | |
| matlab | ✓ | ✓ | ✓ | | |
| mermaid | ✓ | | | | |
| meson | ✓ | | | | `mesonlsp` |
| mint | | | | | `mint` |
| mojo | ✓ | | | | `pixi` |
| move | ✓ | | | | |
| msbuild | | | | | |
| nasm | ✓ | ✓ | | | `asm-lsp` |
| nestedtext | ✓ | ✓ | ✓ | | |
| nginx | ✓ | | | | |
| nickel | ✓ | | ✓ | | `nls` |
| nim | ✓ | ✓ | ✓ | | `nimlangserver` |
| nix | ✓ | | | | `nil`, `nixd` |
| nu | ✓ | | | | `nu` |
| nunjucks | ✓ | | | | |
| ocaml | ✓ | | ✓ | | `ocamllsp` |
| ocaml-interface | ✓ | | | | `ocamllsp` |
| odin | ✓ | | | | `ols` |
| ohm | ✓ | | ✓ | | |
| opencl | ✓ | ✓ | ✓ | | `clangd` |
| openscad | ✓ | | | | `openscad-lsp` |
| org | ✓ | | | | |
| pascal | ✓ | ✓ | | | `pasls` |
| passwd | ✓ | | | | |
| pem | ✓ | | | | |
| perl | ✓ | ✓ | ✓ | | `perlnavigator` |
| pest | ✓ | | | | `pest-language-server` |
| php | ✓ | ✓ | ✓ | ✓ | `intelephense` |
| php-only | ✓ | | | ✓ | |
| pkgbuild | ✓ | ✓ | ✓ | | `termux-language-server`, `bash-language-server` |
| pkl | ✓ | | ✓ | | `pkl-lsp` |
| po | ✓ | ✓ | | | |
| pod | ✓ | | | | |
| ponylang | ✓ | | ✓ | | |
| powershell | ✓ | | | | |
| prisma | ✓ | ✓ | | | `prisma-language-server` |
| prolog | ✓ | | ✓ | | `swipl` |
| properties | ✓ | ✓ | | | |
| protobuf | ✓ | ✓ | ✓ | | `buf`, `pb`, `protols` |
| prql | ✓ | | | | |
| pug | ✓ | | | | |
| purescript | ✓ | ✓ | | | `purescript-language-server` |
| python | ✓ | ✓ | | | `ty`, `ruff`, `jedi-language-server`, `pylsp` |
| qml | ✓ | ✓ | ✓ | | `qmlls` |
| quarto | ✓ | | ✓ | | |
| quint | ✓ | | | | `quint-language-server` |
| r | ✓ | | | | `R` |
| racket | ✓ | | ✓ | | `racket` |
| regex | ✓ | | | | |
| rego | ✓ | | | | `regols` |
| rescript | ✓ | | | | `rescript-language-server` |
| rmarkdown | ✓ | | ✓ | | `R` |
| robot | ✓ | | | | `robotframework_ls` |
| ron | ✓ | | ✓ | | |
| rst | ✓ | | | | |
| ruby | ✓ | ✓ | ✓ | | `ruby-lsp`, `solargraph` |
| rust | ✓ | | ✓ | ✓ | `rust-analyzer` |
| rust-format-args | ✓ | | | | |
| rust-format-args-macro | ✓ | ✓ | ✓ | | |
| sage | ✓ | ✓ | | | |
| scala | ✓ | ✓ | ✓ | | `metals` |
| scheme | ✓ | | ✓ | | |
| scss | ✓ | | | | `vscode-css-language-server` |
| slang | ✓ | ✓ | ✓ | | `slangd` |
| slint | ✓ | | ✓ | | `slint-lsp` |
| smali | ✓ | | ✓ | | |
| smithy | ✓ | | | | `cs` |
| sml | ✓ | | | | |
| snakemake | ✓ | | ✓ | | `pylsp` |
| solidity | ✓ | ✓ | | | `solc` |
| sourcepawn | ✓ | ✓ | | | `sourcepawn-studio` |
| spade | ✓ | | ✓ | | `spade-language-server` |
| spicedb | ✓ | | | ✓ | |
| sql | ✓ | ✓ | | | |
| sshclientconfig | ✓ | | | | |
| starlark | ✓ | ✓ | ✓ | | `starpls` |
| strace | ✓ | | | | |
| supercollider | ✓ | | | | |
| svelte | ✓ | | ✓ | | `svelteserver` |
| sway | ✓ | ✓ | ✓ | | `forc` |
| swift | ✓ | ✓ | | | `sourcekit-lsp` |
| systemd | ✓ | | | | `systemd-lsp` |
| t32 | ✓ | | | | |
| tablegen | ✓ | ✓ | ✓ | | |
| tact | ✓ | ✓ | ✓ | | |
| task | ✓ | | | | |
| tcl | ✓ | | ✓ | | |
| teal | ✓ | | | | `teal-language-server` |
| templ | ✓ | | | | `templ` |
| tera | ✓ | | | | |
| textproto | ✓ | | | | |
| tfvars | ✓ | | ✓ | | `terraform-ls` |
| thrift | ✓ | | | | |
| tlaplus | ✓ | | | | |
| todotxt | ✓ | | | | |
| toml | ✓ | ✓ | | | `taplo`, `tombi` |
| tsq | ✓ | | | | `ts_query_ls` |
| tsx | ✓ | | | ✓ | `typescript-language-server` |
| twig | ✓ | | | | |
| typescript | ✓ | ✓ | | | `typescript-language-server` |
| typespec | ✓ | ✓ | ✓ | | `tsp-server` |
| typst | ✓ | | | ✓ | `tinymist` |
| ungrammar | ✓ | | | | |
| unison | ✓ | ✓ | ✓ | | |
| uxntal | ✓ | | | | |
| v | ✓ | ✓ | | | `v-analyzer` |
| vala | ✓ | ✓ | | | `vala-language-server` |
| vento | ✓ | | | | |
| verilog | ✓ | ✓ | | | `svlangserver` |
| vhdl | ✓ | | | | `vhdl_ls` |
| vhs | ✓ | | | | |
| vue | ✓ | | | | `vue-language-server` |
| wast | ✓ | | | | |
| wat | ✓ | | | | `wat_server` |
| webc | ✓ | | | | |
| werk | ✓ | | | | |
| wesl | ✓ | ✓ | | | |
| wgsl | ✓ | | | | `wgsl-analyzer` |
| wit | ✓ | | ✓ | | |
| wren | ✓ | ✓ | ✓ | | |
| xit | ✓ | | | | |
| xml | ✓ | | ✓ | | |
| xtc | ✓ | | | | |
| yaml | ✓ | ✓ | ✓ | | `yaml-language-server`, `ansible-language-server` |
| yara | ✓ | | | | `yls` |
| yuck | ✓ | | | | |
| zig | ✓ | ✓ | ✓ | | `zls` |

View File

@@ -106,10 +106,10 @@
| `code_action` | Perform code action | normal: `` <space>a ``, select: `` <space>a `` |
| `buffer_picker` | Open buffer picker | normal: `` <space>b ``, select: `` <space>b `` |
| `jumplist_picker` | Open jumplist picker | normal: `` <space>j ``, select: `` <space>j `` |
| `symbol_picker` | Open symbol picker | normal: `` <space>s ``, select: `` <space>s `` |
| `symbol_picker` | Open symbol picker | |
| `changed_file_picker` | Open changed file picker | normal: `` <space>g ``, select: `` <space>g `` |
| `select_references_to_symbol_under_cursor` | Select symbol references | normal: `` <space>h ``, select: `` <space>h `` |
| `workspace_symbol_picker` | Open workspace symbol picker | normal: `` <space>S ``, select: `` <space>S `` |
| `workspace_symbol_picker` | Open workspace symbol picker | |
| `diagnostics_picker` | Open diagnostic picker | normal: `` <space>d ``, select: `` <space>d `` |
| `workspace_diagnostics_picker` | Open workspace diagnostic picker | normal: `` <space>D ``, select: `` <space>D `` |
| `last_picker` | Open last picker | normal: `` <space>' ``, select: `` <space>' `` |
@@ -305,3 +305,7 @@
| `goto_prev_tabstop` | Goto next snippet placeholder | |
| `rotate_selections_first` | Make the first selection your primary one | |
| `rotate_selections_last` | Make the last selection your primary one | |
| `syntax_symbol_picker` | Open symbol picker from syntax information | |
| `syntax_workspace_symbol_picker` | Open workspace symbol picker from syntax information | |
| `lsp_or_syntax_symbol_picker` | Open symbol picker from LSP or syntax information | normal: `` <space>s ``, select: `` <space>s `` |
| `lsp_or_syntax_workspace_symbol_picker` | Open workspace symbol picker from LSP or syntax information | normal: `` <space>S ``, select: `` <space>S `` |

34
book/src/guides/tags.md Normal file
View File

@@ -0,0 +1,34 @@
## Adding tags queries
See tree-sitter's documentation on [Code Navigation Systems] for more
background on tags queries.
Helix provides LSP-like features such as document and workspace symbol pickers
out-of-the-box for languages with `tags.scm` queries based on syntax trees. To
be analyzed a language must have a tree-sitter grammar and a `tags.scm` query
file which pattern matches interesting nodes from syntax trees.
Query files should be placed in `runtime/queries/{language}/tags.scm`
when contributing to Helix. You may place these under your local runtime
directory (`~/.config/helix/runtime` in Linux for example) for the sake of
testing.
The following [captures][tree-sitter-captures] are recognized:
| Capture name |
|--- |
| `definition.class` |
| `definition.constant` |
| `definition.function` |
| `definition.interface` |
| `definition.macro` |
| `definition.module` |
| `definition.struct` |
| `definition.type` |
[Example query files][example-queries] can be found in the Helix GitHub
repository.
[Code Navigation Systems]: https://tree-sitter.github.io/tree-sitter/4-code-navigation.html
[tree-sitter-captures]: https://tree-sitter.github.io/tree-sitter/using-parsers/queries/index.html
[example-queries]: https://github.com/search?q=repo%3Ahelix-editor%2Fhelix+path%3A%2A%2A/tags.scm&type=Code

View File

@@ -47,9 +47,6 @@
<content_rating type="oars-1.1" />
<releases>
<release version="25.07" date="2025-07-15">
<url>https://helix-editor.com/news/release-25-07-highlights/</url>
</release>
<release version="25.01.1" date="2025-01-19">
<url>https://github.com/helix-editor/helix/releases/tag/25.01.1</url>
</release>

View File

@@ -44,7 +44,7 @@ log = "0.4"
anyhow = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml.workspace = true
toml = "0.8"
imara-diff = "0.2.0"
encoding_rs = "0.8"

View File

@@ -20,7 +20,10 @@ use ropey::RopeSlice;
use tree_house::{
highlighter,
query_iter::QueryIter,
tree_sitter::{Grammar, InactiveQueryCursor, InputEdit, Node, Query, RopeInput, Tree},
tree_sitter::{
query::{InvalidPredicateError, UserPredicate},
Grammar, InactiveQueryCursor, InputEdit, Node, Query, RopeInput, Tree,
},
Error, InjectionLanguageMarker, LanguageConfig as SyntaxConfig, Layer,
};
@@ -28,6 +31,7 @@ use crate::{indent::IndentQuery, tree_sitter, ChangeSet, Language};
pub use tree_house::{
highlighter::{Highlight, HighlightEvent},
query_iter::QueryIterEvent,
Error as HighlighterError, LanguageLoader, TreeCursor, TREE_SITTER_MATCH_LIMIT,
};
@@ -37,6 +41,7 @@ pub struct LanguageData {
syntax: OnceCell<Option<SyntaxConfig>>,
indent_query: OnceCell<Option<IndentQuery>>,
textobject_query: OnceCell<Option<TextObjectQuery>>,
tag_query: OnceCell<Option<TagQuery>>,
}
impl LanguageData {
@@ -46,6 +51,7 @@ impl LanguageData {
syntax: OnceCell::new(),
indent_query: OnceCell::new(),
textobject_query: OnceCell::new(),
tag_query: OnceCell::new(),
}
}
@@ -154,6 +160,44 @@ impl LanguageData {
.as_ref()
}
/// Compiles the tags.scm query for a language.
/// This function should only be used by this module or the xtask crate.
pub fn compile_tag_query(
grammar: Grammar,
config: &LanguageConfiguration,
) -> Result<Option<TagQuery>> {
let name = &config.language_id;
let text = read_query(name, "tags.scm");
if text.is_empty() {
return Ok(None);
}
let query = Query::new(grammar, &text, |_pattern, predicate| match predicate {
// TODO: these predicates are allowed in tags.scm queries but not yet used.
UserPredicate::IsPropertySet { key: "local", .. } => Ok(()),
UserPredicate::Other(pred) => match pred.name() {
"strip!" | "select-adjacent!" => Ok(()),
_ => Err(InvalidPredicateError::unknown(predicate)),
},
_ => Err(InvalidPredicateError::unknown(predicate)),
})
.with_context(|| format!("Failed to compile tags.scm query for '{name}'"))?;
Ok(Some(TagQuery { query }))
}
fn tag_query(&self, loader: &Loader) -> Option<&TagQuery> {
self.tag_query
.get_or_init(|| {
let grammar = self.syntax_config(loader)?.grammar;
Self::compile_tag_query(grammar, &self.config)
.map_err(|err| {
log::error!("{err}");
})
.ok()
.flatten()
})
.as_ref()
}
fn reconfigure(&self, scopes: &[String]) {
if let Some(Some(config)) = self.syntax.get() {
reconfigure_highlights(config, scopes);
@@ -339,6 +383,10 @@ impl Loader {
self.language(lang).textobject_query(self)
}
pub fn tag_query(&self, lang: Language) -> Option<&TagQuery> {
self.language(lang).tag_query(self)
}
pub fn language_server_configs(&self) -> &HashMap<String, LanguageServerConfiguration> {
&self.language_server_configs
}
@@ -511,6 +559,19 @@ impl Syntax {
{
QueryIter::new(&self.inner, source, loader, range)
}
pub fn tags<'a>(
&'a self,
source: RopeSlice<'a>,
loader: &'a Loader,
range: impl RangeBounds<u32>,
) -> QueryIter<'a, 'a, impl FnMut(Language) -> Option<&'a Query> + 'a, ()> {
self.query_iter(
source,
|lang| loader.tag_query(lang).map(|q| &q.query),
range,
)
}
}
pub type Highlighter<'a> = highlighter::Highlighter<'a, 'a, Loader>;
@@ -881,6 +942,11 @@ impl TextObjectQuery {
}
}
#[derive(Debug)]
pub struct TagQuery {
pub query: Query,
}
pub fn pretty_print_tree<W: fmt::Write>(fmt: &mut W, node: Node) -> fmt::Result {
if node.child_count() == 0 {
if node_is_visible(&node) {

View File

@@ -19,7 +19,7 @@ helix-stdx = { path = "../helix-stdx" }
anyhow = "1"
serde = { version = "1.0", features = ["derive"] }
toml.workspace = true
toml = "0.8"
etcetera = "0.10"
once_cell = "1.21"
log = "0.4"

View File

@@ -244,7 +244,12 @@ pub fn merge_toml_values(left: toml::Value, right: toml::Value, merge_depth: usi
/// Otherwise (workspace, false) is returned
pub fn find_workspace() -> (PathBuf, bool) {
let current_dir = current_working_dir();
for ancestor in current_dir.ancestors() {
find_workspace_in(current_dir)
}
pub fn find_workspace_in(dir: impl AsRef<Path>) -> (PathBuf, bool) {
let dir = dir.as_ref();
for ancestor in dir.ancestors() {
if ancestor.join(".git").exists()
|| ancestor.join(".svn").exists()
|| ancestor.join(".jj").exists()
@@ -254,7 +259,7 @@ pub fn find_workspace() -> (PathBuf, bool) {
}
}
(current_dir, true)
(dir.to_owned(), true)
}
fn default_config_file() -> PathBuf {

View File

@@ -82,7 +82,7 @@ open = "5.3.2"
url = "2.5.4"
# config
toml.workspace = true
toml = "0.8"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
@@ -91,6 +91,8 @@ serde = { version = "1.0", features = ["derive"] }
grep-regex = "0.1.13"
grep-searcher = "0.1.14"
dashmap = "6.0"
[target.'cfg(not(windows))'.dependencies] # https://github.com/vorner/signal-hook/issues/100
signal-hook-tokio = { version = "0.3", features = ["futures-v0_3"] }
libc = "0.2.174"

View File

@@ -1,5 +1,6 @@
pub(crate) mod dap;
pub(crate) mod lsp;
pub(crate) mod syntax;
pub(crate) mod typed;
pub use dap::*;
@@ -11,6 +12,7 @@ use helix_stdx::{
};
use helix_vcs::{FileChange, Hunk};
pub use lsp::*;
pub use syntax::*;
use tui::{
text::{Span, Spans},
widgets::Cell,
@@ -603,6 +605,10 @@ impl MappableCommand {
goto_prev_tabstop, "Goto next snippet placeholder",
rotate_selections_first, "Make the first selection your primary one",
rotate_selections_last, "Make the last selection your primary one",
syntax_symbol_picker, "Open symbol picker from syntax information",
syntax_workspace_symbol_picker, "Open workspace symbol picker from syntax information",
lsp_or_syntax_symbol_picker, "Open symbol picker from LSP or syntax information",
lsp_or_syntax_workspace_symbol_picker, "Open workspace symbol picker from LSP or syntax information",
);
}
@@ -6823,3 +6829,34 @@ fn jump_to_word(cx: &mut Context, behaviour: Movement) {
}
jump_to_label(cx, words, behaviour)
}
fn lsp_or_syntax_symbol_picker(cx: &mut Context) {
let doc = doc!(cx.editor);
if doc
.language_servers_with_feature(LanguageServerFeature::DocumentSymbols)
.next()
.is_some()
{
lsp::symbol_picker(cx);
} else if doc.syntax().is_some() {
syntax_symbol_picker(cx);
} else {
cx.editor
.set_error("No language server supporting document symbols or syntax info available");
}
}
fn lsp_or_syntax_workspace_symbol_picker(cx: &mut Context) {
let doc = doc!(cx.editor);
if doc
.language_servers_with_feature(LanguageServerFeature::WorkspaceSymbols)
.next()
.is_some()
{
lsp::workspace_symbol_picker(cx);
} else {
syntax_workspace_symbol_picker(cx);
}
}

View File

@@ -0,0 +1,446 @@
use std::{
collections::HashSet,
iter,
path::{Path, PathBuf},
sync::Arc,
};
use dashmap::DashMap;
use futures_util::FutureExt;
use grep_regex::RegexMatcherBuilder;
use grep_searcher::{sinks, BinaryDetection, SearcherBuilder};
use helix_core::{
syntax::{Loader, QueryIterEvent},
Rope, RopeSlice, Selection, Syntax, Uri,
};
use helix_stdx::{
path,
rope::{self, RopeSliceExt},
};
use helix_view::{
align_view,
document::{from_reader, SCRATCH_BUFFER_NAME},
Align, Document, DocumentId, Editor,
};
use ignore::{DirEntry, WalkBuilder, WalkState};
use crate::{
filter_picker_entry,
ui::{
overlay::overlaid,
picker::{Injector, PathOrId},
Picker, PickerColumn,
},
};
use super::Context;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
enum TagKind {
Class,
Constant,
Function,
Interface,
Macro,
Module,
Struct,
Type,
}
impl TagKind {
fn as_str(&self) -> &'static str {
match self {
Self::Class => "class",
Self::Constant => "constant",
Self::Function => "function",
Self::Interface => "interface",
Self::Macro => "macro",
Self::Module => "module",
Self::Struct => "struct",
Self::Type => "type",
}
}
fn from_name(name: &str) -> Option<Self> {
match name {
"class" => Some(TagKind::Class),
"constant" => Some(TagKind::Constant),
"function" => Some(TagKind::Function),
"interface" => Some(TagKind::Interface),
"macro" => Some(TagKind::Macro),
"module" => Some(TagKind::Module),
"struct" => Some(TagKind::Struct),
"type" => Some(TagKind::Type),
_ => None,
}
}
}
// NOTE: Uri is cheap to clone and DocumentId is Copy
#[derive(Debug, Clone)]
enum UriOrDocumentId {
Uri(Uri),
Id(DocumentId),
}
impl UriOrDocumentId {
fn path_or_id(&self) -> Option<PathOrId<'_>> {
match self {
Self::Id(id) => Some(PathOrId::Id(*id)),
Self::Uri(uri) => uri.as_path().map(PathOrId::Path),
}
}
}
#[derive(Debug)]
struct Tag {
kind: TagKind,
name: String,
start: usize,
end: usize,
start_line: usize,
end_line: usize,
doc: UriOrDocumentId,
}
fn tags_iter<'a>(
syntax: &'a Syntax,
loader: &'a Loader,
text: RopeSlice<'a>,
doc: UriOrDocumentId,
pattern: Option<&'a rope::Regex>,
) -> impl Iterator<Item = Tag> + 'a {
let mut tags_iter = syntax.tags(text, loader, ..);
iter::from_fn(move || loop {
let QueryIterEvent::Match(mat) = tags_iter.next()? else {
continue;
};
let query = &loader
.tag_query(tags_iter.current_language())
.expect("must have a tags query to emit matches")
.query;
let Some(kind) = query
.capture_name(mat.capture)
.strip_prefix("definition.")
.and_then(TagKind::from_name)
else {
continue;
};
let range = mat.node.byte_range();
if pattern.is_some_and(|pattern| {
!pattern.is_match(text.regex_input_at_bytes(range.start as usize..range.end as usize))
}) {
continue;
}
let start = text.byte_to_char(range.start as usize);
let end = text.byte_to_char(range.end as usize);
return Some(Tag {
kind,
name: text.slice(start..end).to_string(),
start,
end,
start_line: text.char_to_line(start),
end_line: text.char_to_line(end),
doc: doc.clone(),
});
})
}
pub fn syntax_symbol_picker(cx: &mut Context) {
let doc = doc!(cx.editor);
let Some(syntax) = doc.syntax() else {
cx.editor
.set_error("Syntax tree is not available on this buffer");
return;
};
let doc_id = doc.id();
let text = doc.text().slice(..);
let loader = cx.editor.syn_loader.load();
let tags = tags_iter(syntax, &loader, text, UriOrDocumentId::Id(doc.id()), None);
let columns = vec![
PickerColumn::new("kind", |tag: &Tag, _| tag.kind.as_str().into()),
PickerColumn::new("name", |tag: &Tag, _| tag.name.as_str().into()),
];
let picker = Picker::new(
columns,
1, // name
tags,
(),
move |cx, tag, action| {
cx.editor.switch(doc_id, action);
let view = view_mut!(cx.editor);
let doc = doc_mut!(cx.editor, &doc_id);
doc.set_selection(view.id, Selection::single(tag.start, tag.end));
if action.align_view(view, doc.id()) {
align_view(doc, view, Align::Center)
}
},
)
.with_preview(|_editor, tag| {
Some((tag.doc.path_or_id()?, Some((tag.start_line, tag.end_line))))
})
.truncate_start(false);
cx.push_layer(Box::new(overlaid(picker)));
}
pub fn syntax_workspace_symbol_picker(cx: &mut Context) {
#[derive(Debug)]
struct SearchState {
searcher_builder: SearcherBuilder,
walk_builder: WalkBuilder,
regex_matcher_builder: RegexMatcherBuilder,
rope_regex_builder: rope::RegexBuilder,
search_root: PathBuf,
/// A cache of files that have been parsed in prior searches.
syntax_cache: DashMap<PathBuf, Option<(Rope, Syntax)>>,
}
let mut searcher_builder = SearcherBuilder::new();
searcher_builder.binary_detection(BinaryDetection::quit(b'\x00'));
// Search from the workspace that the currently focused document is within. This behaves like global
// search most of the time but helps when you have two projects open in splits.
let search_root = if let Some(path) = doc!(cx.editor).path() {
helix_loader::find_workspace_in(path).0
} else {
helix_loader::find_workspace().0
};
let absolute_root = search_root
.canonicalize()
.unwrap_or_else(|_| search_root.clone());
let config = cx.editor.config();
let dedup_symlinks = config.file_picker.deduplicate_links;
let mut walk_builder = WalkBuilder::new(&search_root);
walk_builder
.hidden(config.file_picker.hidden)
.parents(config.file_picker.parents)
.ignore(config.file_picker.ignore)
.follow_links(config.file_picker.follow_symlinks)
.git_ignore(config.file_picker.git_ignore)
.git_global(config.file_picker.git_global)
.git_exclude(config.file_picker.git_exclude)
.max_depth(config.file_picker.max_depth)
.filter_entry(move |entry| filter_picker_entry(entry, &absolute_root, dedup_symlinks))
.add_custom_ignore_filename(helix_loader::config_dir().join("ignore"))
.add_custom_ignore_filename(".helix/ignore");
let mut regex_matcher_builder = RegexMatcherBuilder::new();
regex_matcher_builder.case_smart(config.search.smart_case);
let mut rope_regex_builder = rope::RegexBuilder::new();
rope_regex_builder.syntax(rope::Config::new().case_insensitive(config.search.smart_case));
let state = SearchState {
searcher_builder,
walk_builder,
regex_matcher_builder,
rope_regex_builder,
search_root,
syntax_cache: DashMap::default(),
};
let reg = cx.register.unwrap_or('/');
cx.editor.registers.last_search_register = reg;
let columns = vec![
PickerColumn::new("kind", |tag: &Tag, _| tag.kind.as_str().into()),
PickerColumn::new("name", |tag: &Tag, _| tag.name.as_str().into()).without_filtering(),
PickerColumn::new("path", |tag: &Tag, state: &SearchState| {
match &tag.doc {
UriOrDocumentId::Uri(uri) => {
if let Some(path) = uri.as_path() {
let path = if let Ok(stripped) = path.strip_prefix(&state.search_root) {
stripped
} else {
path
};
path.to_string_lossy().into()
} else {
uri.to_string().into()
}
}
// This picker only uses `Id` for scratch buffers for better display.
UriOrDocumentId::Id(_) => SCRATCH_BUFFER_NAME.into(),
}
}),
];
let get_tags = |query: &str,
editor: &mut Editor,
state: Arc<SearchState>,
injector: &Injector<_, _>| {
if query.len() < 3 {
return async { Ok(()) }.boxed();
}
// Attempt to find the tag in any open documents.
let pattern = match state.rope_regex_builder.build(query) {
Ok(pattern) => pattern,
Err(err) => return async { Err(anyhow::anyhow!(err)) }.boxed(),
};
let loader = editor.syn_loader.load();
for doc in editor.documents() {
let Some(syntax) = doc.syntax() else { continue };
let text = doc.text().slice(..);
let uri_or_id = doc
.uri()
.map(UriOrDocumentId::Uri)
.unwrap_or_else(|| UriOrDocumentId::Id(doc.id()));
for tag in tags_iter(syntax, &loader, text.slice(..), uri_or_id, Some(&pattern)) {
if injector.push(tag).is_err() {
return async { Ok(()) }.boxed();
}
}
}
if !state.search_root.exists() {
return async { Err(anyhow::anyhow!("Current working directory does not exist")) }
.boxed();
}
let matcher = match state.regex_matcher_builder.build(query) {
Ok(matcher) => {
// Clear any "Failed to compile regex" errors out of the statusline.
editor.clear_status();
matcher
}
Err(err) => {
log::info!(
"Failed to compile search pattern in workspace symbol search: {}",
err
);
return async { Err(anyhow::anyhow!("Failed to compile regex")) }.boxed();
}
};
let pattern = Arc::new(pattern);
let injector = injector.clone();
let loader = editor.syn_loader.load();
let documents: HashSet<_> = editor
.documents()
.filter_map(Document::path)
.cloned()
.collect();
async move {
let searcher = state.searcher_builder.build();
state.walk_builder.build_parallel().run(|| {
let mut searcher = searcher.clone();
let matcher = matcher.clone();
let injector = injector.clone();
let loader = loader.clone();
let documents = &documents;
let pattern = pattern.clone();
let syntax_cache = &state.syntax_cache;
Box::new(move |entry: Result<DirEntry, ignore::Error>| -> WalkState {
let entry = match entry {
Ok(entry) => entry,
Err(_) => return WalkState::Continue,
};
match entry.file_type() {
Some(entry) if entry.is_file() => {}
// skip everything else
_ => return WalkState::Continue,
};
let path = entry.path();
// If this document is open, skip it because we've already processed it above.
if documents.contains(path) {
return WalkState::Continue;
};
let mut quit = false;
let sink = sinks::UTF8(|_line, _content| {
if !syntax_cache.contains_key(path) {
// Read the file into a Rope and attempt to recognize the language
// and parse it with tree-sitter. Save the Rope and Syntax for future
// queries.
syntax_cache.insert(path.to_path_buf(), syntax_for_path(path, &loader));
};
let entry = syntax_cache.get(path).unwrap();
let Some((text, syntax)) = entry.value() else {
// If the file couldn't be parsed, move on.
return Ok(false);
};
let uri = Uri::from(path::normalize(path));
for tag in tags_iter(
syntax,
&loader,
text.slice(..),
UriOrDocumentId::Uri(uri),
Some(&pattern),
) {
if injector.push(tag).is_err() {
quit = true;
break;
}
}
// Quit after seeing the first regex match. We only care to find files
// that contain the pattern and then we run the tags query within
// those. The location and contents of a match are irrelevant - it's
// only important _if_ a file matches.
Ok(false)
});
if let Err(err) = searcher.search_path(&matcher, path, sink) {
log::info!("Workspace syntax search error: {}, {}", path.display(), err);
}
if quit {
WalkState::Quit
} else {
WalkState::Continue
}
})
});
Ok(())
}
.boxed()
};
let picker = Picker::new(
columns,
1, // name
[],
state,
move |cx, tag, action| {
let doc_id = match &tag.doc {
UriOrDocumentId::Id(id) => *id,
UriOrDocumentId::Uri(uri) => match cx.editor.open(uri.as_path().expect(""), action) {
Ok(id) => id,
Err(e) => {
cx.editor
.set_error(format!("Failed to open file '{uri:?}': {e}"));
return;
}
}
};
let doc = doc_mut!(cx.editor, &doc_id);
let view = view_mut!(cx.editor);
let len_chars = doc.text().len_chars();
if tag.start >= len_chars || tag.end > len_chars {
cx.editor.set_error("The location you jumped to does not exist anymore because the file has changed.");
return;
}
doc.set_selection(view.id, Selection::single(tag.start, tag.end));
if action.align_view(view, doc.id()) {
align_view(doc, view, Align::Center)
}
},
)
.with_dynamic_query(get_tags, Some(275))
.with_preview(move |_editor, tag| {
Some((
tag.doc.path_or_id()?,
Some((tag.start_line, tag.end_line)),
))
})
.truncate_start(false);
cx.push_layer(Box::new(overlaid(picker)));
}
/// Create a Rope and language config for a given existing path without creating a full Document.
fn syntax_for_path(path: &Path, loader: &Loader) -> Option<(Rope, Syntax)> {
let mut file = std::fs::File::open(path).ok()?;
let (rope, _encoding, _has_bom) = from_reader(&mut file, None).ok()?;
let text = rope.slice(..);
let language = loader
.language_for_filename(path)
.or_else(|| loader.language_for_shebang(text))?;
Syntax::new(text, language, loader)
.ok()
.map(|syntax| (rope, syntax))
}

View File

@@ -12,11 +12,17 @@ pub enum TsFeature {
Highlight,
TextObject,
AutoIndent,
Tags,
}
impl TsFeature {
pub fn all() -> &'static [Self] {
&[Self::Highlight, Self::TextObject, Self::AutoIndent]
&[
Self::Highlight,
Self::TextObject,
Self::AutoIndent,
Self::Tags,
]
}
pub fn runtime_filename(&self) -> &'static str {
@@ -24,6 +30,7 @@ impl TsFeature {
Self::Highlight => "highlights.scm",
Self::TextObject => "textobjects.scm",
Self::AutoIndent => "indents.scm",
Self::Tags => "tags.scm",
}
}
@@ -32,6 +39,7 @@ impl TsFeature {
Self::Highlight => "Syntax Highlighting",
Self::TextObject => "Treesitter Textobjects",
Self::AutoIndent => "Auto Indent",
Self::Tags => "Code Navigation Tags",
}
}
@@ -40,6 +48,7 @@ impl TsFeature {
Self::Highlight => "Highlight",
Self::TextObject => "Textobject",
Self::AutoIndent => "Indent",
Self::Tags => "Tags",
}
}
}

View File

@@ -227,8 +227,8 @@ pub fn default() -> HashMap<Mode, KeyTrie> {
"E" => file_explorer_in_current_buffer_directory,
"b" => buffer_picker,
"j" => jumplist_picker,
"s" => symbol_picker,
"S" => workspace_symbol_picker,
"s" => lsp_or_syntax_symbol_picker,
"S" => lsp_or_syntax_workspace_symbol_picker,
"d" => diagnostics_picker,
"D" => workspace_diagnostics_picker,
"g" => changed_file_picker,

View File

@@ -46,7 +46,7 @@ chardetng = "0.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml.workspace = true
toml = "0.8"
log = "~0.4"
parking_lot.workspace = true

View File

@@ -109,7 +109,7 @@ impl InlineDiagnosticsConfig {
impl Default for InlineDiagnosticsConfig {
fn default() -> Self {
InlineDiagnosticsConfig {
cursor_line: DiagnosticFilter::Enable(Severity::Warning),
cursor_line: DiagnosticFilter::Disable,
other_lines: DiagnosticFilter::Disable,
min_diagnostic_width: 40,
prefix_len: 1,

View File

@@ -1032,7 +1032,7 @@ impl Default for Config {
indent_heuristic: IndentationHeuristic::default(),
jump_label_alphabet: ('a'..='z').collect(),
inline_diagnostics: InlineDiagnosticsConfig::default(),
end_of_line_diagnostics: DiagnosticFilter::Enable(Severity::Hint),
end_of_line_diagnostics: DiagnosticFilter::Disable,
clipboard_provider: ClipboardProvider::default(),
editor_config: true,
}

View File

@@ -2046,7 +2046,10 @@ roots = ["rebar.config"]
shebangs = ["escript"]
comment-token = "%%"
indent = { tab-width = 4, unit = " " }
language-servers = [ "erlang-ls", "elp" ]
language-servers = [
{ name = "erlang-ls", except-features = ["document-symbols", "workspace-symbols"] },
{ name = "elp", except-features = ["document-symbols", "workspace-symbols"] }
]
[[grammar]]
name = "erlang"
@@ -3541,16 +3544,6 @@ block-comment-tokens = { start = "{#", end = "#}" }
name = "jinja2"
source = { git = "https://github.com/varpeti/tree-sitter-jinja2", rev = "a533cd3c33aea6acb0f9bf9a56f35dcfe6a8eb53" }
[[language]]
name = "jjconfig"
scope = "source.jjconfig"
injection-regex = "jjconfig"
grammar = "toml"
file-types = [{ glob = "jj/config.toml" }, { glob = "jj/conf.d/*.toml" }, { glob = ".jj/repo/*.toml" }]
comment-token = "#"
language-servers = [ "taplo", "tombi" ]
indent = { tab-width = 2, unit = " " }
[[language]]
name = "jjdescription"
scope = "jj.description"
@@ -3564,24 +3557,6 @@ text-width = 72
name = "jjdescription"
source = { git = "https://github.com/kareigu/tree-sitter-jjdescription", rev = "1613b8c85b6ead48464d73668f39910dcbb41911" }
[[language]]
name = "jjrevset"
scope = "jj.revset"
file-types = ["jjrevset"]
[[grammar]]
name = "jjrevset"
source = { git = "https://github.com/bryceberger/tree-sitter-jjrevset", rev = "d9af23944b884ec528b505f41d81923bb3136a51" }
[[language]]
name = "jjtemplate"
scope = "jj.template"
file-types = ["jjtemplate"]
[[grammar]]
name = "jjtemplate"
source = { git = "https://github.com/bryceberger/tree-sitter-jjtemplate", rev = "4313eda8ac31c60e550e3ad5841b100a0a686715" }
[[language]]
name = "jq"
scope = "source.jq"

View File

@@ -19,5 +19,3 @@
(invocation_expression function: (member_access_expression name: (identifier) @name)) @reference.send
(namespace_declaration name: (identifier) @name) @definition.module
(namespace_declaration name: (identifier) @name) @module

View File

@@ -0,0 +1,9 @@
(function_declarator
declarator: [(identifier) (field_identifier)] @definition.function)
(preproc_function_def name: (identifier) @definition.function)
(type_definition
declarator: (type_identifier) @definition.type)
(preproc_def name: (identifier) @definition.constant)

View File

@@ -0,0 +1,12 @@
; inherits: c
(function_declarator
declarator: (qualified_identifier name: (identifier) @definition.function))
(struct_specifier
name: (type_identifier) @definition.struct
body: (field_declaration_list))
(class_specifier
name: (type_identifier) @definition.class
body: (field_declaration_list))

View File

@@ -0,0 +1,54 @@
; Definitions
; * modules and protocols
(call
target: (identifier) @ignore
(arguments (alias) @name)
(#any-of? @ignore "defmodule" "defprotocol")) @definition.module
; * functions/macros
(call
target: (identifier) @ignore
(arguments
[
; zero-arity functions with no parentheses
(identifier) @name
; regular function clause
(call target: (identifier) @name)
; function clause with a guard clause
(binary_operator
left: (call target: (identifier) @name)
operator: "when")
])
(#any-of? @ignore "def" "defp" "defdelegate" "defguard" "defguardp" "defmacro" "defmacrop" "defn" "defnp")) @definition.function
; References
; ignore calls to kernel/special-forms keywords
(call
target: (identifier) @ignore
(#any-of? @ignore "def" "defp" "defdelegate" "defguard" "defguardp" "defmacro" "defmacrop" "defn" "defnp" "defmodule" "defprotocol" "defimpl" "defstruct" "defexception" "defoverridable" "alias" "case" "cond" "else" "for" "if" "import" "quote" "raise" "receive" "require" "reraise" "super" "throw" "try" "unless" "unquote" "unquote_splicing" "use" "with"))
; ignore module attributes
(unary_operator
operator: "@"
operand: (call
target: (identifier) @ignore))
; * function call
(call
target: [
; local
(identifier) @name
; remote
(dot
right: (identifier) @name)
]) @reference.call
; * pipe into function call
(binary_operator
operator: "|>"
right: (identifier) @name) @reference.call
; * modules
(alias) @name @reference.module

View File

@@ -0,0 +1,45 @@
; Modules
(attribute
name: (atom) @_attr
(arguments (atom) @definition.module)
(#eq? @_attr "module"))
; Constants
((attribute
name: (atom) @_attr
(arguments
.
[
(atom) @definition.constant
(call function: [(variable) (atom)] @definition.macro)
]))
(#eq? @_attr "define"))
; Record definitions
((attribute
name: (atom) @_attr
(arguments
.
(atom) @definition.struct))
(#eq? @_attr "record"))
; Function specs
((attribute
name: (atom) @_attr
(stab_clause name: (atom) @definition.interface))
(#eq? @_attr "spec"))
; Types
((attribute
name: (atom) @_attr
(arguments
(binary_operator
left: [
(atom) @definition.type
(call function: (atom) @definition.type)
]
operator: "::")))
(#any-of? @_attr "type" "opaque"))
; Functions
(function_clause name: (atom) @definition.function)

View File

@@ -2,4 +2,4 @@
(function_definition (name) @name) @definition.function
(call (name) @name) @reference.call
(call (identifier) @name) @reference.call

View File

@@ -4,7 +4,7 @@
(function_declaration
name: (identifier) @name) @definition.function
(#strip! @doc "^//\\s*")
(#set-adjacent! @doc @definition.function)
(#select-adjacent! @doc @definition.function)
)
(
@@ -13,7 +13,7 @@
(method_declaration
name: (field_identifier) @name) @definition.method
(#strip! @doc "^//\\s*")
(#set-adjacent! @doc @definition.method)
(#select-adjacent! @doc @definition.method)
)
(call_expression

View File

@@ -1 +0,0 @@
; inherits: toml

View File

@@ -1 +0,0 @@
; inherits: toml

View File

@@ -1,10 +0,0 @@
((comment) @injection.content
(#set! injection.language "comment"))
(table
(bare_key) @table-name (#any-of? @table-name "templates" "template-aliases")
[(pair (_) ((string) @injection.content (#set! injection.language "jjtemplate"))) (comment)]*)
(table
(bare_key) @table-name (#any-of? @table-name "revsets" "revset-aliases")
[(pair (_) ((string) @injection.content (#set! injection.language "jjrevset"))) (comment)]*)

View File

@@ -1 +0,0 @@
; inherits: toml

View File

@@ -1,18 +0,0 @@
(at_op) @variable.builtin
[
"::" ".."
(negate_op)
(union_op) (intersection_op) (difference_op)
] @operator
["(" ")"] @punctuation.bracket
"," @punctuation.delimiter
[(raw_string_literal) (string_literal)] @string
(function ((strict_identifier) @function))
(function (function_arguments (keyword_argument (strict_identifier) @variable.parameter)))
(primary ((identifier) @variable))
(string_pattern (strict_identifier) @keyword)

View File

@@ -1,14 +0,0 @@
(function ((identifier) @function))
; method calls
(term (_) ("." @punctuation) ((function ((identifier) @function.method))))
["(" ")"] @punctuation.bracket
"," @punctuation.delimiter
((identifier) @keyword.control.conditional (#eq? @keyword.control.conditional "if"))
((identifier) @keyword.control.repeat (#eq? @keyword.control.repeat "for"))
(term ((identifier) @variable))
[(infix_ops) "++"] @operator
[(string_literal) (raw_string_literal)] @string

View File

@@ -0,0 +1,2 @@
; TODO: have symbol types for markup?
(atx_heading) @definition.class

View File

@@ -0,0 +1,26 @@
(struct_item
name: (type_identifier) @definition.struct)
(const_item
name: (identifier) @definition.constant)
(trait_item
name: (type_identifier) @definition.interface)
(function_item
name: (identifier) @definition.function)
(function_signature_item
name: (identifier) @definition.function)
(enum_item
name: (type_identifier) @definition.type)
(enum_variant
name: (identifier) @definition.struct)
(mod_item
name: (identifier) @definition.module)
(macro_definition
name: (identifier) @definition.macro)

View File

@@ -0,0 +1,6 @@
; should be a heading
(heading (text) @definition.class)
; should be a label/reference/tag
(heading (label) @definition.function)
(content (label) @definition.function)

View File

@@ -36,7 +36,6 @@
"ui.virtual.indent-guide" = { fg = "black" } # Vertical indent width guides
"ui.virtual.inlay-hint" = { fg = "comment", bg = "bg2" } # Default style for inlay hints of all kinds
"ui.virtual.jump-label" = { fg = "blue", modifiers = ["bold"] } # Style for virtual jump labels
"ui.virtual.wrap" = { fg = "fg3" } # Soft-wrap indicator.
"ui.statusline" = { fg = "fg2", bg = "bg0" } # Status line.
"ui.statusline.inactive" = { fg = "fg3", bg = "bg0" } # Status line in unfocused windows.

View File

@@ -9,9 +9,9 @@
"ui.selection" = { bg = "#304a3d" }
"ui.selection.primary" = { bg = "#2f2f2f" }
"comment" = { fg = "comment" }
"comment.block.documentation" = { fg = "comment", modifiers = ["bold"] }
"comment.line.documentation" = { fg = "comment", modifiers = ["bold"] }
"ui.virtual.inlay-hint" = { fg = "#9f9f9f" }
"comment.block.documentation" = { fg = "black", modifiers = ["bold"] }
"comment.line.documentation" = { fg = "black", modifiers = ["bold"] }
"ui.statusline" = { bg = "statusbg", fg = "#ccdc90" }
"ui.statusline.inactive" = { fg = '#2e3330', bg = '#88b090' }
"ui.cursor" = { fg = "#000d18", bg = "#8faf9f", modifiers = ["bold"] }

View File

@@ -16,4 +16,4 @@ helix-term = { path = "../helix-term" }
helix-core = { path = "../helix-core" }
helix-view = { path = "../helix-view" }
helix-loader = { path = "../helix-loader" }
toml.workspace = true
toml = "0.8"

View File

@@ -36,6 +36,7 @@ pub mod tasks {
let grammar = syntax_config.grammar;
LanguageData::compile_indent_query(grammar, config)?;
LanguageData::compile_textobject_query(grammar, config)?;
LanguageData::compile_tag_query(grammar, config)?;
}
println!("Query check succeeded");