mirror of
https://github.com/helix-editor/helix.git
synced 2025-10-06 08:23:27 +02:00
Compare commits
48 Commits
snippet_pl
...
25.01
Author | SHA1 | Date | |
---|---|---|---|
|
dabfb6ceea | ||
|
9dcc1f06b0 | ||
|
eaa7c8e9f6 | ||
|
4817bfa003 | ||
|
e0bccd2c58 | ||
|
38e8382b01 | ||
|
c9cc14728f | ||
|
b1759f998d | ||
|
4a59f68a0d | ||
|
2b4a77b9bf | ||
|
41763b4851 | ||
|
bbeb99dc40 | ||
|
9cc056e755 | ||
|
6d07ae4f07 | ||
|
073efe48f9 | ||
|
127567df8e | ||
|
4b288e4de7 | ||
|
19c91dfb80 | ||
|
a5a7cff311 | ||
|
7b9b9329b9 | ||
|
c262fe41ab | ||
|
a074129f9c | ||
|
eda96cc285 | ||
|
c63616b421 | ||
|
faf0eee3c9 | ||
|
a2b241eb08 | ||
|
0fd4a4aae2 | ||
|
9e77c44b38 | ||
|
ea17b9edb7 | ||
|
4f63a46e14 | ||
|
ac4c017165 | ||
|
b946b21b01 | ||
|
ba6e6dc3dd | ||
|
a91263d604 | ||
|
06d0f33c94 | ||
|
eaff0c3cd6 | ||
|
1e9412269a | ||
|
355e381626 | ||
|
cbc06d1f15 | ||
|
9e4da4b950 | ||
|
13e5a2ee5a | ||
|
0134bb7063 | ||
|
ec65cc4913 | ||
|
91a5d407da | ||
|
6eb186eb7b | ||
|
1980bd5992 | ||
|
cc3b77b584 | ||
|
fcded6ce1e |
242
CHANGELOG.md
242
CHANGELOG.md
@@ -1,3 +1,245 @@
|
||||
<!--
|
||||
# YY.0M (YYYY-0M-0D)
|
||||
|
||||
Breaking changes:
|
||||
|
||||
Features:
|
||||
|
||||
Commands:
|
||||
|
||||
Usability improvements:
|
||||
|
||||
Fixes:
|
||||
|
||||
Themes:
|
||||
|
||||
New languages:
|
||||
|
||||
Updated languages and queries:
|
||||
|
||||
Packaging:
|
||||
-->
|
||||
|
||||
# 25.01 (2025-01-03)
|
||||
|
||||
As always, a big thank you to all of the contributors! This release saw changes from 171 contributors.
|
||||
|
||||
Features:
|
||||
|
||||
* Big refactor for `Picker`s ([#9647](https://github.com/helix-editor/helix/pull/9647), [#11209](https://github.com/helix-editor/helix/pull/11209), [#11216](https://github.com/helix-editor/helix/pull/11216), [#11211](https://github.com/helix-editor/helix/pull/11211), [#11343](https://github.com/helix-editor/helix/pull/11343), [#11406](https://github.com/helix-editor/helix/pull/11406))
|
||||
* Use a table layout and allow filtering by column
|
||||
* Reimplement `global_search` to allow changing the query dynamically
|
||||
* Add an alternative "inline" display for LSP diagnostics ([#6417](https://github.com/helix-editor/helix/pull/6417), [#11815](https://github.com/helix-editor/helix/pull/11815))
|
||||
* Support defining keybindings as macros ([#4709](https://github.com/helix-editor/helix/pull/4709))
|
||||
* Continue line comments in `o`/`O` and on `<ret>` in insert mode ([#10996](https://github.com/helix-editor/helix/pull/10996), [#12213](https://github.com/helix-editor/helix/pull/12213), [#12215](https://github.com/helix-editor/helix/pull/12215))
|
||||
* Allow configuring and switching clipboard providers at runtime ([#10839](https://github.com/helix-editor/helix/pull/10839), [b855cd0](https://github.com/helix-editor/helix/commit/b855cd0), [467fad5](https://github.com/helix-editor/helix/commit/467fad5), [191b0f0](https://github.com/helix-editor/helix/commit/191b0f0))
|
||||
* Add support for path completion ([#2608](https://github.com/helix-editor/helix/pull/2608))
|
||||
* Support bindings with the Super (Cwd/Win/Meta) modifier ([#6592](https://github.com/helix-editor/helix/pull/6592))
|
||||
* Support rendering and jumping between tabstops in snippet completions ([#9801](https://github.com/helix-editor/helix/pull/9801))
|
||||
* Allow theming directory completions ([#12205](https://github.com/helix-editor/helix/pull/12205), [#12295](https://github.com/helix-editor/helix/pull/12295))
|
||||
|
||||
Commands:
|
||||
|
||||
* Add commands to move within snake_case or camelCase words ([#8147](https://github.com/helix-editor/helix/pull/8147))
|
||||
* Add `search_selection_detect_word_boundaries` ([#12126](https://github.com/helix-editor/helix/pull/12126))
|
||||
* This command takes the `*` key in normal and select mode, replacing `search_selection` which was moved to `A-*`.
|
||||
|
||||
Usability improvements:
|
||||
|
||||
* Add `:edit` and `:e` aliases for `:open` ([#11186](https://github.com/helix-editor/helix/pull/11186), [#11196](https://github.com/helix-editor/helix/pull/11196))
|
||||
* Trim trailing newline from pipe command outputs when the input doesn't have a trailing newline ([#11183](https://github.com/helix-editor/helix/pull/11183), [4f63a46](https://github.com/helix-editor/helix/commit/4f63a46))
|
||||
* Add `:mv` alias for `:move` ([#11256](https://github.com/helix-editor/helix/pull/11256))
|
||||
* Return document display name instead of absolute path from the `%` special register ([#11275](https://github.com/helix-editor/helix/pull/11275))
|
||||
* Track view position on a per-view instead of per-document basis ([#10559](https://github.com/helix-editor/helix/pull/10559))
|
||||
* Improve scrolloff calculation to leave a gap in the middle ([#11323](https://github.com/helix-editor/helix/pull/11323))
|
||||
* Show a popup for stderr printed by failed `:sh` commands ([#11239](https://github.com/helix-editor/helix/pull/11239))
|
||||
* Add statusline errors when nothing is selected with `s`, `K`, `A-K` ([#11370](https://github.com/helix-editor/helix/pull/11370))
|
||||
* Add `.svn` as a workspace root marker ([#11429](https://github.com/helix-editor/helix/pull/11429))
|
||||
* Trim the end of `:sh` outputs ([#11161](https://github.com/helix-editor/helix/pull/11161))
|
||||
* Show LSP `window/showMessage` messages in the statusline ([#5535](https://github.com/helix-editor/helix/pull/5535))
|
||||
* Support finding workspace directories via `.jj` directories ([#11685](https://github.com/helix-editor/helix/pull/11685))
|
||||
* Join single-line comments with `join_selections` (`J`) ([#11742](https://github.com/helix-editor/helix/pull/11742))
|
||||
* Show anonymous syntax tree nodes in `:tree-sitter-subtree` ([#11663](https://github.com/helix-editor/helix/pull/11663), [38e8382](https://github.com/helix-editor/helix/commit/38e8382))
|
||||
* Save an undo checkpoint before paste in insert mode ([#8121](https://github.com/helix-editor/helix/pull/8121))
|
||||
* Only break on ASCII spaces in `:reflow` ([#12048](https://github.com/helix-editor/helix/pull/12048))
|
||||
* Add a `default-yank-register` config option ([#11430](https://github.com/helix-editor/helix/pull/11430))
|
||||
* Show a statusline error for `:format` when a formatter is not available ([#12183](https://github.com/helix-editor/helix/pull/12183))
|
||||
* Change to the home directory with `:cd` with no arguments ([#12042](https://github.com/helix-editor/helix/pull/12042))
|
||||
* Change default comment token to `#` for unrecognized files ([#12080](https://github.com/helix-editor/helix/pull/12080), [#12266](https://github.com/helix-editor/helix/pull/12266), [bae6a58](https://github.com/helix-editor/helix/commit/bae6a58))
|
||||
* Trim all trailing whitespace on `insert_newline` ([#12177](https://github.com/helix-editor/helix/pull/12177))
|
||||
* Change to the prior directory with `:cd -` ([#12194](https://github.com/helix-editor/helix/pull/12194))
|
||||
* Allow parsing `-` (with no modifiers) as a keybinding ([#12191](https://github.com/helix-editor/helix/pull/12191))
|
||||
* Improve opening statusline and error messages when opening duplicate files or directories ([#12199](https://github.com/helix-editor/helix/pull/12199))
|
||||
* Trim trailing colons in paths passed on the argv ([#9963](https://github.com/helix-editor/helix/pull/9963))
|
||||
* Show tree-sitter parser availability in `hx --health <lang>` ([#12228](https://github.com/helix-editor/helix/pull/12228))
|
||||
* Show a preview block for colors in the LSP completion menu ([#12299](https://github.com/helix-editor/helix/pull/12299))
|
||||
* Add infobox help for `surround_add`, `surround_replace` and `surround_delete` ([#12262](https://github.com/helix-editor/helix/pull/12262))
|
||||
|
||||
Fixes:
|
||||
|
||||
* Respect document indentation settings in `format_selections` (`=`) ([#11169](https://github.com/helix-editor/helix/pull/11169))
|
||||
* Avoid switching the current document to normal mode during an LSP `workspace/applyEdit` operation ([#11176](https://github.com/helix-editor/helix/pull/11176))
|
||||
* Fix off-by-one in LSP `find_completion_range` ([#11266](https://github.com/helix-editor/helix/pull/11266))
|
||||
* Prefer file-system mtime to local system time for detecting external modifications ([#11142](https://github.com/helix-editor/helix/pull/11142), [#11352](https://github.com/helix-editor/helix/pull/11352), [#11358](https://github.com/helix-editor/helix/pull/11358), [#11361](https://github.com/helix-editor/helix/pull/11361))
|
||||
* Fix writing of hardlinks ([#11340](https://github.com/helix-editor/helix/pull/11340))
|
||||
* Prevent language servers from being automatically restarted when stopped with `:lsp-stop` ([#11321](https://github.com/helix-editor/helix/pull/11321))
|
||||
* Stable-sort LSP text edits ([#11357](https://github.com/helix-editor/helix/pull/11357))
|
||||
* Fix determination of current language layer in documents with nested language injections ([#11365](https://github.com/helix-editor/helix/pull/11365))
|
||||
* Fix a panic from `:move`ing a file to a new extension which starts a language server ([#11387](https://github.com/helix-editor/helix/pull/11387))
|
||||
* Fix a panic from duplicating the diff gutter ([#11092](https://github.com/helix-editor/helix/pull/11092))
|
||||
* Keep cursor position when exactly replacing text ([#5930](https://github.com/helix-editor/helix/pull/5930))
|
||||
* Fix a panic from `jump_backward` on a newly opened split ([#11508](https://github.com/helix-editor/helix/pull/11508))
|
||||
* Fix a panic from language servers sending an unknown diagnostic severity ([#11569](https://github.com/helix-editor/helix/pull/11569))
|
||||
* Fix a panic when drawing at the edge of the screen ([#11737](https://github.com/helix-editor/helix/pull/11737))
|
||||
* Fix git repo detection on symlinks ([#11732](https://github.com/helix-editor/helix/pull/11732))
|
||||
* Fix a panic from a language server sending an out-of-range active signature index in `textDocument/signatureHelp` ([#11825](https://github.com/helix-editor/helix/pull/11825))
|
||||
* Fix a panic from using `C-k` in a prompt ending in a multi-byte character ([#12237](https://github.com/helix-editor/helix/pull/12237))
|
||||
* Expand tildes in paths passed to `:read` ([#12271](https://github.com/helix-editor/helix/pull/12271))
|
||||
* Respect per-language `workspace-lsp-roots` configuration when opening new documents ([#12223](https://github.com/helix-editor/helix/pull/12223))
|
||||
* Consistently replace line-endings in paste/replace commands ([c262fe4](https://github.com/helix-editor/helix/commit/c262fe4))
|
||||
* Fix formatting in error statusline messages when inspecting variables in DAP ([#12354](https://github.com/helix-editor/helix/pull/12354))
|
||||
* Fix invisible printing of headers in `--health` output on light terminals ([#12355](https://github.com/helix-editor/helix/pull/12355))
|
||||
* Accept integers serialized as floats in the JSONRPC `id` field ([#12376](https://github.com/helix-editor/helix/pull/12376))
|
||||
|
||||
Themes:
|
||||
|
||||
* Bring `kanagawa` colors better in line with neovim version ([#11187](https://github.com/helix-editor/helix/pull/11187), [#11270](https://github.com/helix-editor/helix/pull/11270))
|
||||
* Add `ao` ([#11063](https://github.com/helix-editor/helix/pull/11063))
|
||||
* Update `dark_plus` ([#11415](https://github.com/helix-editor/helix/pull/11415))
|
||||
* Add `iceberg-light` and `iceberg-dark` ([#10674](https://github.com/helix-editor/helix/pull/10674))
|
||||
* Update everforest themes ([#11459](https://github.com/helix-editor/helix/pull/11459))
|
||||
* Update gruvbox themes ([#11477](https://github.com/helix-editor/helix/pull/11477))
|
||||
* Change primary selection cursor color for `naysayer` ([#11617](https://github.com/helix-editor/helix/pull/11617))
|
||||
* Style picker column names in `horizon-dark` ([#11649](https://github.com/helix-editor/helix/pull/11649))
|
||||
* Style picker column names in Darcula themes ([#11649](https://github.com/helix-editor/helix/pull/11649))
|
||||
* Update diagnostics colors in `snazzy` ([#11731](https://github.com/helix-editor/helix/pull/11731))
|
||||
* Update bogster themes ([#11353](https://github.com/helix-editor/helix/pull/11353))
|
||||
* Highlight `keyword.storage` in `onedark` ([#11802](https://github.com/helix-editor/helix/pull/11802))
|
||||
* Add `ui.virtual.jump-label` to `serika-dark` ([#11911](https://github.com/helix-editor/helix/pull/11911))
|
||||
* Add `adwaita-light` ([#10869](https://github.com/helix-editor/helix/pull/10869))
|
||||
* Add seoul256 themes ([#11466](https://github.com/helix-editor/helix/pull/11466))
|
||||
* Add yo themes ([#11703](https://github.com/helix-editor/helix/pull/11703))
|
||||
* Add `eiffel` ([#11679](https://github.com/helix-editor/helix/pull/11679))
|
||||
* Add `carbonfox` ([#11558](https://github.com/helix-editor/helix/pull/11558))
|
||||
* Set tags color in monokai themes ([#11917](https://github.com/helix-editor/helix/pull/11917))
|
||||
* Improve readability of spacebones picker selection ([#12064](https://github.com/helix-editor/helix/pull/12064))
|
||||
* Update modus themes ([#11949](https://github.com/helix-editor/helix/pull/11949))
|
||||
* Use bold for statusline mode indicator in `onedarker` ([#11958](https://github.com/helix-editor/helix/pull/11958))
|
||||
* Update hex themes, add a new hex theme ([#10849](https://github.com/helix-editor/helix/pull/10849))
|
||||
* Add `sunset` ([#12093](https://github.com/helix-editor/helix/pull/12093))
|
||||
* Add bufferline highlighting for flexoki themes ([#12146](https://github.com/helix-editor/helix/pull/12146))
|
||||
* Add colors for (un)checked list items to catppuccin themes ([#12167](https://github.com/helix-editor/helix/pull/12167))
|
||||
* Update `voxed` ([#9328](https://github.com/helix-editor/helix/pull/9328))
|
||||
* Add `vintage` ([#9361](https://github.com/helix-editor/helix/pull/9361))
|
||||
* Add directory style to everforest themes ([#12287](https://github.com/helix-editor/helix/pull/12287))
|
||||
* Add inactive text and update jump label highlights in `dark_plus` ([#12289](https://github.com/helix-editor/helix/pull/12289))
|
||||
* Sync changes with catppuccin themes ([#12304](https://github.com/helix-editor/helix/pull/12304))
|
||||
* Add `ui.text.directory` to `nightfox` ([#12328](https://github.com/helix-editor/helix/pull/12328))
|
||||
* Add `ui.text.directory` to `sunset` ([#12328](https://github.com/helix-editor/helix/pull/12328))
|
||||
* Add `diagnostic.unnecessary` to Catppuccin themes ([#12391](https://github.com/helix-editor/helix/pull/12391))
|
||||
|
||||
New languages:
|
||||
|
||||
* `jjdescription` ([#11271](https://github.com/helix-editor/helix/pull/11271), [#11857](https://github.com/helix-editor/helix/pull/11857), [#12305](https://github.com/helix-editor/helix/pull/12305))
|
||||
* i3wm and Sway configs ([#11424](https://github.com/helix-editor/helix/pull/11424))
|
||||
* TypeSpec ([#11412](https://github.com/helix-editor/helix/pull/11412))
|
||||
* jq ([#11393](https://github.com/helix-editor/helix/pull/11393))
|
||||
* Thrift ([#11367](https://github.com/helix-editor/helix/pull/11367))
|
||||
* Gherkin ([#11083](https://github.com/helix-editor/helix/pull/11083))
|
||||
* Circom ([#11676](https://github.com/helix-editor/helix/pull/11676))
|
||||
* Dune ([#11829](https://github.com/helix-editor/helix/pull/11829))
|
||||
* Snakemake ([#11858](https://github.com/helix-editor/helix/pull/11858), [#11936](https://github.com/helix-editor/helix/pull/11936))
|
||||
* Cylc ([#11830](https://github.com/helix-editor/helix/pull/11830))
|
||||
* textproto ([#11874](https://github.com/helix-editor/helix/pull/11874))
|
||||
* Spade ([#11448](https://github.com/helix-editor/helix/pull/11448), [#12276](https://github.com/helix-editor/helix/pull/12276))
|
||||
* NestedText ([#11987](https://github.com/helix-editor/helix/pull/11987))
|
||||
* Quint ([#11898](https://github.com/helix-editor/helix/pull/11898))
|
||||
* Amber-lang ([#12021](https://github.com/helix-editor/helix/pull/12021))
|
||||
* Vento ([#12147](https://github.com/helix-editor/helix/pull/12147))
|
||||
* Teal ([#12081](https://github.com/helix-editor/helix/pull/12081))
|
||||
* Koto ([#12307](https://github.com/helix-editor/helix/pull/12307))
|
||||
* NGINX ([#12309](https://github.com/helix-editor/helix/pull/12309))
|
||||
|
||||
Updated languages and queries:
|
||||
|
||||
* Add comment injections for Hare ([#11173](https://github.com/helix-editor/helix/pull/11173))
|
||||
* Improve highlights for `blade.php` files ([#11138](https://github.com/helix-editor/helix/pull/11138))
|
||||
* Update tree-sitter-slint ([#11224](https://github.com/helix-editor/helix/pull/11224), [#11757](https://github.com/helix-editor/helix/pull/11757), [#12297](https://github.com/helix-editor/helix/pull/12297))
|
||||
* Recognize `just` files as Just ([#11286](https://github.com/helix-editor/helix/pull/11286))
|
||||
* Recognize `mdx` as Markdown ([#11122](https://github.com/helix-editor/helix/pull/11122))
|
||||
* Update Just grammar and queries ([#11306](https://github.com/helix-editor/helix/pull/11306))
|
||||
* Recognize `tclsh` as TCL ([#11236](https://github.com/helix-editor/helix/pull/11236))
|
||||
* Update Godot grammar and queries ([#11235](https://github.com/helix-editor/helix/pull/11235))
|
||||
* Update Gleam grammar and queries ([#11427](https://github.com/helix-editor/helix/pull/11427))
|
||||
* Add `mesonlsp` for Meson ([#11416](https://github.com/helix-editor/helix/pull/11416))
|
||||
* Update HTML highlights ([#11400](https://github.com/helix-editor/helix/pull/11400))
|
||||
* Add comment textobjects for Verilog ([#11388](https://github.com/helix-editor/helix/pull/11388))
|
||||
* Switch tree-sitter-just grammar ([#11380](https://github.com/helix-editor/helix/pull/11380), [#11606](https://github.com/helix-editor/helix/pull/11606), [#12141](https://github.com/helix-editor/helix/pull/12141))
|
||||
* Update tree-sitter-fsharp ([#11061](https://github.com/helix-editor/helix/pull/11061))
|
||||
* Add `nixd` for Nix ([#10767](https://github.com/helix-editor/helix/pull/10767))
|
||||
* Highlight types and enum members from the Rust prelude ([#8535](https://github.com/helix-editor/helix/pull/8535))
|
||||
* Improve textobjects for HCL, Nix ([#11513](https://github.com/helix-editor/helix/pull/11513))
|
||||
* Add textobjects queries for docker-compose, dockerfile, env, git-config, hcl, hocon, prisma, SQL and YAML ([#11513](https://github.com/helix-editor/helix/pull/11513))
|
||||
* Recognize cshtml files as HTML ([#11540](https://github.com/helix-editor/helix/pull/11540))
|
||||
* Set a memory limit for the Lean language server ([#11683](https://github.com/helix-editor/helix/pull/11683))
|
||||
* Add configurations for jedi and ruff language servers ([#11630](https://github.com/helix-editor/helix/pull/11630))
|
||||
* Update Vue highlights ([#11706](https://github.com/helix-editor/helix/pull/11706))
|
||||
* Switch tree-sitter-hcl grammar ([#11749](https://github.com/helix-editor/helix/pull/11749))
|
||||
* Fix `odinfmt` formatter configuration ([#11759](https://github.com/helix-editor/helix/pull/11759))
|
||||
* Recognize `rbs` files as Ruby ([#11786](https://github.com/helix-editor/helix/pull/11786))
|
||||
* Update tree-sitter-nickel ([#11771](https://github.com/helix-editor/helix/pull/11771))
|
||||
* Recognize `ldtk` and `ldtkl` files as JSON ([#11793](https://github.com/helix-editor/helix/pull/11793))
|
||||
* Fix highlights for builtin functions in Fish ([#11792](https://github.com/helix-editor/helix/pull/11792))
|
||||
* Add `superhtml` for HTML ([#11609](https://github.com/helix-editor/helix/pull/11609))
|
||||
* Add a configuration for the Vale language server ([#11636](https://github.com/helix-editor/helix/pull/11636))
|
||||
* Add Erlang Language Platform (`elp`) for Erlang ([#11499](https://github.com/helix-editor/helix/pull/11499))
|
||||
* Update Odin highlights ([#11804](https://github.com/helix-editor/helix/pull/11804))
|
||||
* Remove auto-pairs for single quotes in SML ([#11838](https://github.com/helix-editor/helix/pull/11838))
|
||||
* Add `glsl_analyzer` for GLSL ([#11891](https://github.com/helix-editor/helix/pull/11891))
|
||||
* Recognize `.prettierrc` as YAML ([#11997](https://github.com/helix-editor/helix/pull/11997))
|
||||
* Fix `swift-format` formatter configuration ([#12052](https://github.com/helix-editor/helix/pull/12052))
|
||||
* Add `package.json` and `tsconfig.json` as JS/TS workspace roots ([#10652](https://github.com/helix-editor/helix/pull/10652))
|
||||
* Add "INVARIANT" to comment error highlights ([#12094](https://github.com/helix-editor/helix/pull/12094))
|
||||
* Update Rescript grammar and queries ([#11165](https://github.com/helix-editor/helix/pull/11165))
|
||||
* Update tree-sitter-nasm ([#11795](https://github.com/helix-editor/helix/pull/11795))
|
||||
* Update LLVM grammars ([#11851](https://github.com/helix-editor/helix/pull/11851))
|
||||
* Update Perl and Pod grammars ([#11848](https://github.com/helix-editor/helix/pull/11848))
|
||||
* Add Nim injections in Nix ([#11837](https://github.com/helix-editor/helix/pull/11837))
|
||||
* Recognize `livemd` as Markdown ([#12034](https://github.com/helix-editor/helix/pull/12034))
|
||||
* Update Unison grammar and queries ([#12039](https://github.com/helix-editor/helix/pull/12039))
|
||||
* Turn off Swift auto-format by default ([#12071](https://github.com/helix-editor/helix/pull/12071))
|
||||
* Recognize `.swift-format` as JSON ([#12071](https://github.com/helix-editor/helix/pull/12071))
|
||||
* Recognize `.clangd` and `.clang-format` as YAML ([#12032](https://github.com/helix-editor/helix/pull/12032))
|
||||
* Recognize `ssh_config.d/*.conf` as sshclientconfig ([#11947](https://github.com/helix-editor/helix/pull/11947))
|
||||
* Update comment token configs for Zig ([#12049](https://github.com/helix-editor/helix/pull/12049))
|
||||
* Update tree-sitter-bicep ([#11525](https://github.com/helix-editor/helix/pull/11525))
|
||||
* Add `hyperls` for Hyperlang ([#11056](https://github.com/helix-editor/helix/pull/11056))
|
||||
* Add highlight queries for Solidity ([#12102](https://github.com/helix-editor/helix/pull/12102))
|
||||
* Recognize `WORKSPACE.bzlmod` as Starlark ([#12103](https://github.com/helix-editor/helix/pull/12103))
|
||||
* Update Ada grammar and queries ([#12131](https://github.com/helix-editor/helix/pull/12131))
|
||||
* Restrict Hocon file-types glob patterns ([#12156](https://github.com/helix-editor/helix/pull/12156))
|
||||
* Update Mojo language server to Magic ([#12195](https://github.com/helix-editor/helix/pull/12195))
|
||||
* Switch tree-sitter-v grammar ([#12236](https://github.com/helix-editor/helix/pull/12236))
|
||||
* Add "COMPLIANCE" to comment error highlights ([#12094](https://github.com/helix-editor/helix/pull/12094))
|
||||
* Add a language server configuration for `ltex-ls-plus` ([#12251](https://github.com/helix-editor/helix/pull/12251))
|
||||
* Update tree-sitter-dockerfile ([#12230](https://github.com/helix-editor/helix/pull/12230))
|
||||
* Add `]` to PHP outdents ([#12286](https://github.com/helix-editor/helix/pull/12286))
|
||||
* Add textobjects for Odin ([#12302](https://github.com/helix-editor/helix/pull/12302))
|
||||
* Update tree-sitter-heex and queries ([#12334](https://github.com/helix-editor/helix/pull/12334))
|
||||
* Update protobuf highlights ([#12339](https://github.com/helix-editor/helix/pull/12339))
|
||||
* Switch tree-sitter-query (TSQ) grammar ([#12148](https://github.com/helix-editor/helix/pull/12148), [e0bccd2](https://github.com/helix-editor/helix/commit/e0bccd2))
|
||||
* Add block comment configurations for jinja and nunjucks ([#12348](https://github.com/helix-editor/helix/pull/12348))
|
||||
* Add `uv` shebang for python ([#12360](https://github.com/helix-editor/helix/pull/12360))
|
||||
* Update tree-sitter-vento ([#12368](https://github.com/helix-editor/helix/pull/12368))
|
||||
* Switch Protobuf tree-sitter grammar ([#12225](https://github.com/helix-editor/helix/pull/12225))
|
||||
* Recognize `hypr/*.conf` as Hyprland ([#12384](https://github.com/helix-editor/helix/pull/12384))
|
||||
|
||||
Packaging:
|
||||
|
||||
* Add completions for Nushell ([#11262](https://github.com/helix-editor/helix/pull/11262), [#11346](https://github.com/helix-editor/helix/pull/11346))
|
||||
* Fix completion of flags in Bash completions ([#11246](https://github.com/helix-editor/helix/pull/11246))
|
||||
* Include shell completions in Nix outputs ([#11518](https://github.com/helix-editor/helix/pull/11518))
|
||||
|
||||
# 24.07 (2024-07-14)
|
||||
|
||||
Thanks to all of the contributors! This release has changes from 160 contributors.
|
||||
|
280
Cargo.lock
generated
280
Cargo.lock
generated
@@ -68,9 +68,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.94"
|
||||
version = "1.0.95"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7"
|
||||
checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04"
|
||||
|
||||
[[package]]
|
||||
name = "arc-swap"
|
||||
@@ -136,9 +136,9 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.2.4"
|
||||
version = "1.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf"
|
||||
checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333"
|
||||
dependencies = [
|
||||
"shlex",
|
||||
]
|
||||
@@ -319,6 +319,12 @@ dependencies = [
|
||||
"encoding_rs",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_home"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe"
|
||||
|
||||
[[package]]
|
||||
name = "equivalent"
|
||||
version = "1.0.1"
|
||||
@@ -479,9 +485,9 @@ checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
|
||||
|
||||
[[package]]
|
||||
name = "gix"
|
||||
version = "0.68.0"
|
||||
version = "0.69.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b04c66359b5e17f92395abc433861df0edf48f39f3f590818d1d7217327dd6a1"
|
||||
checksum = "8d0eebdaecdcf405d5433a36f85e4f058cf4de48ee2604388be0dbccbaad353e"
|
||||
dependencies = [
|
||||
"gix-actor",
|
||||
"gix-attributes",
|
||||
@@ -506,11 +512,13 @@ dependencies = [
|
||||
"gix-pack",
|
||||
"gix-path",
|
||||
"gix-pathspec",
|
||||
"gix-protocol",
|
||||
"gix-ref",
|
||||
"gix-refspec",
|
||||
"gix-revision",
|
||||
"gix-revwalk",
|
||||
"gix-sec",
|
||||
"gix-shallow",
|
||||
"gix-status",
|
||||
"gix-submodule",
|
||||
"gix-tempfile",
|
||||
@@ -522,7 +530,7 @@ dependencies = [
|
||||
"gix-worktree",
|
||||
"once_cell",
|
||||
"smallvec",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -535,7 +543,7 @@ dependencies = [
|
||||
"gix-date",
|
||||
"gix-utils",
|
||||
"itoa",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
@@ -552,7 +560,7 @@ dependencies = [
|
||||
"gix-trace",
|
||||
"kstring",
|
||||
"smallvec",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
"unicode-bom",
|
||||
]
|
||||
|
||||
@@ -562,7 +570,7 @@ version = "0.2.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d48b897b4bbc881aea994b4a5bbb340a04979d7be9089791304e04a9fbc66b53"
|
||||
dependencies = [
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -571,14 +579,14 @@ version = "0.4.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c6ffbeb3a5c0b8b84c3fe4133a6f8c82fa962f4caefe8d0762eced025d3eb4f7"
|
||||
dependencies = [
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-command"
|
||||
version = "0.3.11"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d7d6b8f3a64453fd7e8191eb80b351eb7ac0839b40a1237cd2c137d5079fe53"
|
||||
checksum = "9405c0a56e17f8365a46870cd2c7db71323ecc8bda04b50cb746ea37bd091e90"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-path",
|
||||
@@ -597,7 +605,7 @@ dependencies = [
|
||||
"gix-features",
|
||||
"gix-hash",
|
||||
"memmap2",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -616,7 +624,7 @@ dependencies = [
|
||||
"memchr",
|
||||
"once_cell",
|
||||
"smallvec",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
"unicode-bom",
|
||||
"winnow",
|
||||
]
|
||||
@@ -631,26 +639,26 @@ dependencies = [
|
||||
"bstr",
|
||||
"gix-path",
|
||||
"libc",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-date"
|
||||
version = "0.9.2"
|
||||
version = "0.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "691142b1a34d18e8ed6e6114bc1a2736516c5ad60ef3aa9bd1b694886e3ca92d"
|
||||
checksum = "c57c477b645ee248b173bb1176b52dd528872f12c50375801a58aaf5ae91113f"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"itoa",
|
||||
"jiff",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-diff"
|
||||
version = "0.48.0"
|
||||
version = "0.49.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a327be31a392144b60ab0b1c863362c32a1c8f7effdfa2141d5d5b6b916ef3bf"
|
||||
checksum = "a8e92566eccbca205a0a0f96ffb0327c061e85bc5c95abbcddfe177498aa04f6"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-command",
|
||||
@@ -664,14 +672,14 @@ dependencies = [
|
||||
"gix-traverse",
|
||||
"gix-worktree",
|
||||
"imara-diff",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-dir"
|
||||
version = "0.10.0"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "acd6a0618958f9cce78a32724f8e06c4f4a57ca7080f645736d53676dc9b4db9"
|
||||
checksum = "fba2ffbcf4bd34438e8a8367ccbc94870549903d1f193a14f47eb6b0967e1293"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-discover",
|
||||
@@ -684,7 +692,7 @@ dependencies = [
|
||||
"gix-trace",
|
||||
"gix-utils",
|
||||
"gix-worktree",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -700,7 +708,7 @@ dependencies = [
|
||||
"gix-path",
|
||||
"gix-ref",
|
||||
"gix-sec",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -718,15 +726,15 @@ dependencies = [
|
||||
"once_cell",
|
||||
"prodash",
|
||||
"sha1_smol",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
"walkdir",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-filter"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5108cc58d58b27df10ac4de7f31b2eb96d588a33e5eba23739b865f5d8db7995"
|
||||
checksum = "3d0ecdee5667f840ba20c7fe56d63f8e1dc1e6b3bfd296151fe5ef07c874790a"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"encoding_rs",
|
||||
@@ -740,14 +748,14 @@ dependencies = [
|
||||
"gix-trace",
|
||||
"gix-utils",
|
||||
"smallvec",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-fs"
|
||||
version = "0.12.0"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34740384d8d763975858fa2c176b68652a6fcc09f616e24e3ce967b0d370e4d8"
|
||||
checksum = "3b3d4fac505a621f97e5ce2c69fdc425742af00c0920363ca4074f0eb48b1db9"
|
||||
dependencies = [
|
||||
"fastrand",
|
||||
"gix-features",
|
||||
@@ -773,7 +781,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b5eccc17194ed0e67d49285e4853307e4147e95407f91c1c3e4a13ba9f4e4ce"
|
||||
dependencies = [
|
||||
"faster-hex",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -825,7 +833,7 @@ dependencies = [
|
||||
"memmap2",
|
||||
"rustix",
|
||||
"smallvec",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -841,9 +849,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gix-object"
|
||||
version = "0.46.0"
|
||||
version = "0.46.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "65d93e2bbfa83a307e47f45e45de7b6c04d7375a8bd5907b215f4bf45237d879"
|
||||
checksum = "e42d58010183ef033f31088479b4eb92b44fe341b35b62d39eb8b185573d77ea"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-actor",
|
||||
@@ -851,19 +859,20 @@ dependencies = [
|
||||
"gix-features",
|
||||
"gix-hash",
|
||||
"gix-hashtable",
|
||||
"gix-path",
|
||||
"gix-utils",
|
||||
"gix-validate",
|
||||
"itoa",
|
||||
"smallvec",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-odb"
|
||||
version = "0.65.0"
|
||||
version = "0.66.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93bed6e1b577c25a6bb8e6ecbf4df525f29a671ddf5f2221821a56a8dbeec4e3"
|
||||
checksum = "cb780eceb3372ee204469478de02eaa34f6ba98247df0186337e0333de97d0ae"
|
||||
dependencies = [
|
||||
"arc-swap",
|
||||
"gix-date",
|
||||
@@ -877,14 +886,14 @@ dependencies = [
|
||||
"gix-quote",
|
||||
"parking_lot",
|
||||
"tempfile",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-pack"
|
||||
version = "0.55.0"
|
||||
version = "0.56.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b91fec04d359544fecbb8e85117ec746fbaa9046ebafcefb58cb74f20dc76d4"
|
||||
checksum = "4158928929be29cae7ab97afc8e820a932071a7f39d8ba388eed2380c12c566c"
|
||||
dependencies = [
|
||||
"clru",
|
||||
"gix-chunk",
|
||||
@@ -895,7 +904,19 @@ dependencies = [
|
||||
"gix-path",
|
||||
"memmap2",
|
||||
"smallvec",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-packetline"
|
||||
version = "0.18.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "911aeea8b2dabeed2f775af9906152a1f0109787074daf9e64224e3892dde453"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"faster-hex",
|
||||
"gix-trace",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -907,7 +928,7 @@ dependencies = [
|
||||
"bstr",
|
||||
"faster-hex",
|
||||
"gix-trace",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -920,7 +941,7 @@ dependencies = [
|
||||
"gix-trace",
|
||||
"home",
|
||||
"once_cell",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -935,7 +956,26 @@ dependencies = [
|
||||
"gix-config-value",
|
||||
"gix-glob",
|
||||
"gix-path",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-protocol"
|
||||
version = "0.47.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c84642e8b6fed7035ce9cc449593019c55b0ec1af7a5dce1ab8a0636eaaeb067"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-date",
|
||||
"gix-features",
|
||||
"gix-hash",
|
||||
"gix-ref",
|
||||
"gix-shallow",
|
||||
"gix-transport",
|
||||
"gix-utils",
|
||||
"maybe-async",
|
||||
"thiserror 2.0.9",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -946,14 +986,14 @@ checksum = "64a1e282216ec2ab2816cd57e6ed88f8009e634aec47562883c05ac8a7009a63"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-utils",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-ref"
|
||||
version = "0.49.0"
|
||||
version = "0.49.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1eae462723686272a58f49501015ef7c0d67c3e042c20049d8dd9c7eff92efde"
|
||||
checksum = "a91b61776c839d0f1b7114901179afb0947aa7f4d30793ca1c56d335dfef485f"
|
||||
dependencies = [
|
||||
"gix-actor",
|
||||
"gix-features",
|
||||
@@ -966,7 +1006,7 @@ dependencies = [
|
||||
"gix-utils",
|
||||
"gix-validate",
|
||||
"memmap2",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
@@ -981,14 +1021,14 @@ dependencies = [
|
||||
"gix-revision",
|
||||
"gix-validate",
|
||||
"smallvec",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-revision"
|
||||
version = "0.31.0"
|
||||
version = "0.31.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44488e0380847967bc3e3cacd8b22652e02ea1eb58afb60edd91847695cd2d8d"
|
||||
checksum = "61e1ddc474405a68d2ce8485705dd72fe6ce959f2f5fe718601ead5da2c8f9e7"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-commitgraph",
|
||||
@@ -996,7 +1036,7 @@ dependencies = [
|
||||
"gix-hash",
|
||||
"gix-object",
|
||||
"gix-revwalk",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1011,7 +1051,7 @@ dependencies = [
|
||||
"gix-hashtable",
|
||||
"gix-object",
|
||||
"smallvec",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1027,10 +1067,22 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-status"
|
||||
version = "0.15.0"
|
||||
name = "gix-shallow"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "201396192ee4c4dd9e8a84fed4b0d2b33d639fca815fb99b0f653dfeddf38585"
|
||||
checksum = "88d2673242e87492cb6ff671f0c01f689061ca306c4020f137197f3abc84ce01"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-hash",
|
||||
"gix-lock",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-status"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1665770e277608bd6b0eaf86adbf6cb3ffc6fb97749e7bc6f9318ac5f37564df"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"filetime",
|
||||
@@ -1046,7 +1098,7 @@ dependencies = [
|
||||
"gix-pathspec",
|
||||
"gix-worktree",
|
||||
"portable-atomic",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1061,7 +1113,7 @@ dependencies = [
|
||||
"gix-pathspec",
|
||||
"gix-refspec",
|
||||
"gix-url",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1085,10 +1137,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "04bdde120c29f1fc23a24d3e115aeeea3d60d8e65bab92cc5f9d90d9302eb952"
|
||||
|
||||
[[package]]
|
||||
name = "gix-traverse"
|
||||
version = "0.43.0"
|
||||
name = "gix-transport"
|
||||
version = "0.44.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ff2ec9f779680f795363db1c563168b32b8d6728ec58564c628e85c92d29faf"
|
||||
checksum = "dd04d91e507a8713cfa2318d5a85d75b36e53a40379cc7eb7634ce400ecacbaf"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-command",
|
||||
"gix-features",
|
||||
"gix-packetline",
|
||||
"gix-quote",
|
||||
"gix-sec",
|
||||
"gix-url",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-traverse"
|
||||
version = "0.43.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ed47d648619e23e93f971d2bba0d10c1100e54ef95d2981d609907a8cabac89"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"gix-commitgraph",
|
||||
@@ -1098,19 +1166,20 @@ dependencies = [
|
||||
"gix-object",
|
||||
"gix-revwalk",
|
||||
"smallvec",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gix-url"
|
||||
version = "0.28.1"
|
||||
version = "0.28.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e09f97db3618fb8e473d7d97e77296b50aaee0ddcd6a867f07443e3e87391099"
|
||||
checksum = "d096fb733ba6bd3f5403dba8bd72bdd8809fe2b347b57844040b8f49c93492d9"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"gix-features",
|
||||
"gix-path",
|
||||
"thiserror 2.0.7",
|
||||
"percent-encoding",
|
||||
"thiserror 2.0.9",
|
||||
"url",
|
||||
]
|
||||
|
||||
@@ -1132,7 +1201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cd520d09f9f585b34b32aba1d0b36ada89ab7fefb54a8ca3fe37fc482a750937"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1216,7 +1285,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "helix-core"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"anyhow",
|
||||
@@ -1257,7 +1326,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "helix-dap"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"fern",
|
||||
@@ -1266,13 +1335,13 @@ dependencies = [
|
||||
"log",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "helix-event"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"anyhow",
|
||||
@@ -1286,7 +1355,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "helix-loader"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cc",
|
||||
@@ -1305,7 +1374,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "helix-lsp"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
@@ -1322,7 +1391,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
"slotmap",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
]
|
||||
@@ -1340,11 +1409,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "helix-parsec"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "helix-stdx"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"dunce",
|
||||
@@ -1361,7 +1430,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "helix-term"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
@@ -1397,7 +1466,7 @@ dependencies = [
|
||||
"smallvec",
|
||||
"tempfile",
|
||||
"termini",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"toml",
|
||||
@@ -1406,7 +1475,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "helix-tui"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cassowary",
|
||||
@@ -1422,7 +1491,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "helix-vcs"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
@@ -1438,7 +1507,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "helix-view"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"arc-swap",
|
||||
@@ -1464,7 +1533,7 @@ dependencies = [
|
||||
"serde_json",
|
||||
"slotmap",
|
||||
"tempfile",
|
||||
"thiserror 2.0.7",
|
||||
"thiserror 2.0.9",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"toml",
|
||||
@@ -1760,9 +1829,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.168"
|
||||
version = "0.2.169"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d"
|
||||
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
@@ -1813,6 +1882,17 @@ version = "0.4.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
|
||||
|
||||
[[package]]
|
||||
name = "maybe-async"
|
||||
version = "0.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5cf92c10c7e361d6b99666ec1c6f9805b0bea2c3bd8c78dc6fe98ac5bd78db11"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.7.4"
|
||||
@@ -2167,18 +2247,18 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.216"
|
||||
version = "1.0.217"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
|
||||
checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.216"
|
||||
version = "1.0.217"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
|
||||
checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -2187,9 +2267,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.133"
|
||||
version = "1.0.134"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
|
||||
checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"memchr",
|
||||
@@ -2412,11 +2492,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "2.0.7"
|
||||
version = "2.0.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93605438cbd668185516ab499d589afb7ee1859ea3d5fc8f6b0755e1c7443767"
|
||||
checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc"
|
||||
dependencies = [
|
||||
"thiserror-impl 2.0.7",
|
||||
"thiserror-impl 2.0.9",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2432,9 +2512,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "2.0.7"
|
||||
version = "2.0.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1d8749b4531af2117677a5fcd12b1348a3fe2b81e36e61ffeac5c4aa3273e36"
|
||||
checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -2716,12 +2796,12 @@ checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484"
|
||||
|
||||
[[package]]
|
||||
name = "which"
|
||||
version = "7.0.0"
|
||||
version = "7.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c9cad3279ade7346b96e38731a641d7343dd6a53d55083dd54eadfa5a1b38c6b"
|
||||
checksum = "fb4a9e33648339dc1642b0e36e21b3385e6148e289226f657c809dee59df5028"
|
||||
dependencies = [
|
||||
"either",
|
||||
"home",
|
||||
"env_home",
|
||||
"rustix",
|
||||
"winsafe",
|
||||
]
|
||||
@@ -2943,7 +3023,7 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
|
||||
|
||||
[[package]]
|
||||
name = "xtask"
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
dependencies = [
|
||||
"helix-core",
|
||||
"helix-loader",
|
||||
|
@@ -44,7 +44,7 @@ slotmap = "1.0.7"
|
||||
thiserror = "2.0"
|
||||
|
||||
[workspace.package]
|
||||
version = "24.7.0"
|
||||
version = "25.1.0"
|
||||
edition = "2021"
|
||||
authors = ["Blaž Hrastnik <blaz@mxxn.io>"]
|
||||
categories = ["editor"]
|
||||
|
@@ -442,6 +442,8 @@ fn main() {
|
||||
| `max-wrap` | Equivalent of the `editor.soft-wrap.max-wrap` option for diagnostics. | `20` |
|
||||
| `max-diagnostics` | Maximum number of diagnostics to render inline for a given line | `10` |
|
||||
|
||||
The allowed values for `cursor-line` and `other-lines` are: `error`, `warning`, `info`, `hint`.
|
||||
|
||||
The (first) diagnostic with the highest severity that is not shown inline is rendered at the end of the line (as long as its severity is higher than the `end-of-line-diagnostics` config option):
|
||||
|
||||
```
|
||||
|
@@ -115,6 +115,7 @@
|
||||
| kdl | ✓ | ✓ | ✓ | |
|
||||
| koka | ✓ | | ✓ | `koka` |
|
||||
| kotlin | ✓ | | | `kotlin-language-server` |
|
||||
| koto | ✓ | ✓ | ✓ | `koto-ls` |
|
||||
| latex | ✓ | ✓ | | `texlab` |
|
||||
| ld | ✓ | | ✓ | |
|
||||
| ldif | ✓ | | | |
|
||||
@@ -139,6 +140,7 @@
|
||||
| msbuild | ✓ | | ✓ | |
|
||||
| nasm | ✓ | ✓ | | |
|
||||
| nestedtext | ✓ | ✓ | ✓ | |
|
||||
| nginx | ✓ | | | |
|
||||
| nickel | ✓ | | ✓ | `nls` |
|
||||
| nim | ✓ | ✓ | ✓ | `nimlangserver` |
|
||||
| nix | ✓ | ✓ | | `nil`, `nixd` |
|
||||
@@ -146,7 +148,7 @@
|
||||
| nunjucks | ✓ | | | |
|
||||
| ocaml | ✓ | | ✓ | `ocamllsp` |
|
||||
| ocaml-interface | ✓ | | | `ocamllsp` |
|
||||
| odin | ✓ | | ✓ | `ols` |
|
||||
| odin | ✓ | ✓ | ✓ | `ols` |
|
||||
| ohm | ✓ | ✓ | ✓ | |
|
||||
| opencl | ✓ | ✓ | ✓ | `clangd` |
|
||||
| openscad | ✓ | | | `openscad-lsp` |
|
||||
@@ -215,7 +217,7 @@
|
||||
| thrift | ✓ | | | |
|
||||
| todotxt | ✓ | | | |
|
||||
| toml | ✓ | ✓ | | `taplo` |
|
||||
| tsq | ✓ | | | |
|
||||
| tsq | ✓ | | | `ts_query_ls` |
|
||||
| tsx | ✓ | ✓ | ✓ | `typescript-language-server` |
|
||||
| twig | ✓ | | | |
|
||||
| typescript | ✓ | ✓ | ✓ | `typescript-language-server` |
|
||||
|
@@ -34,7 +34,7 @@ below.
|
||||
2. Create a new directory for the language with the path
|
||||
`runtime/queries/<name>/`.
|
||||
3. Refer to the
|
||||
[tree-sitter website](https://tree-sitter.github.io/tree-sitter/syntax-highlighting#queries)
|
||||
[tree-sitter website](https://tree-sitter.github.io/tree-sitter/3-syntax-highlighting.html#highlights)
|
||||
for more information on writing queries.
|
||||
4. A list of highlight captures can be found [on the themes page](https://docs.helix-editor.com/themes.html#scopes).
|
||||
|
||||
|
@@ -57,4 +57,4 @@ second argument (a string).
|
||||
- `#any-of?` (standard):
|
||||
The first argument (a capture) must be one of the other arguments (strings).
|
||||
|
||||
[upstream-docs]: http://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection
|
||||
[upstream-docs]: https://tree-sitter.github.io/tree-sitter/3-syntax-highlighting.html#language-injection
|
||||
|
@@ -44,6 +44,6 @@ in its `textobjects.scm` file, function navigation should also work automaticall
|
||||
`function.movement` should be defined only if the node captured by `function.around`
|
||||
doesn't make sense in a navigation context.
|
||||
|
||||
[tree-sitter-queries]: https://tree-sitter.github.io/tree-sitter/using-parsers#query-syntax
|
||||
[tree-sitter-captures]: https://tree-sitter.github.io/tree-sitter/using-parsers#capturing-nodes
|
||||
[tree-sitter-queries]: https://tree-sitter.github.io/tree-sitter/using-parsers/queries/1-syntax.html
|
||||
[tree-sitter-captures]: https://tree-sitter.github.io/tree-sitter/using-parsers/queries/2-operators.html#capturing-nodes
|
||||
[textobject-examples]: https://github.com/search?q=repo%3Ahelix-editor%2Fhelix+path%3A%2A%2A/textobjects.scm&type=Code&ref=advsearch&l=&l=
|
||||
|
@@ -60,7 +60,7 @@ These configuration keys are available:
|
||||
| `shebangs` | The interpreters from the shebang line, for example `["sh", "bash"]` |
|
||||
| `roots` | A set of marker files to look for when trying to find the workspace root. For example `Cargo.lock`, `yarn.lock` |
|
||||
| `auto-format` | Whether to autoformat this language when saving |
|
||||
| `diagnostic-severity` | Minimal severity of diagnostic for it to be displayed. (Allowed values: `Error`, `Warning`, `Info`, `Hint`) |
|
||||
| `diagnostic-severity` | Minimal severity of diagnostic for it to be displayed. (Allowed values: `error`, `warning`, `info`, `hint`) |
|
||||
| `comment-tokens` | The tokens to use as a comment token, either a single token `"//"` or an array `["//", "///", "//!"]` (the first token will be used for commenting). Also configurable as `comment-token` for backwards compatibility|
|
||||
| `block-comment-tokens`| The start and end tokens for a multiline comment either an array or single table of `{ start = "/*", end = "*/"}`. The first set of tokens will be used for commenting, any pairs in the array can be uncommented |
|
||||
| `indent` | The indent to use. Has sub keys `unit` (the text inserted into the document when indenting; usually set to N spaces or `"\t"` for tabs) and `tab-width` (the number of spaces rendered for a tab) |
|
||||
@@ -241,4 +241,4 @@ use-grammars = { except = [ "yaml", "json" ] }
|
||||
|
||||
When omitted, all grammars are fetched and built.
|
||||
|
||||
[treesitter-language-injection]: https://tree-sitter.github.io/tree-sitter/syntax-highlighting#language-injection
|
||||
[treesitter-language-injection]: https://tree-sitter.github.io/tree-sitter/3-syntax-highlighting.html#language-injection
|
||||
|
@@ -121,7 +121,7 @@ brew install helix
|
||||
### MacPorts
|
||||
|
||||
```sh
|
||||
port install helix
|
||||
sudo port install helix
|
||||
```
|
||||
|
||||
## Windows
|
||||
|
@@ -136,7 +136,7 @@ The following is a list of scopes available to use for styling:
|
||||
|
||||
#### Syntax highlighting
|
||||
|
||||
These keys match [tree-sitter scopes](https://tree-sitter.github.io/tree-sitter/syntax-highlighting#theme).
|
||||
These keys match [tree-sitter scopes](https://tree-sitter.github.io/tree-sitter/3-syntax-highlighting.html#highlights).
|
||||
|
||||
When determining styling for a highlight, the longest matching theme key will be used. For example, if the highlight is `function.builtin.static`, the key `function.builtin` will be used instead of `function`.
|
||||
|
||||
@@ -305,6 +305,7 @@ These scopes are used for theming the editor interface:
|
||||
| `ui.text.focus` | The currently selected line in the picker |
|
||||
| `ui.text.inactive` | Same as `ui.text` but when the text is inactive (e.g. suggestions) |
|
||||
| `ui.text.info` | The key: command text in `ui.popup.info` boxes |
|
||||
| `ui.text.directory` | Directory names in prompt completion |
|
||||
| `ui.virtual.ruler` | Ruler columns (see the [`editor.rulers` config][editor-section]) |
|
||||
| `ui.virtual.whitespace` | Visible whitespace characters |
|
||||
| `ui.virtual.indent-guide` | Vertical indent width guides |
|
||||
|
@@ -25,7 +25,7 @@ Inspired by [Kakoune](http://kakoune.org/), Helix follows the `selection → act
|
||||
|
||||
## Multiple selections
|
||||
|
||||
Also inspired by Kakoune, multiple selections are a core mode of interaction in Helix. For example, the standard way of replacing multiple instance of a word is to first select all instances (so there is one selection per instance) and then use the change action (`c`) to edit them all at the same time.
|
||||
Also inspired by Kakoune, multiple selections are a core mode of interaction in Helix. For example, the standard way of replacing multiple instances of a word is to first select all instances (so there is one selection per instance) and then use the change action (`c`) to edit them all at the same time.
|
||||
|
||||
## Motions
|
||||
|
||||
|
@@ -47,6 +47,9 @@
|
||||
<content_rating type="oars-1.1" />
|
||||
|
||||
<releases>
|
||||
<release version="25.01" date="2025-01-03">
|
||||
<url>https://helix-editor.com/news/release-25-01-highlights/</url>
|
||||
</release>
|
||||
<release version="24.07" date="2024-07-14">
|
||||
<url>https://github.com/helix-editor/helix/releases/tag/24.07</url>
|
||||
</release>
|
||||
|
@@ -16,7 +16,7 @@ being published.
|
||||
* Add new `<release>` entry in `contrib/Helix.appdata.xml` with release information according to the [AppStream spec](https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Releases.html)
|
||||
* Tag and push
|
||||
* Switch to master and pull
|
||||
* `git tag -s -m "<tag>" -a <tag> && git push` (note the `-s` which signs the tag)
|
||||
* `git tag -s -m "<tag>" -a <tag> && git push origin <tag>` (note the `-s` which signs the tag)
|
||||
* Wait for the Release CI to finish
|
||||
* It will automatically turn the git tag into a GitHub release when it uploads artifacts
|
||||
* Edit the new release
|
||||
|
@@ -138,6 +138,8 @@
|
||||
cp contrib/helix.png $out/share/icons/hicolor/256x256/apps
|
||||
installShellCompletion contrib/completion/hx.{bash,fish,zsh}
|
||||
'';
|
||||
# set git revision for nix flake builds, see 'git_hash' in helix-loader/build.rs
|
||||
HELIX_NIX_BUILD_REV = self.rev or self.dirtyRev or null;
|
||||
});
|
||||
helix = makeOverridableHelix self.packages.${system}.helix-unwrapped {};
|
||||
default = self.packages.${system}.helix;
|
||||
|
@@ -2666,12 +2666,20 @@ fn node_is_visible(node: &Node) -> bool {
|
||||
node.is_missing() || (node.is_named() && node.language().node_kind_is_visible(node.kind_id()))
|
||||
}
|
||||
|
||||
fn format_anonymous_node_kind(kind: &str) -> Cow<str> {
|
||||
if kind.contains('"') {
|
||||
Cow::Owned(kind.replace('"', "\\\""))
|
||||
} else {
|
||||
Cow::Borrowed(kind)
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
write!(fmt, "({})", node.kind())
|
||||
} else {
|
||||
write!(fmt, "\"{}\"", node.kind())
|
||||
write!(fmt, "\"{}\"", format_anonymous_node_kind(node.kind()))
|
||||
}
|
||||
} else {
|
||||
pretty_print_tree_impl(fmt, &mut node.walk(), 0)
|
||||
@@ -2696,7 +2704,7 @@ fn pretty_print_tree_impl<W: fmt::Write>(
|
||||
|
||||
write!(fmt, "({}", node.kind())?;
|
||||
} else {
|
||||
write!(fmt, " \"{}\"", node.kind())?;
|
||||
write!(fmt, " \"{}\"", format_anonymous_node_kind(node.kind()))?;
|
||||
}
|
||||
|
||||
// Handle children.
|
||||
@@ -2973,8 +2981,8 @@ mod test {
|
||||
" (macro_invocation\n",
|
||||
" macro: (identifier) \"!\"\n",
|
||||
" (token_tree \"(\"\n",
|
||||
" (string_literal \"\"\"\n",
|
||||
" (string_content) \"\"\") \")\")) \";\") \"}\"))",
|
||||
" (string_literal \"\\\"\"\n",
|
||||
" (string_content) \"\\\"\") \")\")) \";\") \"}\"))",
|
||||
),
|
||||
0,
|
||||
source.len(),
|
||||
|
@@ -20,7 +20,8 @@ fn main() {
|
||||
.output()
|
||||
.ok()
|
||||
.filter(|output| output.status.success())
|
||||
.and_then(|x| String::from_utf8(x.stdout).ok());
|
||||
.and_then(|x| String::from_utf8(x.stdout).ok())
|
||||
.or_else(|| option_env!("HELIX_NIX_BUILD_REV").map(|s| s.to_string()));
|
||||
|
||||
let calver = get_calver();
|
||||
let version: Cow<_> = match &git_hash {
|
||||
|
@@ -22,8 +22,8 @@ license = "MIT"
|
||||
|
||||
[dependencies]
|
||||
bitflags = "2.6.0"
|
||||
serde = { version = "1.0.216", features = ["derive"] }
|
||||
serde_json = "1.0.133"
|
||||
serde = { version = "1.0.217", features = ["derive"] }
|
||||
serde_json = "1.0.134"
|
||||
serde_repr = "0.1"
|
||||
url = {version = "2.5.4", features = ["serde"]}
|
||||
|
||||
|
@@ -1,10 +1,9 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
use url::Url;
|
||||
|
||||
use crate::{
|
||||
DynamicRegistrationClientCapabilities, PartialResultParams, Range, SymbolKind, SymbolTag,
|
||||
TextDocumentPositionParams, WorkDoneProgressOptions, WorkDoneProgressParams,
|
||||
TextDocumentPositionParams, Url, WorkDoneProgressOptions, WorkDoneProgressParams,
|
||||
};
|
||||
|
||||
pub type CallHierarchyClientCapabilities = DynamicRegistrationClientCapabilities;
|
||||
|
@@ -1,11 +1,10 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use url::Url;
|
||||
|
||||
use crate::{
|
||||
Diagnostic, PartialResultParams, StaticRegistrationOptions, TextDocumentIdentifier,
|
||||
TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams,
|
||||
TextDocumentRegistrationOptions, Url, WorkDoneProgressOptions, WorkDoneProgressParams,
|
||||
};
|
||||
|
||||
/// Client capabilities specific to diagnostic pull requests.
|
||||
|
@@ -1,10 +1,9 @@
|
||||
use crate::{
|
||||
PartialResultParams, Range, TextDocumentIdentifier, WorkDoneProgressOptions,
|
||||
PartialResultParams, Range, TextDocumentIdentifier, Url, WorkDoneProgressOptions,
|
||||
WorkDoneProgressParams,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
use url::Url;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
@@ -16,8 +16,8 @@ able to parse any URI, such as `urn:isbn:0451450523`.
|
||||
*/
|
||||
#![allow(non_upper_case_globals)]
|
||||
#![forbid(unsafe_code)]
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
|
||||
use bitflags::bitflags;
|
||||
|
||||
use std::{collections::HashMap, fmt::Debug};
|
||||
|
||||
|
@@ -4,9 +4,7 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
use serde_json::Value;
|
||||
|
||||
use url::Url;
|
||||
|
||||
use crate::Range;
|
||||
use crate::{Range, Url};
|
||||
|
||||
#[derive(Eq, PartialEq, Clone, Copy, Deserialize, Serialize)]
|
||||
#[serde(transparent)]
|
||||
|
@@ -1,8 +1,7 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use url::Url;
|
||||
|
||||
use crate::{
|
||||
FullDocumentDiagnosticReport, PartialResultParams, UnchangedDocumentDiagnosticReport,
|
||||
FullDocumentDiagnosticReport, PartialResultParams, UnchangedDocumentDiagnosticReport, Url,
|
||||
WorkDoneProgressParams,
|
||||
};
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use url::Url;
|
||||
|
||||
use crate::OneOf;
|
||||
use crate::{OneOf, Url};
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
@@ -104,10 +104,37 @@ impl std::error::Error for Error {}
|
||||
#[serde(untagged)]
|
||||
pub enum Id {
|
||||
Null,
|
||||
Num(u64),
|
||||
Num(#[serde(deserialize_with = "deserialize_jsonrpc_id_num")] u64),
|
||||
Str(String),
|
||||
}
|
||||
|
||||
fn deserialize_jsonrpc_id_num<'de, D>(deserializer: D) -> Result<u64, D::Error>
|
||||
where
|
||||
D: serde::Deserializer<'de>,
|
||||
{
|
||||
let num = serde_json::Number::deserialize(deserializer)?;
|
||||
|
||||
if let Some(val) = num.as_u64() {
|
||||
return Ok(val);
|
||||
};
|
||||
|
||||
// Accept floats as long as they represent positive whole numbers.
|
||||
// The JSONRPC spec says "Numbers SHOULD NOT contain fractional parts" so we should try to
|
||||
// accept them if possible. The JavaScript type system lumps integers and floats together so
|
||||
// some languages may serialize integer IDs as floats with a zeroed fractional part.
|
||||
// See <https://github.com/helix-editor/helix/issues/12367>.
|
||||
if let Some(val) = num
|
||||
.as_f64()
|
||||
.filter(|f| f.is_sign_positive() && f.fract() == 0.0)
|
||||
{
|
||||
return Ok(val as u64);
|
||||
}
|
||||
|
||||
Err(de::Error::custom(
|
||||
"number must be integer or float representing a whole number in valid u64 range",
|
||||
))
|
||||
}
|
||||
|
||||
impl std::fmt::Display for Id {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
@@ -375,6 +402,22 @@ fn serialize_skip_none_params() {
|
||||
assert_eq!(serialized, r#"{"jsonrpc":"2.0","method":"exit"}"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn id_deserialize() {
|
||||
use serde_json;
|
||||
|
||||
let id = r#"8"#;
|
||||
let deserialized: Id = serde_json::from_str(id).unwrap();
|
||||
assert_eq!(deserialized, Id::Num(8));
|
||||
|
||||
let id = r#"4.0"#;
|
||||
let deserialized: Id = serde_json::from_str(id).unwrap();
|
||||
assert_eq!(deserialized, Id::Num(4));
|
||||
|
||||
let id = r#"0.01"#;
|
||||
assert!(serde_json::from_str::<Id>(id).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn success_output_deserialize() {
|
||||
use serde_json;
|
||||
|
@@ -701,7 +701,11 @@ impl Registry {
|
||||
}
|
||||
|
||||
if let Some((_, client)) = clients.iter().enumerate().find(|(i, client)| {
|
||||
client.try_add_doc(&language_config.roots, root_dirs, doc_path, *i == 0)
|
||||
let manual_roots = language_config
|
||||
.workspace_lsp_roots
|
||||
.as_deref()
|
||||
.unwrap_or(root_dirs);
|
||||
client.try_add_doc(&language_config.roots, manual_roots, doc_path, *i == 0)
|
||||
}) {
|
||||
return Some((name.to_owned(), Ok(client.clone())));
|
||||
}
|
||||
|
@@ -74,7 +74,7 @@ grep-searcher = "0.1.14"
|
||||
|
||||
[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.168"
|
||||
libc = "0.2.169"
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
crossterm = { version = "0.28", features = ["event-stream", "use-dev-tty", "libc"] }
|
||||
|
@@ -129,7 +129,7 @@ pub(crate) fn parse_file(s: &str) -> (PathBuf, Position) {
|
||||
///
|
||||
/// Does not validate if file.rs is a file or directory.
|
||||
fn split_path_row_col(s: &str) -> Option<(PathBuf, Position)> {
|
||||
let mut s = s.rsplitn(3, ':');
|
||||
let mut s = s.trim_end_matches(':').rsplitn(3, ':');
|
||||
let col: usize = s.next()?.parse().ok()?;
|
||||
let row: usize = s.next()?.parse().ok()?;
|
||||
let path = s.next()?.into();
|
||||
@@ -141,7 +141,7 @@ fn split_path_row_col(s: &str) -> Option<(PathBuf, Position)> {
|
||||
///
|
||||
/// Does not validate if file.rs is a file or directory.
|
||||
fn split_path_row(s: &str) -> Option<(PathBuf, Position)> {
|
||||
let (path, row) = s.rsplit_once(':')?;
|
||||
let (path, row) = s.trim_end_matches(':').rsplit_once(':')?;
|
||||
let row: usize = row.parse().ok()?;
|
||||
let path = path.into();
|
||||
let pos = Position::new(row.saturating_sub(1), 0);
|
||||
|
@@ -2183,7 +2183,7 @@ fn searcher(cx: &mut Context, direction: Direction) {
|
||||
completions
|
||||
.iter()
|
||||
.filter(|comp| comp.starts_with(input))
|
||||
.map(|comp| (0.., std::borrow::Cow::Owned(comp.clone())))
|
||||
.map(|comp| (0.., comp.clone().into()))
|
||||
.collect()
|
||||
},
|
||||
move |cx, regex, event| {
|
||||
@@ -4401,6 +4401,8 @@ enum Paste {
|
||||
Cursor,
|
||||
}
|
||||
|
||||
static LINE_ENDING_REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"\r\n|\r|\n").unwrap());
|
||||
|
||||
fn paste_impl(
|
||||
values: &[String],
|
||||
doc: &mut Document,
|
||||
@@ -4417,26 +4419,26 @@ fn paste_impl(
|
||||
doc.append_changes_to_history(view);
|
||||
}
|
||||
|
||||
let repeat = std::iter::repeat(
|
||||
// `values` is asserted to have at least one entry above.
|
||||
values
|
||||
.last()
|
||||
.map(|value| Tendril::from(value.repeat(count)))
|
||||
.unwrap(),
|
||||
);
|
||||
|
||||
// if any of values ends with a line ending, it's linewise paste
|
||||
let linewise = values
|
||||
.iter()
|
||||
.any(|value| get_line_ending_of_str(value).is_some());
|
||||
|
||||
// Only compiled once.
|
||||
static REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"\r\n|\r|\n").unwrap());
|
||||
let mut values = values
|
||||
.iter()
|
||||
.map(|value| REGEX.replace_all(value, doc.line_ending.as_str()))
|
||||
.map(|value| Tendril::from(value.as_ref().repeat(count)))
|
||||
.chain(repeat);
|
||||
let map_value = |value| {
|
||||
let value = LINE_ENDING_REGEX.replace_all(value, doc.line_ending.as_str());
|
||||
let mut out = Tendril::from(value.as_ref());
|
||||
for _ in 1..count {
|
||||
out.push_str(&value);
|
||||
}
|
||||
out
|
||||
};
|
||||
|
||||
let repeat = std::iter::repeat(
|
||||
// `values` is asserted to have at least one entry above.
|
||||
map_value(values.last().unwrap()),
|
||||
);
|
||||
|
||||
let mut values = values.iter().map(|value| map_value(value)).chain(repeat);
|
||||
|
||||
let text = doc.text();
|
||||
let selection = doc.selection(view.id);
|
||||
@@ -4533,19 +4535,24 @@ fn replace_with_yanked_impl(editor: &mut Editor, register: char, count: usize) {
|
||||
else {
|
||||
return;
|
||||
};
|
||||
let values: Vec<_> = values.map(|value| value.to_string()).collect();
|
||||
let scrolloff = editor.config().scrolloff;
|
||||
let (view, doc) = current_ref!(editor);
|
||||
|
||||
let (view, doc) = current!(editor);
|
||||
let repeat = std::iter::repeat(
|
||||
values
|
||||
.last()
|
||||
.map(|value| Tendril::from(&value.repeat(count)))
|
||||
.unwrap(),
|
||||
);
|
||||
let mut values = values
|
||||
.iter()
|
||||
.map(|value| Tendril::from(&value.repeat(count)))
|
||||
let map_value = |value: &Cow<str>| {
|
||||
let value = LINE_ENDING_REGEX.replace_all(value, doc.line_ending.as_str());
|
||||
let mut out = Tendril::from(value.as_ref());
|
||||
for _ in 1..count {
|
||||
out.push_str(&value);
|
||||
}
|
||||
out
|
||||
};
|
||||
let mut values_rev = values.rev().peekable();
|
||||
// `values` is asserted to have at least one entry above.
|
||||
let last = values_rev.peek().unwrap();
|
||||
let repeat = std::iter::repeat(map_value(last));
|
||||
let mut values = values_rev
|
||||
.rev()
|
||||
.map(|value| map_value(&value))
|
||||
.chain(repeat);
|
||||
let selection = doc.selection(view.id);
|
||||
let transaction = Transaction::change_by_selection(doc.text(), selection, |range| {
|
||||
@@ -4555,7 +4562,9 @@ fn replace_with_yanked_impl(editor: &mut Editor, register: char, count: usize) {
|
||||
(range.from(), range.to(), None)
|
||||
}
|
||||
});
|
||||
drop(values);
|
||||
|
||||
let (view, doc) = current!(editor);
|
||||
doc.apply(&transaction, view.id);
|
||||
doc.append_changes_to_history(view);
|
||||
view.ensure_cursor_in_view(doc, scrolloff);
|
||||
@@ -5711,8 +5720,17 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
|
||||
cx.editor.autoinfo = Some(Info::new(title, &help_text));
|
||||
}
|
||||
|
||||
static SURROUND_HELP_TEXT: [(&str, &str); 5] = [
|
||||
("( or )", "Parentheses"),
|
||||
("{ or }", "Curly braces"),
|
||||
("< or >", "Angled brackets"),
|
||||
("[ or ]", "Square brackets"),
|
||||
(" ", "... or any character"),
|
||||
];
|
||||
|
||||
fn surround_add(cx: &mut Context) {
|
||||
cx.on_next_key(move |cx, event| {
|
||||
cx.editor.autoinfo = None;
|
||||
let (view, doc) = current!(cx.editor);
|
||||
// surround_len is the number of new characters being added.
|
||||
let (open, close, surround_len) = match event.char() {
|
||||
@@ -5753,7 +5771,9 @@ fn surround_add(cx: &mut Context) {
|
||||
.with_selection(Selection::new(ranges, selection.primary_index()));
|
||||
doc.apply(&transaction, view.id);
|
||||
exit_select_mode(cx);
|
||||
})
|
||||
});
|
||||
|
||||
cx.editor.autoinfo = Some(Info::new("Surround selections with", &SURROUND_HELP_TEXT));
|
||||
}
|
||||
|
||||
fn surround_replace(cx: &mut Context) {
|
||||
@@ -5785,6 +5805,7 @@ fn surround_replace(cx: &mut Context) {
|
||||
);
|
||||
|
||||
cx.on_next_key(move |cx, event| {
|
||||
cx.editor.autoinfo = None;
|
||||
let (view, doc) = current!(cx.editor);
|
||||
let to = match event.char() {
|
||||
Some(to) => to,
|
||||
@@ -5812,12 +5833,20 @@ fn surround_replace(cx: &mut Context) {
|
||||
doc.apply(&transaction, view.id);
|
||||
exit_select_mode(cx);
|
||||
});
|
||||
})
|
||||
|
||||
cx.editor.autoinfo = Some(Info::new("Replace with a pair of", &SURROUND_HELP_TEXT));
|
||||
});
|
||||
|
||||
cx.editor.autoinfo = Some(Info::new(
|
||||
"Replace surrounding pair of",
|
||||
&SURROUND_HELP_TEXT,
|
||||
));
|
||||
}
|
||||
|
||||
fn surround_delete(cx: &mut Context) {
|
||||
let count = cx.count();
|
||||
cx.on_next_key(move |cx, event| {
|
||||
cx.editor.autoinfo = None;
|
||||
let surround_ch = match event.char() {
|
||||
Some('m') => None, // m selects the closest surround pair
|
||||
Some(ch) => Some(ch),
|
||||
@@ -5840,7 +5869,9 @@ fn surround_delete(cx: &mut Context) {
|
||||
Transaction::change(doc.text(), change_pos.into_iter().map(|p| (p, p + 1, None)));
|
||||
doc.apply(&transaction, view.id);
|
||||
exit_select_mode(cx);
|
||||
})
|
||||
});
|
||||
|
||||
cx.editor.autoinfo = Some(Info::new("Delete surrounding pair of", &SURROUND_HELP_TEXT));
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq)]
|
||||
@@ -6007,7 +6038,7 @@ fn shell(cx: &mut compositor::Context, cmd: &str, behavior: &ShellBehavior) {
|
||||
let input = range.slice(text);
|
||||
match shell_impl(shell, cmd, pipe.then(|| input.into())) {
|
||||
Ok(mut output) => {
|
||||
if !input.ends_with("\n") && !output.is_empty() && output.ends_with('\n') {
|
||||
if !input.ends_with("\n") && output.ends_with('\n') {
|
||||
output.pop();
|
||||
if output.ends_with('\r') {
|
||||
output.pop();
|
||||
|
@@ -518,15 +518,16 @@ pub fn dap_variables(cx: &mut Context) {
|
||||
Some(thread_frame) => thread_frame,
|
||||
None => {
|
||||
cx.editor
|
||||
.set_error("Failed to get stack frame for thread: {thread_id}");
|
||||
.set_error(format!("Failed to get stack frame for thread: {thread_id}"));
|
||||
return;
|
||||
}
|
||||
};
|
||||
let stack_frame = match thread_frame.get(frame) {
|
||||
Some(stack_frame) => stack_frame,
|
||||
None => {
|
||||
cx.editor
|
||||
.set_error("Failed to get stack frame for thread {thread_id} and frame {frame}.");
|
||||
cx.editor.set_error(format!(
|
||||
"Failed to get stack frame for thread {thread_id} and frame {frame}."
|
||||
));
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
@@ -3198,8 +3198,8 @@ pub(super) fn command_mode(cx: &mut Context) {
|
||||
{
|
||||
completer(editor, word)
|
||||
.into_iter()
|
||||
.map(|(range, file)| {
|
||||
let file = shellwords::escape(file);
|
||||
.map(|(range, mut file)| {
|
||||
file.content = shellwords::escape(file.content);
|
||||
|
||||
// offset ranges to input
|
||||
let offset = input.len() - word_len;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
use crate::config::{Config, ConfigLoadError};
|
||||
use crossterm::{
|
||||
style::{Color, Print, Stylize},
|
||||
style::{Color, StyledContent, Stylize},
|
||||
tty::IsTty,
|
||||
};
|
||||
use helix_core::config::{default_lang_config, user_lang_config};
|
||||
@@ -164,25 +164,20 @@ pub fn languages_all() -> std::io::Result<()> {
|
||||
let column_width = terminal_cols as usize / headings.len();
|
||||
let is_terminal = std::io::stdout().is_tty();
|
||||
|
||||
let column = |item: &str, color: Color| {
|
||||
let mut data = format!(
|
||||
"{:width$}",
|
||||
item.get(..column_width - 2)
|
||||
let fit = |s: &str| -> StyledContent<String> {
|
||||
format!(
|
||||
"{:column_width$}",
|
||||
s.get(..column_width - 2)
|
||||
.map(|s| format!("{}…", s))
|
||||
.unwrap_or_else(|| item.to_string()),
|
||||
width = column_width,
|
||||
);
|
||||
if is_terminal {
|
||||
data = data.stylize().with(color).to_string();
|
||||
}
|
||||
|
||||
// We can't directly use println!() because of
|
||||
// https://github.com/crossterm-rs/crossterm/issues/589
|
||||
let _ = crossterm::execute!(std::io::stdout(), Print(data));
|
||||
.unwrap_or_else(|| s.to_string())
|
||||
)
|
||||
.stylize()
|
||||
};
|
||||
let color = |s: StyledContent<String>, c: Color| if is_terminal { s.with(c) } else { s };
|
||||
let bold = |s: StyledContent<String>| if is_terminal { s.bold() } else { s };
|
||||
|
||||
for heading in headings {
|
||||
column(heading, Color::White);
|
||||
write!(stdout, "{}", bold(fit(heading)))?;
|
||||
}
|
||||
writeln!(stdout)?;
|
||||
|
||||
@@ -192,14 +187,14 @@ pub fn languages_all() -> std::io::Result<()> {
|
||||
|
||||
let check_binary = |cmd: Option<&str>| match cmd {
|
||||
Some(cmd) => match helix_stdx::env::which(cmd) {
|
||||
Ok(_) => column(&format!("✓ {}", cmd), Color::Green),
|
||||
Err(_) => column(&format!("✘ {}", cmd), Color::Red),
|
||||
Ok(_) => color(fit(&format!("✓ {}", cmd)), Color::Green),
|
||||
Err(_) => color(fit(&format!("✘ {}", cmd)), Color::Red),
|
||||
},
|
||||
None => column("None", Color::Yellow),
|
||||
None => color(fit("None"), Color::Yellow),
|
||||
};
|
||||
|
||||
for lang in &syn_loader_conf.language {
|
||||
column(&lang.language_id, Color::Reset);
|
||||
write!(stdout, "{}", fit(&lang.language_id))?;
|
||||
|
||||
let mut cmds = lang.language_servers.iter().filter_map(|ls| {
|
||||
syn_loader_conf
|
||||
@@ -207,28 +202,28 @@ pub fn languages_all() -> std::io::Result<()> {
|
||||
.get(&ls.name)
|
||||
.map(|config| config.command.as_str())
|
||||
});
|
||||
check_binary(cmds.next());
|
||||
write!(stdout, "{}", check_binary(cmds.next()))?;
|
||||
|
||||
let dap = lang.debugger.as_ref().map(|dap| dap.command.as_str());
|
||||
check_binary(dap);
|
||||
write!(stdout, "{}", check_binary(dap))?;
|
||||
|
||||
let formatter = lang
|
||||
.formatter
|
||||
.as_ref()
|
||||
.map(|formatter| formatter.command.as_str());
|
||||
check_binary(formatter);
|
||||
write!(stdout, "{}", check_binary(formatter))?;
|
||||
|
||||
for ts_feat in TsFeature::all() {
|
||||
match load_runtime_file(&lang.language_id, ts_feat.runtime_filename()).is_ok() {
|
||||
true => column("✓", Color::Green),
|
||||
false => column("✘", Color::Red),
|
||||
true => write!(stdout, "{}", color(fit("✓"), Color::Green))?,
|
||||
false => write!(stdout, "{}", color(fit("✘"), Color::Red))?,
|
||||
}
|
||||
}
|
||||
|
||||
writeln!(stdout)?;
|
||||
|
||||
for cmd in cmds {
|
||||
column("", Color::Reset);
|
||||
write!(stdout, "{}", fit(""))?;
|
||||
check_binary(Some(cmd));
|
||||
writeln!(stdout)?;
|
||||
}
|
||||
@@ -307,6 +302,8 @@ pub fn language(lang_str: String) -> std::io::Result<()> {
|
||||
.map(|formatter| formatter.command.to_string()),
|
||||
)?;
|
||||
|
||||
probe_parser(lang.grammar.as_ref().unwrap_or(&lang.language_id))?;
|
||||
|
||||
for ts_feat in TsFeature::all() {
|
||||
probe_treesitter_feature(&lang_str, *ts_feat)?
|
||||
}
|
||||
@@ -314,6 +311,18 @@ pub fn language(lang_str: String) -> std::io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn probe_parser(grammar_name: &str) -> std::io::Result<()> {
|
||||
let stdout = std::io::stdout();
|
||||
let mut stdout = stdout.lock();
|
||||
|
||||
write!(stdout, "Tree-sitter parser: ")?;
|
||||
|
||||
match helix_loader::grammar::get_language(grammar_name) {
|
||||
Ok(_) => writeln!(stdout, "{}", "✓".green()),
|
||||
Err(_) => writeln!(stdout, "{}", "None".yellow()),
|
||||
}
|
||||
}
|
||||
|
||||
/// Display diagnostics about multiple LSPs and DAPs.
|
||||
fn probe_protocols<'a, I: Iterator<Item = &'a str> + 'a>(
|
||||
protocol_name: &str,
|
||||
|
@@ -9,10 +9,13 @@ use helix_view::{
|
||||
document::SavePoint,
|
||||
editor::CompleteAction,
|
||||
handlers::lsp::SignatureHelpInvoked,
|
||||
theme::{Modifier, Style},
|
||||
theme::{Color, Modifier, Style},
|
||||
ViewId,
|
||||
};
|
||||
use tui::{buffer::Buffer as Surface, text::Span};
|
||||
use tui::{
|
||||
buffer::Buffer as Surface,
|
||||
text::{Span, Spans},
|
||||
};
|
||||
|
||||
use std::{borrow::Cow, sync::Arc};
|
||||
|
||||
@@ -28,7 +31,7 @@ use crate::ui::{menu, Markdown, Menu, Popup, PromptEvent};
|
||||
use helix_lsp::{lsp, util, OffsetEncoding};
|
||||
|
||||
impl menu::Item for CompletionItem {
|
||||
type Data = ();
|
||||
type Data = Style;
|
||||
fn sort_text(&self, data: &Self::Data) -> Cow<str> {
|
||||
self.filter_text(data)
|
||||
}
|
||||
@@ -46,7 +49,7 @@ impl menu::Item for CompletionItem {
|
||||
}
|
||||
}
|
||||
|
||||
fn format(&self, _data: &Self::Data) -> menu::Row {
|
||||
fn format(&self, dir_style: &Self::Data) -> menu::Row {
|
||||
let deprecated = match self {
|
||||
CompletionItem::Lsp(LspCompletionItem { item, .. }) => {
|
||||
item.deprecated.unwrap_or_default()
|
||||
@@ -64,51 +67,69 @@ impl menu::Item for CompletionItem {
|
||||
|
||||
let kind = match self {
|
||||
CompletionItem::Lsp(LspCompletionItem { item, .. }) => match item.kind {
|
||||
Some(lsp::CompletionItemKind::TEXT) => "text",
|
||||
Some(lsp::CompletionItemKind::METHOD) => "method",
|
||||
Some(lsp::CompletionItemKind::FUNCTION) => "function",
|
||||
Some(lsp::CompletionItemKind::CONSTRUCTOR) => "constructor",
|
||||
Some(lsp::CompletionItemKind::FIELD) => "field",
|
||||
Some(lsp::CompletionItemKind::VARIABLE) => "variable",
|
||||
Some(lsp::CompletionItemKind::CLASS) => "class",
|
||||
Some(lsp::CompletionItemKind::INTERFACE) => "interface",
|
||||
Some(lsp::CompletionItemKind::MODULE) => "module",
|
||||
Some(lsp::CompletionItemKind::PROPERTY) => "property",
|
||||
Some(lsp::CompletionItemKind::UNIT) => "unit",
|
||||
Some(lsp::CompletionItemKind::VALUE) => "value",
|
||||
Some(lsp::CompletionItemKind::ENUM) => "enum",
|
||||
Some(lsp::CompletionItemKind::KEYWORD) => "keyword",
|
||||
Some(lsp::CompletionItemKind::SNIPPET) => "snippet",
|
||||
Some(lsp::CompletionItemKind::COLOR) => "color",
|
||||
Some(lsp::CompletionItemKind::FILE) => "file",
|
||||
Some(lsp::CompletionItemKind::REFERENCE) => "reference",
|
||||
Some(lsp::CompletionItemKind::FOLDER) => "folder",
|
||||
Some(lsp::CompletionItemKind::ENUM_MEMBER) => "enum_member",
|
||||
Some(lsp::CompletionItemKind::CONSTANT) => "constant",
|
||||
Some(lsp::CompletionItemKind::STRUCT) => "struct",
|
||||
Some(lsp::CompletionItemKind::EVENT) => "event",
|
||||
Some(lsp::CompletionItemKind::OPERATOR) => "operator",
|
||||
Some(lsp::CompletionItemKind::TYPE_PARAMETER) => "type_param",
|
||||
Some(lsp::CompletionItemKind::TEXT) => "text".into(),
|
||||
Some(lsp::CompletionItemKind::METHOD) => "method".into(),
|
||||
Some(lsp::CompletionItemKind::FUNCTION) => "function".into(),
|
||||
Some(lsp::CompletionItemKind::CONSTRUCTOR) => "constructor".into(),
|
||||
Some(lsp::CompletionItemKind::FIELD) => "field".into(),
|
||||
Some(lsp::CompletionItemKind::VARIABLE) => "variable".into(),
|
||||
Some(lsp::CompletionItemKind::CLASS) => "class".into(),
|
||||
Some(lsp::CompletionItemKind::INTERFACE) => "interface".into(),
|
||||
Some(lsp::CompletionItemKind::MODULE) => "module".into(),
|
||||
Some(lsp::CompletionItemKind::PROPERTY) => "property".into(),
|
||||
Some(lsp::CompletionItemKind::UNIT) => "unit".into(),
|
||||
Some(lsp::CompletionItemKind::VALUE) => "value".into(),
|
||||
Some(lsp::CompletionItemKind::ENUM) => "enum".into(),
|
||||
Some(lsp::CompletionItemKind::KEYWORD) => "keyword".into(),
|
||||
Some(lsp::CompletionItemKind::SNIPPET) => "snippet".into(),
|
||||
Some(lsp::CompletionItemKind::COLOR) => item
|
||||
.documentation
|
||||
.as_ref()
|
||||
.and_then(|docs| {
|
||||
let text = match docs {
|
||||
lsp::Documentation::String(text) => text,
|
||||
lsp::Documentation::MarkupContent(lsp::MarkupContent {
|
||||
value, ..
|
||||
}) => value,
|
||||
};
|
||||
Color::from_hex(text)
|
||||
})
|
||||
.map_or("color".into(), |color| {
|
||||
Spans::from(vec![
|
||||
Span::raw("color "),
|
||||
Span::styled("■", Style::default().fg(color)),
|
||||
])
|
||||
}),
|
||||
Some(lsp::CompletionItemKind::FILE) => "file".into(),
|
||||
Some(lsp::CompletionItemKind::REFERENCE) => "reference".into(),
|
||||
Some(lsp::CompletionItemKind::FOLDER) => "folder".into(),
|
||||
Some(lsp::CompletionItemKind::ENUM_MEMBER) => "enum_member".into(),
|
||||
Some(lsp::CompletionItemKind::CONSTANT) => "constant".into(),
|
||||
Some(lsp::CompletionItemKind::STRUCT) => "struct".into(),
|
||||
Some(lsp::CompletionItemKind::EVENT) => "event".into(),
|
||||
Some(lsp::CompletionItemKind::OPERATOR) => "operator".into(),
|
||||
Some(lsp::CompletionItemKind::TYPE_PARAMETER) => "type_param".into(),
|
||||
Some(kind) => {
|
||||
log::error!("Received unknown completion item kind: {:?}", kind);
|
||||
""
|
||||
"".into()
|
||||
}
|
||||
None => "",
|
||||
None => "".into(),
|
||||
},
|
||||
CompletionItem::Other(core::CompletionItem { kind, .. }) => kind,
|
||||
CompletionItem::Other(core::CompletionItem { kind, .. }) => kind.as_ref().into(),
|
||||
};
|
||||
|
||||
menu::Row::new([
|
||||
menu::Cell::from(Span::styled(
|
||||
label,
|
||||
if deprecated {
|
||||
Style::default().add_modifier(Modifier::CROSSED_OUT)
|
||||
} else {
|
||||
Style::default()
|
||||
},
|
||||
)),
|
||||
menu::Cell::from(kind),
|
||||
])
|
||||
let label = Span::styled(
|
||||
label,
|
||||
if deprecated {
|
||||
Style::default().add_modifier(Modifier::CROSSED_OUT)
|
||||
} else if kind.0[0].content == "folder" {
|
||||
*dir_style
|
||||
} else {
|
||||
Style::default()
|
||||
},
|
||||
);
|
||||
|
||||
menu::Row::new([menu::Cell::from(label), menu::Cell::from(kind)])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,8 +156,10 @@ impl Completion {
|
||||
// Sort completion items according to their preselect status (given by the LSP server)
|
||||
items.sort_by_key(|item| !item.preselect());
|
||||
|
||||
let dir_style = editor.theme.get("ui.text.directory");
|
||||
|
||||
// Then create the menu
|
||||
let menu = Menu::new(items, (), move |editor: &mut Editor, item, event| {
|
||||
let menu = Menu::new(items, dir_style, move |editor: &mut Editor, item, event| {
|
||||
let (view, doc) = current!(editor);
|
||||
|
||||
macro_rules! language_server {
|
||||
|
@@ -57,12 +57,6 @@ pub enum InsertEvent {
|
||||
RequestCompletion,
|
||||
}
|
||||
|
||||
impl Default for EditorView {
|
||||
fn default() -> Self {
|
||||
Self::new(Keymaps::default())
|
||||
}
|
||||
}
|
||||
|
||||
impl EditorView {
|
||||
pub fn new(keymaps: Keymaps) -> Self {
|
||||
Self {
|
||||
|
@@ -32,6 +32,17 @@ use helix_view::Editor;
|
||||
|
||||
use std::{error::Error, path::PathBuf};
|
||||
|
||||
struct Utf8PathBuf {
|
||||
path: String,
|
||||
is_dir: bool,
|
||||
}
|
||||
|
||||
impl AsRef<str> for Utf8PathBuf {
|
||||
fn as_ref(&self) -> &str {
|
||||
&self.path
|
||||
}
|
||||
}
|
||||
|
||||
pub fn prompt(
|
||||
cx: &mut crate::commands::Context,
|
||||
prompt: std::borrow::Cow<'static, str>,
|
||||
@@ -266,6 +277,7 @@ pub fn file_picker(root: PathBuf, config: &helix_view::editor::Config) -> FilePi
|
||||
}
|
||||
|
||||
pub mod completers {
|
||||
use super::Utf8PathBuf;
|
||||
use crate::ui::prompt::Completion;
|
||||
use helix_core::fuzzy::fuzzy_match;
|
||||
use helix_core::syntax::LanguageServerFeature;
|
||||
@@ -274,6 +286,7 @@ pub mod completers {
|
||||
use helix_view::{editor::Config, Editor};
|
||||
use once_cell::sync::Lazy;
|
||||
use std::borrow::Cow;
|
||||
use tui::text::Span;
|
||||
|
||||
pub type Completer = fn(&Editor, &str) -> Vec<Completion>;
|
||||
|
||||
@@ -290,7 +303,7 @@ pub mod completers {
|
||||
|
||||
fuzzy_match(input, names, true)
|
||||
.into_iter()
|
||||
.map(|(name, _)| ((0..), name))
|
||||
.map(|(name, _)| ((0..), name.into()))
|
||||
.collect()
|
||||
}
|
||||
|
||||
@@ -336,7 +349,7 @@ pub mod completers {
|
||||
|
||||
fuzzy_match(input, &*KEYS, false)
|
||||
.into_iter()
|
||||
.map(|(name, _)| ((0..), name.into()))
|
||||
.map(|(name, _)| ((0..), Span::raw(name)))
|
||||
.collect()
|
||||
}
|
||||
|
||||
@@ -424,7 +437,7 @@ pub mod completers {
|
||||
|
||||
// TODO: we could return an iter/lazy thing so it can fetch as many as it needs.
|
||||
fn filename_impl<F>(
|
||||
_editor: &Editor,
|
||||
editor: &Editor,
|
||||
input: &str,
|
||||
git_ignore: bool,
|
||||
filter_fn: F,
|
||||
@@ -482,7 +495,7 @@ pub mod completers {
|
||||
return None;
|
||||
}
|
||||
|
||||
//let is_dir = entry.file_type().map_or(false, |entry| entry.is_dir());
|
||||
let is_dir = entry.file_type().is_some_and(|entry| entry.is_dir());
|
||||
|
||||
let path = entry.path();
|
||||
let mut path = if is_tilde {
|
||||
@@ -501,23 +514,35 @@ pub mod completers {
|
||||
}
|
||||
|
||||
let path = path.into_os_string().into_string().ok()?;
|
||||
Some(Cow::from(path))
|
||||
Some(Utf8PathBuf { path, is_dir })
|
||||
})
|
||||
}) // TODO: unwrap or skip
|
||||
.filter(|path| !path.is_empty());
|
||||
.filter(|path| !path.path.is_empty());
|
||||
|
||||
let directory_color = editor.theme.get("ui.text.directory");
|
||||
|
||||
let style_from_file = |file: Utf8PathBuf| {
|
||||
if file.is_dir {
|
||||
Span::styled(file.path, directory_color)
|
||||
} else {
|
||||
Span::raw(file.path)
|
||||
}
|
||||
};
|
||||
|
||||
// if empty, return a list of dirs and files in current dir
|
||||
if let Some(file_name) = file_name {
|
||||
let range = (input.len().saturating_sub(file_name.len()))..;
|
||||
fuzzy_match(&file_name, files, true)
|
||||
.into_iter()
|
||||
.map(|(name, _)| (range.clone(), name))
|
||||
.map(|(name, _)| (range.clone(), style_from_file(name)))
|
||||
.collect()
|
||||
|
||||
// TODO: complete to longest common match
|
||||
} else {
|
||||
let mut files: Vec<_> = files.map(|file| (end.clone(), file)).collect();
|
||||
files.sort_unstable_by(|(_, path1), (_, path2)| path1.cmp(path2));
|
||||
let mut files: Vec<_> = files
|
||||
.map(|file| (end.clone(), style_from_file(file)))
|
||||
.collect();
|
||||
files.sort_unstable_by(|(_, path1), (_, path2)| path1.content.cmp(&path2.content));
|
||||
files
|
||||
}
|
||||
}
|
||||
|
@@ -8,6 +8,7 @@ use helix_view::keyboard::KeyCode;
|
||||
use std::sync::Arc;
|
||||
use std::{borrow::Cow, ops::RangeFrom};
|
||||
use tui::buffer::Buffer as Surface;
|
||||
use tui::text::Span;
|
||||
use tui::widgets::{Block, Widget};
|
||||
|
||||
use helix_core::{
|
||||
@@ -19,7 +20,8 @@ use helix_view::{
|
||||
};
|
||||
|
||||
type PromptCharHandler = Box<dyn Fn(&mut Prompt, char, &Context)>;
|
||||
pub type Completion = (RangeFrom<usize>, Cow<'static, str>);
|
||||
|
||||
pub type Completion = (RangeFrom<usize>, Span<'static>);
|
||||
type CompletionFn = Box<dyn FnMut(&Editor, &str) -> Vec<Completion>>;
|
||||
type CallbackFn = Box<dyn FnMut(&mut Context, &str, PromptEvent)>;
|
||||
pub type DocFn = Box<dyn Fn(&str) -> Option<Cow<str>>>;
|
||||
@@ -374,7 +376,7 @@ impl Prompt {
|
||||
|
||||
let (range, item) = &self.completion[index];
|
||||
|
||||
self.line.replace_range(range.clone(), item);
|
||||
self.line.replace_range(range.clone(), &item.content);
|
||||
|
||||
self.move_end();
|
||||
}
|
||||
@@ -399,7 +401,7 @@ impl Prompt {
|
||||
let max_len = self
|
||||
.completion
|
||||
.iter()
|
||||
.map(|(_, completion)| completion.len() as u16)
|
||||
.map(|(_, completion)| completion.content.len() as u16)
|
||||
.max()
|
||||
.unwrap_or(BASE_WIDTH)
|
||||
.max(BASE_WIDTH);
|
||||
@@ -438,18 +440,22 @@ impl Prompt {
|
||||
for (i, (_range, completion)) in
|
||||
self.completion.iter().enumerate().skip(offset).take(items)
|
||||
{
|
||||
let color = if Some(i) == self.selection {
|
||||
selected_color // TODO: just invert bg
|
||||
let is_selected = Some(i) == self.selection;
|
||||
|
||||
let completion_item_style = if is_selected {
|
||||
selected_color
|
||||
} else {
|
||||
completion_color
|
||||
completion_color.patch(completion.style)
|
||||
};
|
||||
|
||||
surface.set_stringn(
|
||||
area.x + col * (1 + col_width),
|
||||
area.y + row,
|
||||
completion,
|
||||
&completion.content,
|
||||
col_width.saturating_sub(1) as usize,
|
||||
color,
|
||||
completion_item_style,
|
||||
);
|
||||
|
||||
row += 1;
|
||||
if row > area.height - 1 {
|
||||
row = 0;
|
||||
|
@@ -19,7 +19,7 @@ tokio = { version = "1", features = ["rt", "rt-multi-thread", "time", "sync", "p
|
||||
parking_lot = "0.12"
|
||||
arc-swap = { version = "1.7.1" }
|
||||
|
||||
gix = { version = "0.68.0", features = ["attributes", "status"], default-features = false, optional = true }
|
||||
gix = { version = "0.69.1", features = ["attributes", "status"], default-features = false, optional = true }
|
||||
imara-diff = "0.1.7"
|
||||
anyhow = "1"
|
||||
|
||||
|
@@ -144,6 +144,7 @@ fn status(repo: &Repository, f: impl Fn(Result<FileChange>) -> bool) -> Result<(
|
||||
copies: None,
|
||||
percentage: Some(0.5),
|
||||
limit: 1000,
|
||||
..Default::default()
|
||||
}));
|
||||
|
||||
// No filtering based on path
|
||||
|
@@ -263,6 +263,31 @@ pub enum Color {
|
||||
Indexed(u8),
|
||||
}
|
||||
|
||||
impl Color {
|
||||
/// Creates a `Color` from a hex string
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```rust
|
||||
/// use helix_view::theme::Color;
|
||||
///
|
||||
/// let color1 = Color::from_hex("#c0ffee").unwrap();
|
||||
/// let color2 = Color::Rgb(192, 255, 238);
|
||||
///
|
||||
/// assert_eq!(color1, color2);
|
||||
/// ```
|
||||
pub fn from_hex(hex: &str) -> Option<Self> {
|
||||
if !(hex.starts_with('#') && hex.len() == 7) {
|
||||
return None;
|
||||
}
|
||||
match [1..=2, 3..=4, 5..=6].map(|i| hex.get(i).and_then(|c| u8::from_str_radix(c, 16).ok()))
|
||||
{
|
||||
[Some(r), Some(g), Some(b)] => Some(Self::Rgb(r, g, b)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "term")]
|
||||
impl From<Color> for crossterm::style::Color {
|
||||
fn from(color: Color) -> Self {
|
||||
|
@@ -53,6 +53,7 @@ jq-lsp = { command = "jq-lsp" }
|
||||
jsonnet-language-server = { command = "jsonnet-language-server", args= ["-t", "--lint"] }
|
||||
julia = { command = "julia", timeout = 60, args = [ "--startup-file=no", "--history-file=no", "--quiet", "-e", "using LanguageServer; runserver()", ] }
|
||||
koka = { command = "koka", args = ["--language-server", "--lsstdio"] }
|
||||
koto-ls = { command = "koto-ls" }
|
||||
kotlin-language-server = { command = "kotlin-language-server" }
|
||||
lean = { command = "lean", args = [ "--server", "--memory=1024" ] }
|
||||
ltex-ls = { command = "ltex-ls" }
|
||||
@@ -121,6 +122,7 @@ zls = { command = "zls" }
|
||||
blueprint-compiler = { command = "blueprint-compiler", args = ["lsp"] }
|
||||
typst-lsp = { command = "typst-lsp" }
|
||||
tinymist = { command = "tinymist" }
|
||||
ts_query_ls = { command = "ts_query_ls" }
|
||||
pkgbuild-language-server = { command = "pkgbuild-language-server" }
|
||||
helm_ls = { command = "helm_ls", args = ["serve"] }
|
||||
ember-language-server = { command = "ember-language-server", args = ["--stdio"] }
|
||||
@@ -338,16 +340,17 @@ source = { git = "https://github.com/Beaglefoot/tree-sitter-awk", rev = "a799bc5
|
||||
[[language]]
|
||||
name = "protobuf"
|
||||
scope = "source.proto"
|
||||
injection-regex = "protobuf"
|
||||
injection-regex = "proto"
|
||||
file-types = ["proto"]
|
||||
language-servers = [ "bufls", "pbkit" ]
|
||||
comment-token = "//"
|
||||
block-comment-tokens = { start = "/*", end = "*/" }
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
grammar = "proto"
|
||||
|
||||
[[grammar]]
|
||||
name = "protobuf"
|
||||
source = { git = "https://github.com/yusdacra/tree-sitter-protobuf", rev = "19c211a01434d9f03efff99f85e19f967591b175"}
|
||||
name = "proto"
|
||||
source = { git = "https://github.com/sdoerner/tree-sitter-proto", rev = "778ab6ed18a7fcf82c83805a87d63376c51e80bc"}
|
||||
|
||||
[[language]]
|
||||
name = "textproto"
|
||||
@@ -880,7 +883,7 @@ name = "python"
|
||||
scope = "source.python"
|
||||
injection-regex = "py(thon)?"
|
||||
file-types = ["py", "pyi", "py3", "pyw", "ptl", "rpy", "cpy", "ipy", "pyt", { glob = ".python_history" }, { glob = ".pythonstartup" }, { glob = ".pythonrc" }, { glob = "SConstruct" }, { glob = "SConscript" }]
|
||||
shebangs = ["python"]
|
||||
shebangs = ["python", "uv"]
|
||||
roots = ["pyproject.toml", "setup.py", "poetry.lock", "pyrightconfig.json"]
|
||||
comment-token = "#"
|
||||
language-servers = ["ruff", "jedi", "pylsp"]
|
||||
@@ -1457,14 +1460,21 @@ language-servers = [ "swipl" ]
|
||||
[[language]]
|
||||
name = "tsq"
|
||||
scope = "source.tsq"
|
||||
file-types = ["tsq"]
|
||||
file-types = [{ glob = "queries/*.scm" }, { glob = "injections.scm" }, { glob = "highlights.scm" }, { glob = "indents.scm" }, { glob = "textobjects.scm" }, { glob = "locals.scm" }, { glob = "tags.scm" }]
|
||||
comment-token = ";"
|
||||
injection-regex = "tsq"
|
||||
language-servers = ["ts_query_ls"]
|
||||
grammar = "query"
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
|
||||
[language.auto-pairs]
|
||||
'(' = ')'
|
||||
'[' = ']'
|
||||
'"' = '"'
|
||||
|
||||
[[grammar]]
|
||||
name = "tsq"
|
||||
source = { git = "https://github.com/the-mikedavis/tree-sitter-tsq", rev = "48b5e9f82ae0a4727201626f33a17f69f8e0ff86" }
|
||||
name = "query"
|
||||
source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-query", rev = "a6674e279b14958625d7a530cabe06119c7a1532" }
|
||||
|
||||
[[language]]
|
||||
name = "cmake"
|
||||
@@ -1706,7 +1716,7 @@ language-servers = [ "docker-langserver" ]
|
||||
|
||||
[[grammar]]
|
||||
name = "dockerfile"
|
||||
source = { git = "https://github.com/camdencheek/tree-sitter-dockerfile", rev = "8ee3a0f7587b2bd8c45c8cb7d28bd414604aec62" }
|
||||
source = { git = "https://github.com/camdencheek/tree-sitter-dockerfile", rev = "087daa20438a6cc01fa5e6fe6906d77c869d19fe" }
|
||||
|
||||
[[language]]
|
||||
name = "docker-compose"
|
||||
@@ -2068,7 +2078,7 @@ language-servers = [ "elixir-ls" ]
|
||||
|
||||
[[grammar]]
|
||||
name = "heex"
|
||||
source = { git = "https://github.com/phoenixframework/tree-sitter-heex", rev = "2e1348c3cf2c9323e87c2744796cf3f3868aa82a" }
|
||||
source = { git = "https://github.com/phoenixframework/tree-sitter-heex", rev = "f6b83f305a755cd49cf5f6a66b2b789be93dc7b9" }
|
||||
|
||||
[[language]]
|
||||
name = "sql"
|
||||
@@ -2471,7 +2481,7 @@ language-servers = [ "slint-lsp" ]
|
||||
|
||||
[[grammar]]
|
||||
name = "slint"
|
||||
source = { git = "https://github.com/slint-ui/tree-sitter-slint", rev = "34ccfd58d3baee7636f62d9326f32092264e8407" }
|
||||
source = { git = "https://github.com/slint-ui/tree-sitter-slint", rev = "f11da7e62051ba8b9d4faa299c26de8aeedfc1cd" }
|
||||
|
||||
[[language]]
|
||||
name = "task"
|
||||
@@ -3294,6 +3304,7 @@ injection-regex = "nunjucks"
|
||||
file-types = ["njk"]
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
grammar = "jinja2"
|
||||
block-comment-tokens = { start = "{#", end = "#}" }
|
||||
|
||||
[[language]]
|
||||
name = "jinja"
|
||||
@@ -3302,6 +3313,7 @@ injection-regex = "jinja"
|
||||
file-types = ["jinja", "jinja2", "j2"]
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
grammar = "jinja2"
|
||||
block-comment-tokens = { start = "{#", end = "#}" }
|
||||
|
||||
[[grammar]]
|
||||
name = "jinja2"
|
||||
@@ -3318,7 +3330,7 @@ text-width = 72
|
||||
|
||||
[[grammar]]
|
||||
name = "jjdescription"
|
||||
source = { git = "https://github.com/kareigu/tree-sitter-jjdescription", rev = "23dd3dd18ee29bdd761642511aa314215801afd8" }
|
||||
source = { git = "https://github.com/kareigu/tree-sitter-jjdescription", rev = "d09205b52b5a0165b588a793e366c1116468d86f" }
|
||||
|
||||
[[language]]
|
||||
name = "jq"
|
||||
@@ -3598,7 +3610,7 @@ source = { git = "https://github.com/mtoohey31/tree-sitter-ld", rev = "0e9695ae0
|
||||
name = "hyprlang"
|
||||
scope = "source.hyprlang"
|
||||
roots = ["hyprland.conf"]
|
||||
file-types = [ { glob = "hyprland.conf" }, { glob = "hyprpaper.conf" }, { glob = "hypridle.conf" }, { glob = "hyprlock.conf" } ]
|
||||
file-types = [ { glob = "hypr/*.conf" }]
|
||||
comment-token = "#"
|
||||
grammar = "hyprlang"
|
||||
language-servers = ["hyprls"]
|
||||
@@ -3965,6 +3977,20 @@ indent = { tab-width = 4, unit = " " }
|
||||
name = "amber"
|
||||
source = { git = "https://github.com/amber-lang/tree-sitter-amber", rev = "c6df3ec2ec243ed76550c525e7ac3d9a10c6c814" }
|
||||
|
||||
[[language]]
|
||||
name = "koto"
|
||||
scope = "source.koto"
|
||||
injection-regex = "koto"
|
||||
file-types = ["koto"]
|
||||
comment-token = "#"
|
||||
block-comment-tokens = ["#-", "-#"]
|
||||
indent = { tab-width = 2, unit = " " }
|
||||
language-servers = ["koto-ls"]
|
||||
|
||||
[[grammar]]
|
||||
name = "koto"
|
||||
source = { git = "https://github.com/koto-lang/tree-sitter-koto", rev = "b420f7922d0d74905fd0d771e5b83be9ee8a8a9a" }
|
||||
|
||||
[[language]]
|
||||
name = "gpr"
|
||||
scope = "source.gpr"
|
||||
@@ -3988,4 +4014,22 @@ indent = { tab-width = 4, unit = " " }
|
||||
|
||||
[[grammar]]
|
||||
name = "vento"
|
||||
source = { git = "https://github.com/ventojs/tree-sitter-vento", rev = "3321077d7446c1b3b017c294fd56ce028ed817fe" }
|
||||
source = { git = "https://github.com/ventojs/tree-sitter-vento", rev = "3b32474bc29584ea214e4e84b47102408263fe0e" }
|
||||
|
||||
[[language]]
|
||||
name = "nginx"
|
||||
scope = "source.nginx"
|
||||
injection-regex = "nginx"
|
||||
file-types = [
|
||||
{ glob = "sites-available/*.conf" },
|
||||
{ glob = "sites-enabled/*.conf" },
|
||||
{ glob = "nginx.conf" },
|
||||
{ glob = "conf.d/*.conf" }
|
||||
]
|
||||
roots = ["nginx.conf"]
|
||||
comment-token = "#"
|
||||
indent = { tab-width = 4, unit = " " }
|
||||
|
||||
[[grammar]]
|
||||
name = "nginx"
|
||||
source = { git = "https://gitlab.com/joncoole/tree-sitter-nginx", rev = "b4b61db443602b69410ab469c122c01b1e685aa0" }
|
||||
|
@@ -1,9 +1,3 @@
|
||||
;; highlight queries.
|
||||
;; See the syntax at https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries
|
||||
;; See also https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#parser-configurations
|
||||
;; for a list of recommended @ tags, though not all of them have matching
|
||||
;; highlights in neovim.
|
||||
|
||||
[
|
||||
"abort"
|
||||
"abs"
|
||||
|
@@ -1,6 +1,3 @@
|
||||
;; Better highlighting by referencing to the definition, for variable references.
|
||||
;; See https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables
|
||||
|
||||
(compilation) @local.scope
|
||||
(package_declaration) @local.scope
|
||||
(package_body) @local.scope
|
||||
|
@@ -1,7 +1,5 @@
|
||||
; tree-sitter-awk v0.5.1
|
||||
|
||||
; https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries
|
||||
|
||||
; Order matters
|
||||
|
||||
[
|
||||
|
@@ -19,6 +19,8 @@
|
||||
"SHELL"
|
||||
"MAINTAINER"
|
||||
"CROSS_BUILD"
|
||||
(heredoc_marker)
|
||||
(heredoc_end)
|
||||
] @keyword
|
||||
|
||||
[
|
||||
@@ -35,7 +37,12 @@
|
||||
(image_digest
|
||||
"@" @punctuation.special))
|
||||
|
||||
(double_quoted_string) @string
|
||||
[
|
||||
(double_quoted_string)
|
||||
(single_quoted_string)
|
||||
(json_string)
|
||||
(heredoc_line)
|
||||
] @string
|
||||
|
||||
(expansion
|
||||
[
|
||||
|
3
runtime/queries/jjdescription/injections.scm
Normal file
3
runtime/queries/jjdescription/injections.scm
Normal file
@@ -0,0 +1,3 @@
|
||||
(((scissors_inner) @injection.content)
|
||||
(#set! injection.include-children)
|
||||
(#set! injection.language "diff"))
|
9
runtime/queries/koto/folds.scm
Normal file
9
runtime/queries/koto/folds.scm
Normal file
@@ -0,0 +1,9 @@
|
||||
[
|
||||
(assign)
|
||||
(comment)
|
||||
(function)
|
||||
(list)
|
||||
(map)
|
||||
(tuple)
|
||||
(string)
|
||||
] @fold
|
152
runtime/queries/koto/highlights.scm
Normal file
152
runtime/queries/koto/highlights.scm
Normal file
@@ -0,0 +1,152 @@
|
||||
[
|
||||
"="
|
||||
"+"
|
||||
"-"
|
||||
"*"
|
||||
"/"
|
||||
"%"
|
||||
"+="
|
||||
"-="
|
||||
"*="
|
||||
"/="
|
||||
"%="
|
||||
"=="
|
||||
"!="
|
||||
"<"
|
||||
">"
|
||||
"<="
|
||||
">="
|
||||
".."
|
||||
"..="
|
||||
"->"
|
||||
(null_check)
|
||||
] @operator
|
||||
|
||||
[
|
||||
"let"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"and"
|
||||
"not"
|
||||
"or"
|
||||
] @keyword.operator
|
||||
|
||||
[
|
||||
"return"
|
||||
"yield"
|
||||
] @keyword.control.return
|
||||
|
||||
[
|
||||
"if"
|
||||
"then"
|
||||
"else"
|
||||
"else if"
|
||||
"match"
|
||||
"switch"
|
||||
] @keyword.control.conditional
|
||||
|
||||
[
|
||||
(break)
|
||||
(continue)
|
||||
"for"
|
||||
"in"
|
||||
"loop"
|
||||
"until"
|
||||
"while"
|
||||
] @keyword.control.repeat
|
||||
|
||||
[
|
||||
"throw"
|
||||
"try"
|
||||
"catch"
|
||||
"finally"
|
||||
] @keyword.control.exception
|
||||
|
||||
[
|
||||
"export"
|
||||
"from"
|
||||
"import"
|
||||
"as"
|
||||
] @keyword.control.import
|
||||
|
||||
(string (interpolation ("{") @punctuation.special))
|
||||
(string (interpolation ("}") @punctuation.special))
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
"|"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
";"
|
||||
":"
|
||||
","
|
||||
] @punctuation.delimiter
|
||||
|
||||
(import_module
|
||||
(identifier) @module)
|
||||
|
||||
(import_item
|
||||
(identifier) @module)
|
||||
|
||||
(export
|
||||
(identifier) @module)
|
||||
|
||||
(call
|
||||
function: (identifier) @function.method)
|
||||
|
||||
(chain
|
||||
lookup: (identifier) @variable.other.member)
|
||||
|
||||
[
|
||||
(true)
|
||||
(false)
|
||||
] @constant.builtin.boolean
|
||||
|
||||
(comment) @comment
|
||||
|
||||
(debug) @keyword
|
||||
|
||||
(string) @string
|
||||
|
||||
(fill_char) @punctuation.delimiter
|
||||
|
||||
(alignment) @operator
|
||||
|
||||
(escape) @constant.character.escape
|
||||
|
||||
(null) @constant.builtin
|
||||
|
||||
(number) @constant.numeric
|
||||
|
||||
(meta) @keyword.directive
|
||||
|
||||
(meta
|
||||
name: (identifier) @variable.other.member)
|
||||
|
||||
(entry_inline
|
||||
key: (identifier) @variable.other.member)
|
||||
|
||||
(entry_block
|
||||
key: (identifier) @variable.other.member)
|
||||
|
||||
(self) @variable.builtin
|
||||
|
||||
(variable
|
||||
type: (identifier) @type)
|
||||
|
||||
(arg
|
||||
(_ (identifier) @variable.parameter))
|
||||
|
||||
(ellipsis) @variable.parameter
|
||||
|
||||
(function
|
||||
output_type: (identifier) @type)
|
||||
|
||||
(identifier) @variable
|
61
runtime/queries/koto/indents.scm
Normal file
61
runtime/queries/koto/indents.scm
Normal file
@@ -0,0 +1,61 @@
|
||||
[
|
||||
(list)
|
||||
(map)
|
||||
(tuple)
|
||||
] @indent
|
||||
|
||||
[
|
||||
(for)
|
||||
(else_if)
|
||||
(else)
|
||||
(match)
|
||||
(switch)
|
||||
(until)
|
||||
(while)
|
||||
] @indent @extend
|
||||
|
||||
(assign
|
||||
"=" @indent @extend
|
||||
!rhs
|
||||
)
|
||||
(assign
|
||||
"=" @indent @extend
|
||||
rhs: (_) @anchor
|
||||
(#not-same-line? @indent @anchor)
|
||||
)
|
||||
|
||||
(if
|
||||
condition: (_) @indent @extend
|
||||
!then
|
||||
)
|
||||
(if
|
||||
condition: (_) @indent @extend
|
||||
then: (_) @anchor
|
||||
(#not-same-line? @indent @anchor)
|
||||
)
|
||||
|
||||
(function
|
||||
(args) @indent @extend
|
||||
!body
|
||||
)
|
||||
(function
|
||||
(args) @indent @extend
|
||||
body: (_) @anchor
|
||||
(#not-same-line? @indent @anchor)
|
||||
)
|
||||
|
||||
(match_arm
|
||||
"then" @indent @extend
|
||||
!then
|
||||
)
|
||||
(match_arm
|
||||
"then" @indent @extend
|
||||
then: (_) @anchor
|
||||
(#not-same-line? @indent @anchor)
|
||||
)
|
||||
|
||||
[
|
||||
"}"
|
||||
"]"
|
||||
")"
|
||||
] @outdent
|
2
runtime/queries/koto/injections.scm
Normal file
2
runtime/queries/koto/injections.scm
Normal file
@@ -0,0 +1,2 @@
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
30
runtime/queries/koto/locals.scm
Normal file
30
runtime/queries/koto/locals.scm
Normal file
@@ -0,0 +1,30 @@
|
||||
; Scopes
|
||||
(module (_) @local.scope)
|
||||
|
||||
(function
|
||||
body: (_) @local.scope)
|
||||
|
||||
; Definitions
|
||||
(assign
|
||||
lhs: (identifier) @local.definition)
|
||||
|
||||
(variable
|
||||
(identifier) @local.definition)
|
||||
|
||||
(arg
|
||||
(identifier) @local.definition)
|
||||
|
||||
(arg
|
||||
(variable (identifier)) @local.definition)
|
||||
|
||||
(import_item
|
||||
(identifier) @local.definition)
|
||||
|
||||
(entry_block
|
||||
(identifier) @local.definition)
|
||||
|
||||
(entry_inline
|
||||
(identifier) @local.definition)
|
||||
|
||||
; References
|
||||
(identifier) @local.reference
|
38
runtime/queries/koto/textobjects.scm
Normal file
38
runtime/queries/koto/textobjects.scm
Normal file
@@ -0,0 +1,38 @@
|
||||
(comment) @comment.inside
|
||||
|
||||
(comment)+ @comment.around
|
||||
|
||||
(function
|
||||
body: (_) @function.inside) @function.around
|
||||
|
||||
(args
|
||||
((arg) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(call_args
|
||||
((call_arg) @parameter.inside . ","? @parameter.around) @parameter.around)
|
||||
|
||||
(chain
|
||||
call: (tuple
|
||||
((element) @parameter.inside . ","? @parameter.around) @parameter.around))
|
||||
|
||||
(map
|
||||
((entry_inline) @entry.inside . ","? @entry.around) @entry.around)
|
||||
|
||||
(map_block
|
||||
((entry_block) @entry.inside) @entry.around)
|
||||
|
||||
(list
|
||||
((element) @entry.inside . ","? @entry.around) @entry.around)
|
||||
|
||||
(tuple
|
||||
(_) @entry.around)
|
||||
|
||||
(assign
|
||||
(meta (test))
|
||||
(function body: (_) @test.inside)
|
||||
) @test.around
|
||||
|
||||
(entry_block
|
||||
key: (meta (test))
|
||||
value: (function body: (_) @test.inside)
|
||||
) @test.around
|
45
runtime/queries/nginx/highlights.scm
Normal file
45
runtime/queries/nginx/highlights.scm
Normal file
@@ -0,0 +1,45 @@
|
||||
(comment) @comment
|
||||
|
||||
(block_directive
|
||||
(directive) @type)
|
||||
|
||||
[
|
||||
"{"
|
||||
"}"
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket
|
||||
|
||||
(simple_directive
|
||||
(directive) @function)
|
||||
|
||||
[
|
||||
";"
|
||||
] @punctuation.delimiter
|
||||
|
||||
((generic) @keyword
|
||||
(#any-of? @keyword
|
||||
"on"
|
||||
"off"
|
||||
"any"
|
||||
"auto"))
|
||||
|
||||
(modifier) @operator
|
||||
|
||||
(generic) @variable
|
||||
|
||||
(string) @string
|
||||
|
||||
(number) @constant.numeric
|
||||
(metric) @constant.numeric
|
||||
|
||||
(variable) @variable.parameter
|
||||
|
||||
(regex) @string
|
||||
|
||||
(modifier) @keyword.operator
|
||||
|
||||
(lua_block_directive
|
||||
"access_by_lua_block" @function)
|
9
runtime/queries/nginx/injections.scm
Normal file
9
runtime/queries/nginx/injections.scm
Normal file
@@ -0,0 +1,9 @@
|
||||
((lua_code) @injection.content
|
||||
(#set! injection.language "lua")
|
||||
(#set! injection.combined))
|
||||
|
||||
((regex) @injection.content
|
||||
(#set! injection.language "regex"))
|
||||
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
22
runtime/queries/odin/textobjects.scm
Normal file
22
runtime/queries/odin/textobjects.scm
Normal file
@@ -0,0 +1,22 @@
|
||||
(procedure_declaration (identifier) (procedure (block) @function.inside)) @function.around
|
||||
(procedure_declaration (identifier) (procedure (uninitialized) @function.inside)) @function.around
|
||||
(overloaded_procedure_declaration (identifier) @function.inside) @function.around
|
||||
|
||||
(procedure_type (parameters (parameter (identifier) @parameter.inside) @parameter.around))
|
||||
(procedure (parameters (parameter (identifier) @parameter.inside) @parameter.around))
|
||||
|
||||
((procedure_declaration
|
||||
(attributes (attribute "@" "(" (identifier) @attr_name ")"))
|
||||
(identifier) (procedure (block) @test.inside)) @test.around
|
||||
(#match? @attr_name "test"))
|
||||
|
||||
(comment) @comment.inside
|
||||
(comment)+ @comment.around
|
||||
(block_comment) @comment.inside
|
||||
(block_comment)+ @comment.around
|
||||
|
||||
(struct_declaration (identifier) "::") @class.around
|
||||
(enum_declaration (identifier) "::") @class.around
|
||||
(union_declaration (identifier) "::") @class.around
|
||||
(bit_field_declaration (identifier) "::") @class.around
|
||||
(const_declaration (identifier) "::" [(array_type) (distinct_type) (bit_set_type) (pointer_type)]) @class.around
|
@@ -14,4 +14,5 @@
|
||||
[
|
||||
"}"
|
||||
")"
|
||||
"]"
|
||||
] @outdent
|
||||
|
@@ -1,5 +1,6 @@
|
||||
[
|
||||
"syntax"
|
||||
"edition"
|
||||
"package"
|
||||
"option"
|
||||
"import"
|
||||
@@ -7,44 +8,45 @@
|
||||
"rpc"
|
||||
"returns"
|
||||
"message"
|
||||
"map"
|
||||
"enum"
|
||||
"oneof"
|
||||
"repeated"
|
||||
"optional"
|
||||
"required"
|
||||
"reserved"
|
||||
"to"
|
||||
"stream"
|
||||
"extend"
|
||||
"optional"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
(keyType)
|
||||
(key_type)
|
||||
(type)
|
||||
(message_or_enum_type)
|
||||
] @type.builtin
|
||||
|
||||
[
|
||||
(mapName)
|
||||
(enumName)
|
||||
(messageName)
|
||||
(extendName)
|
||||
(serviceName)
|
||||
(rpcName)
|
||||
(enum_name)
|
||||
(message_name)
|
||||
(service_name)
|
||||
(rpc_name)
|
||||
] @type
|
||||
|
||||
[
|
||||
(fieldName)
|
||||
(optionName)
|
||||
(field_name)
|
||||
(option_name)
|
||||
] @variable.other.member
|
||||
(enumVariantName) @type.enum.variant
|
||||
(enum_variant_name) @type.enum.variant
|
||||
|
||||
(fullIdent) @namespace
|
||||
(full_ident) @namespace
|
||||
|
||||
(intLit) @constant.numeric.integer
|
||||
(floatLit) @constant.numeric.float
|
||||
(boolLit) @constant.builtin.boolean
|
||||
(strLit) @string
|
||||
(int_lit) @constant.numeric.integer
|
||||
(float_lit) @constant.numeric.float
|
||||
(bool) @constant.builtin.boolean
|
||||
(string) @string
|
||||
|
||||
(constant) @constant
|
||||
(block_lit) @constant
|
||||
|
||||
(comment) @comment
|
||||
|
||||
@@ -56,3 +58,7 @@
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
"=" @operator
|
||||
|
||||
";" @punctuation.delimiter
|
||||
|
@@ -1,10 +1,10 @@
|
||||
[
|
||||
(messageBody)
|
||||
(enumBody)
|
||||
(oneofBody)
|
||||
(serviceBody)
|
||||
(rpcBody)
|
||||
(msgLit)
|
||||
(message_body)
|
||||
(enum_body)
|
||||
(oneof_body)
|
||||
(service_body)
|
||||
(rpc_body)
|
||||
(block_lit)
|
||||
] @indent
|
||||
|
||||
"}" @outdent
|
||||
|
@@ -1,9 +1,9 @@
|
||||
(message (messageBody) @class.inside) @class.around
|
||||
(enum (enumBody) @class.inside) @class.around
|
||||
(service (serviceBody) @class.inside) @class.around
|
||||
(message (message_body) @class.inside) @class.around
|
||||
(enum (enum_body) @class.inside) @class.around
|
||||
(service (service_body) @class.inside) @class.around
|
||||
|
||||
(rpc (enumMessageType) @parameter.inside) @function.inside
|
||||
(rpc (enumMessageType) @parameter.around) @function.around
|
||||
(rpc (message_or_enum_type) @parameter.inside) @function.inside
|
||||
(rpc (message_or_enum_type) @parameter.around) @function.around
|
||||
|
||||
(comment) @comment.inside
|
||||
(comment)+ @comment.around
|
||||
|
@@ -1,5 +1,3 @@
|
||||
; See: https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables
|
||||
|
||||
; Scopes @local.scope
|
||||
; -------------------------
|
||||
|
||||
|
6
runtime/queries/tsq/folds.scm
Normal file
6
runtime/queries/tsq/folds.scm
Normal file
@@ -0,0 +1,6 @@
|
||||
[
|
||||
(named_node)
|
||||
(predicate)
|
||||
(grouping)
|
||||
(list)
|
||||
] @fold
|
@@ -1,50 +1,50 @@
|
||||
; mark the string passed #match? as a regex
|
||||
(((predicate_name) @function
|
||||
(capture)
|
||||
(string) @string.regexp)
|
||||
(#eq? @function "#match?"))
|
||||
((program
|
||||
.
|
||||
(comment)*
|
||||
.
|
||||
(comment) @keyword.import)
|
||||
(#match? @keyword.import "^;+ *inherits *:"))
|
||||
|
||||
; highlight inheritance comments
|
||||
(((comment) @keyword.directive)
|
||||
(#match? @keyword.directive "^; +inherits *:"))
|
||||
((parameters
|
||||
(identifier) @constant.numeric)
|
||||
(#match? @constant.numeric "^[-+]?[0-9]+(.[0-9]+)?$"))
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket
|
||||
"_" @constant
|
||||
|
||||
":" @punctuation.delimiter
|
||||
"!" @operator
|
||||
|
||||
[
|
||||
(one_or_more)
|
||||
(zero_or_one)
|
||||
(zero_or_more)
|
||||
] @operator
|
||||
"["
|
||||
"]"
|
||||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
(wildcard_node)
|
||||
(anchor)
|
||||
] @constant.builtin
|
||||
"." @operator
|
||||
|
||||
[
|
||||
(anonymous_leaf)
|
||||
(string)
|
||||
] @string
|
||||
(quantifier) @operator
|
||||
|
||||
(comment) @comment
|
||||
|
||||
(field_name) @variable.other.member
|
||||
(negated_field
|
||||
"!" @operator
|
||||
(identifier) @variable.other.member)
|
||||
|
||||
(field_definition
|
||||
name: (identifier) @variable.other.member)
|
||||
|
||||
(named_node
|
||||
name: (identifier) @tag)
|
||||
|
||||
((predicate
|
||||
"#" @function.builtin
|
||||
name: (identifier) @function.builtin @_name
|
||||
type: (predicate_type) @function.builtin)
|
||||
(#any-of? @_name "eq" "match" "any-of" "not-any-of" "is" "is-not" "not-same-line" "not-kind-eq" "set" "select-adjacent" "strip"))
|
||||
(predicate name: (identifier) @error)
|
||||
|
||||
(capture) @label
|
||||
|
||||
((predicate_name) @function
|
||||
(#any-of? @function "#eq?" "#match?" "#any-of?" "#not-any-of?" "#is?" "#is-not?" "#not-same-line?" "#not-kind-eq?" "#set!" "#select-adjacent!" "#strip!"))
|
||||
(predicate_name) @error
|
||||
|
||||
(escape_sequence) @constant.character.escape
|
||||
|
||||
(node_name) @tag
|
||||
(variable) @variable
|
||||
(string) @string
|
||||
|
@@ -1,8 +1,10 @@
|
||||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((predicate
|
||||
(predicate_name) @_predicate
|
||||
(string) @injection.content)
|
||||
(#eq? @_predicate "#match?")
|
||||
(#set! injection.language "regex"))
|
||||
name: (identifier) @_name
|
||||
parameters:
|
||||
(parameters
|
||||
(string (string_content) @injection.content)))
|
||||
(#any-of? @_name "match" "not-match")
|
||||
(#set! injection.language "regex"))
|
||||
|
@@ -21,7 +21,7 @@
|
||||
"variable" = "text"
|
||||
"variable.parameter" = { fg = "maroon", modifiers = ["italic"] }
|
||||
"variable.builtin" = "red"
|
||||
"variable.other.member" = "teal"
|
||||
"variable.other.member" = "blue"
|
||||
|
||||
"label" = "sapphire" # used for lifetimes
|
||||
|
||||
@@ -50,10 +50,10 @@
|
||||
"markup.heading.5" = "pink"
|
||||
"markup.heading.6" = "teal"
|
||||
"markup.list" = "mauve"
|
||||
"markup.bold" = { modifiers = ["bold"] }
|
||||
"markup.italic" = { modifiers = ["italic"] }
|
||||
"markup.list.unchecked" = "overlay2"
|
||||
"markup.list.checked" = "green"
|
||||
"markup.bold" = { modifiers = ["bold"] }
|
||||
"markup.italic" = { modifiers = ["italic"] }
|
||||
"markup.link.url" = { fg = "blue", modifiers = ["italic", "underlined"] }
|
||||
"markup.link.text" = "blue"
|
||||
"markup.raw" = "flamingo"
|
||||
@@ -86,6 +86,7 @@
|
||||
"ui.text" = "text"
|
||||
"ui.text.focus" = { fg = "text", bg = "surface0", modifiers = ["bold"] }
|
||||
"ui.text.inactive" = { fg = "overlay1" }
|
||||
"ui.text.directory" = { fg = "blue" }
|
||||
|
||||
"ui.virtual" = "overlay0"
|
||||
"ui.virtual.ruler" = { bg = "surface0" }
|
||||
@@ -114,6 +115,7 @@
|
||||
"ui.menu" = { fg = "overlay2", bg = "surface0" }
|
||||
"ui.menu.selected" = { fg = "text", bg = "surface1", modifiers = ["bold"] }
|
||||
|
||||
"diagnostic.unnecessary" = { modifiers = ["dim"] }
|
||||
"diagnostic.error" = { underline = { color = "red", style = "curl" } }
|
||||
"diagnostic.warning" = { underline = { color = "yellow", style = "curl" } }
|
||||
"diagnostic.info" = { underline = { color = "sky", style = "curl" } }
|
||||
|
@@ -72,11 +72,13 @@
|
||||
"ui.bufferline.background" = { bg = "background" }
|
||||
"ui.text" = { fg = "text" }
|
||||
"ui.text.focus" = { fg = "white" }
|
||||
"ui.text.directory" = { fg = "blue3" }
|
||||
"ui.text.inactive" = { fg = "dark_gray" }
|
||||
"ui.virtual.whitespace" = { fg = "#3e3e3d" }
|
||||
"ui.virtual.ruler" = { bg = "borders" }
|
||||
"ui.virtual.indent-guide" = { fg = "dark_gray4" }
|
||||
"ui.virtual.inlay-hint" = { fg = "dark_gray5"}
|
||||
"ui.virtual.jump-label" = { fg = "dark_gray", modifiers = ["bold"] }
|
||||
"ui.virtual.jump-label" = { fg = "yellow", modifiers = ["bold"] }
|
||||
"ui.highlight.frameline" = { bg = "#4b4b18" }
|
||||
"ui.debug.active" = { fg = "#ffcc00" }
|
||||
"ui.debug.breakpoint" = { fg = "#e51400" }
|
||||
|
@@ -118,6 +118,7 @@
|
||||
"ui.statusline.select" = { fg = "black", bg = "cyan", modifiers = ["bold"] }
|
||||
"ui.text" = { fg = "foreground" }
|
||||
"ui.text.focus" = { fg = "cyan" }
|
||||
"ui.text.directory" = { fg = "cyan" }
|
||||
"ui.virtual.indent-guide" = { fg = "indent" }
|
||||
"ui.virtual.inlay-hint" = { fg = "cyan" }
|
||||
"ui.virtual.inlay-hint.parameter" = { fg = "cyan", modifiers = ["italic", "dim"] }
|
||||
|
@@ -42,6 +42,7 @@
|
||||
"ui.statusline.select" = { fg = "background_dark", bg = "purple" }
|
||||
"ui.text" = { fg = "foreground" }
|
||||
"ui.text.focus" = { fg = "cyan" }
|
||||
"ui.text.directory" = { fg = "cyan" }
|
||||
"ui.window" = { fg = "foreground" }
|
||||
"ui.virtual.jump-label" = { fg = "pink", modifiers = ["bold"] }
|
||||
"ui.virtual.ruler" = { bg = "background_dark" }
|
||||
|
@@ -94,6 +94,7 @@
|
||||
"ui.window" = { fg = "bg4", bg = "bg_dim" }
|
||||
"ui.help" = { fg = "fg", bg = "bg2" }
|
||||
"ui.text" = "fg"
|
||||
"ui.text.directory" = { fg = "green" }
|
||||
"ui.text.focus" = "fg"
|
||||
"ui.menu" = { fg = "fg", bg = "bg3" }
|
||||
"ui.menu.selected" = { fg = "bg0", bg = "green" }
|
||||
|
@@ -93,6 +93,7 @@
|
||||
"ui.window" = { fg = "bg4", bg = "bg_dim" }
|
||||
"ui.help" = { fg = "fg", bg = "bg2" }
|
||||
"ui.text" = "fg"
|
||||
"ui.text.directory" = { fg = "green" }
|
||||
"ui.text.focus" = "fg"
|
||||
"ui.menu" = { fg = "fg", bg = "bg3" }
|
||||
"ui.menu.selected" = { fg = "bg0", bg = "green" }
|
||||
|
@@ -59,6 +59,7 @@ label = "scale.red.3"
|
||||
"ui.text" = { fg = "fg.muted" }
|
||||
"ui.text.focus" = { fg = "fg.default" }
|
||||
"ui.text.inactive" = "fg.subtle"
|
||||
"ui.text.directory" = { fg = "scale.blue.2" }
|
||||
"ui.virtual" = { fg = "scale.gray.6" }
|
||||
"ui.virtual.ruler" = { bg = "canvas.subtle" }
|
||||
"ui.virtual.jump-label" = { fg = "scale.red.2", modifiers = ["bold"] }
|
||||
|
@@ -59,6 +59,7 @@ label = "scale.red.5"
|
||||
"ui.text" = { fg = "fg.muted" }
|
||||
"ui.text.focus" = { fg = "fg.default" }
|
||||
"ui.text.inactive" = "fg.subtle"
|
||||
"ui.text.directory" = { fg = "scale.blue.4" }
|
||||
"ui.virtual" = { fg = "scale.gray.2" }
|
||||
"ui.virtual.ruler" = { bg = "canvas.subtle" }
|
||||
|
||||
|
@@ -106,6 +106,7 @@
|
||||
"ui.statusline.select" = { fg = "bg1", bg = "orange1", modifiers = ["bold"] }
|
||||
|
||||
"ui.text" = { fg = "fg1" }
|
||||
"ui.text.directory" = { fg = "blue1" }
|
||||
"ui.virtual.inlay-hint" = { fg = "gray" }
|
||||
"ui.virtual.jump-label" = { fg = "purple0", modifiers = ["bold"] }
|
||||
"ui.virtual.ruler" = { bg = "bg1" }
|
||||
|
@@ -60,6 +60,7 @@
|
||||
|
||||
"ui.background" = { bg = "bg", fg = "text" }
|
||||
"ui.text" = { fg = "text" }
|
||||
"ui.text.directory" = { fg = "blue" }
|
||||
|
||||
"ui.statusline" = { bg = "bg", fg = "text" }
|
||||
"ui.statusline.inactive" = { bg = "bg", fg = "disabled" }
|
||||
|
@@ -12,6 +12,7 @@
|
||||
"ui.gutter" = { fg = "fg3" } # Left gutter for diagnostics and breakpoints.
|
||||
|
||||
"ui.text" = { fg = "fg1" } # Default text color.
|
||||
"ui.text.directory" = { fg = "blue-bright" } # Directory names in prompt completion.
|
||||
"ui.text.focus" = { bg = "sel1", fg = "fg1" } # Selection highlight in buffer-picker or file-picker.
|
||||
"ui.text.info" = { fg = "fg2", bg = "sel0" } # Info popup contents (space mode menu).
|
||||
|
||||
|
@@ -36,6 +36,7 @@
|
||||
"ui.text" = { fg = "text" }
|
||||
"ui.text.focus" = { bg = "overlay" }
|
||||
"ui.text.info" = { fg = "subtle" }
|
||||
"ui.text.directory" = { fg = "iris" }
|
||||
|
||||
"ui.virtual.jump-label" = { fg = "love", modifiers = ["bold"] }
|
||||
"ui.virtual.ruler" = { bg = "overlay" }
|
||||
|
@@ -109,9 +109,10 @@ special = "sky"
|
||||
"ui.help" = { fg = "text", bg = "block" }
|
||||
|
||||
"ui.text" = { fg = "text", bg = "base" }
|
||||
"ui.text.focus" = "sun"
|
||||
"ui.text.inactive" = { fg = "cmnt", modifiers = ["italic"] }
|
||||
"ui.text.info" = { bg = "block" }
|
||||
"ui.text.directory" = "sky"
|
||||
"ui.text.focus" = "sun"
|
||||
"ui.text.inactive" = { fg = "cmnt", modifiers = ["italic"] }
|
||||
"ui.text.info" = { bg = "block" }
|
||||
|
||||
"ui.virtual" = { fg = "block" }
|
||||
"ui.virtual.ruler" = { bg = "block" }
|
||||
|
@@ -89,6 +89,7 @@ hint = { fg = "hint" }
|
||||
"ui.text.focus" = { bg = "bg-focus" }
|
||||
"ui.text.inactive" = { fg = "comment", modifiers = ["italic"] }
|
||||
"ui.text.info" = { bg = "bg-menu", fg = "fg" }
|
||||
"ui.text.directory" = { fg = "cyan" }
|
||||
"ui.virtual.ruler" = { bg = "fg-gutter" }
|
||||
"ui.virtual.whitespace" = { fg = "fg-gutter" }
|
||||
"ui.virtual.inlay-hint" = { bg = "bg-inlay", fg = "teal" }
|
||||
|
@@ -56,6 +56,7 @@ tabstop = { modifiers = ["italic"], bg = "bossanova" }
|
||||
"ui.text" = { fg = "lavender" }
|
||||
"ui.text.focus" = { fg = "white" }
|
||||
"ui.text.inactive" = "sirocco"
|
||||
"ui.text.directory" = { fg = "lilac" }
|
||||
"ui.virtual" = { fg = "comet" }
|
||||
"ui.virtual.ruler" = { bg = "bossanova" }
|
||||
"ui.virtual.jump-label" = { fg = "apricot", modifiers = ["bold"] }
|
||||
|
@@ -5,7 +5,6 @@ use crate::DynError;
|
||||
use helix_term::commands::MappableCommand;
|
||||
use helix_term::commands::TYPABLE_COMMAND_LIST;
|
||||
use helix_term::health::TsFeature;
|
||||
use helix_term::ui::EditorView;
|
||||
use helix_view::document::Mode;
|
||||
|
||||
use std::collections::HashSet;
|
||||
@@ -56,7 +55,7 @@ pub fn typable_commands() -> Result<String, DynError> {
|
||||
|
||||
pub fn static_commands() -> Result<String, DynError> {
|
||||
let mut md = String::new();
|
||||
let keymap = EditorView::default().keymaps.map();
|
||||
let keymap = helix_term::keymap::default();
|
||||
let keymaps = [
|
||||
("normal", keymap[&Mode::Normal].reverse_map()),
|
||||
("select", keymap[&Mode::Select].reverse_map()),
|
||||
|
Reference in New Issue
Block a user