mirror of https://github.com/helix-editor/helix
Add docs
parent
966b39b383
commit
f4c43e6dbc
|
@ -28,3 +28,4 @@
|
||||||
- [Adding textobject queries](./guides/textobject.md)
|
- [Adding textobject queries](./guides/textobject.md)
|
||||||
- [Adding indent queries](./guides/indent.md)
|
- [Adding indent queries](./guides/indent.md)
|
||||||
- [Adding injection queries](./guides/injection.md)
|
- [Adding injection queries](./guides/injection.md)
|
||||||
|
- [Adding rainbow bracket queries](./guides/rainbow_bracket_queries.md)
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
| `end-of-line-diagnostics` | Minimum severity of diagnostics to render at the end of the line. Set to `disable` to disable entirely. Refer to the setting about `inline-diagnostics` for more details | "disable"
|
| `end-of-line-diagnostics` | Minimum severity of diagnostics to render at the end of the line. Set to `disable` to disable entirely. Refer to the setting about `inline-diagnostics` for more details | "disable"
|
||||||
| `clipboard-provider` | Which API to use for clipboard interaction. One of `pasteboard` (MacOS), `wayland`, `x-clip`, `x-sel`, `win-32-yank`, `termux`, `tmux`, `windows`, `termcode`, `none`, or a custom command set. | Platform and environment specific. |
|
| `clipboard-provider` | Which API to use for clipboard interaction. One of `pasteboard` (MacOS), `wayland`, `x-clip`, `x-sel`, `win-32-yank`, `termux`, `tmux`, `windows`, `termcode`, `none`, or a custom command set. | Platform and environment specific. |
|
||||||
| `editor-config` | Whether to read settings from [EditorConfig](https://editorconfig.org) files | `true` |
|
| `editor-config` | Whether to read settings from [EditorConfig](https://editorconfig.org) files | `true` |
|
||||||
|
| `rainbow-brackets` | Whether to render rainbow colors for matching brackets. Requires tree-sitter `rainbows.scm` queries for the language. | `false` |
|
||||||
|
|
||||||
### `[editor.clipboard-provider]` Section
|
### `[editor.clipboard-provider]` Section
|
||||||
|
|
||||||
|
|
|
@ -1,272 +1,272 @@
|
||||||
| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Default language servers |
|
| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Rainbow Brackets | Default language servers |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- | --- |
|
||||||
| ada | ✓ | ✓ | | `ada_language_server` |
|
| ada | ✓ | ✓ | | | `ada_language_server` |
|
||||||
| adl | ✓ | ✓ | ✓ | |
|
| adl | ✓ | ✓ | ✓ | | |
|
||||||
| agda | ✓ | | | |
|
| agda | ✓ | | | | |
|
||||||
| alloy | ✓ | | | |
|
| alloy | ✓ | | | | |
|
||||||
| amber | ✓ | | | `amber-lsp` |
|
| amber | ✓ | | | | `amber-lsp` |
|
||||||
| astro | ✓ | | | `astro-ls` |
|
| astro | ✓ | | | | `astro-ls` |
|
||||||
| awk | ✓ | ✓ | | `awk-language-server` |
|
| awk | ✓ | ✓ | | | `awk-language-server` |
|
||||||
| bash | ✓ | ✓ | ✓ | `bash-language-server` |
|
| bash | ✓ | ✓ | ✓ | ✓ | `bash-language-server` |
|
||||||
| bass | ✓ | | | `bass` |
|
| bass | ✓ | | | | `bass` |
|
||||||
| beancount | ✓ | | | `beancount-language-server` |
|
| beancount | ✓ | | | | `beancount-language-server` |
|
||||||
| bibtex | ✓ | | | `texlab` |
|
| bibtex | ✓ | | | | `texlab` |
|
||||||
| bicep | ✓ | | | `bicep-langserver` |
|
| bicep | ✓ | | | | `bicep-langserver` |
|
||||||
| bitbake | ✓ | | | `bitbake-language-server` |
|
| bitbake | ✓ | | | | `bitbake-language-server` |
|
||||||
| blade | ✓ | | | |
|
| blade | ✓ | | | | |
|
||||||
| blueprint | ✓ | | | `blueprint-compiler` |
|
| blueprint | ✓ | | | | `blueprint-compiler` |
|
||||||
| c | ✓ | ✓ | ✓ | `clangd` |
|
| c | ✓ | ✓ | ✓ | ✓ | `clangd` |
|
||||||
| c-sharp | ✓ | ✓ | | `OmniSharp` |
|
| c-sharp | ✓ | ✓ | | | `OmniSharp` |
|
||||||
| cabal | | | | `haskell-language-server-wrapper` |
|
| cabal | | | | | `haskell-language-server-wrapper` |
|
||||||
| cairo | ✓ | ✓ | ✓ | `cairo-language-server` |
|
| cairo | ✓ | ✓ | ✓ | | `cairo-language-server` |
|
||||||
| capnp | ✓ | | ✓ | |
|
| capnp | ✓ | | ✓ | | |
|
||||||
| cel | ✓ | | | |
|
| cel | ✓ | | | | |
|
||||||
| circom | ✓ | | | `circom-lsp` |
|
| circom | ✓ | | | | `circom-lsp` |
|
||||||
| clarity | ✓ | | | `clarinet` |
|
| clarity | ✓ | | | | `clarinet` |
|
||||||
| clojure | ✓ | | | `clojure-lsp` |
|
| clojure | ✓ | | | ✓ | `clojure-lsp` |
|
||||||
| cmake | ✓ | ✓ | ✓ | `neocmakelsp`, `cmake-language-server` |
|
| cmake | ✓ | ✓ | ✓ | | `neocmakelsp`, `cmake-language-server` |
|
||||||
| codeql | ✓ | ✓ | | `codeql` |
|
| codeql | ✓ | ✓ | | | `codeql` |
|
||||||
| comment | ✓ | | | |
|
| comment | ✓ | | | | |
|
||||||
| common-lisp | ✓ | | ✓ | `cl-lsp` |
|
| common-lisp | ✓ | | ✓ | ✓ | `cl-lsp` |
|
||||||
| cpon | ✓ | | ✓ | |
|
| cpon | ✓ | | ✓ | | |
|
||||||
| cpp | ✓ | ✓ | ✓ | `clangd` |
|
| cpp | ✓ | ✓ | ✓ | ✓ | `clangd` |
|
||||||
| crystal | ✓ | ✓ | | `crystalline` |
|
| crystal | ✓ | ✓ | | | `crystalline` |
|
||||||
| css | ✓ | | ✓ | `vscode-css-language-server` |
|
| css | ✓ | | ✓ | ✓ | `vscode-css-language-server` |
|
||||||
| csv | ✓ | | | |
|
| csv | ✓ | | | | |
|
||||||
| cue | ✓ | | | `cuelsp` |
|
| cue | ✓ | | | | `cuelsp` |
|
||||||
| cylc | ✓ | ✓ | ✓ | |
|
| cylc | ✓ | ✓ | ✓ | | |
|
||||||
| d | ✓ | ✓ | ✓ | `serve-d` |
|
| d | ✓ | ✓ | ✓ | | `serve-d` |
|
||||||
| dart | ✓ | ✓ | ✓ | `dart` |
|
| dart | ✓ | ✓ | ✓ | | `dart` |
|
||||||
| dbml | ✓ | | | |
|
| dbml | ✓ | | | | |
|
||||||
| debian | ✓ | | | |
|
| debian | ✓ | | | | |
|
||||||
| devicetree | ✓ | | | |
|
| devicetree | ✓ | | | | |
|
||||||
| dhall | ✓ | ✓ | | `dhall-lsp-server` |
|
| dhall | ✓ | ✓ | | | `dhall-lsp-server` |
|
||||||
| diff | ✓ | | | |
|
| diff | ✓ | | | | |
|
||||||
| djot | ✓ | | | |
|
| djot | ✓ | | | | |
|
||||||
| docker-compose | ✓ | ✓ | ✓ | `docker-compose-langserver`, `yaml-language-server` |
|
| docker-compose | ✓ | ✓ | ✓ | | `docker-compose-langserver`, `yaml-language-server` |
|
||||||
| dockerfile | ✓ | ✓ | | `docker-langserver` |
|
| dockerfile | ✓ | ✓ | | | `docker-langserver` |
|
||||||
| dot | ✓ | | | `dot-language-server` |
|
| dot | ✓ | | | | `dot-language-server` |
|
||||||
| dtd | ✓ | | | |
|
| dtd | ✓ | | | | |
|
||||||
| dune | ✓ | | | |
|
| dune | ✓ | | | | |
|
||||||
| dunstrc | ✓ | | | |
|
| dunstrc | ✓ | | | | |
|
||||||
| earthfile | ✓ | ✓ | ✓ | `earthlyls` |
|
| earthfile | ✓ | ✓ | ✓ | | `earthlyls` |
|
||||||
| edoc | ✓ | | | |
|
| edoc | ✓ | | | | |
|
||||||
| eex | ✓ | | | |
|
| eex | ✓ | | | | |
|
||||||
| ejs | ✓ | | | |
|
| ejs | ✓ | | | | |
|
||||||
| elisp | ✓ | | | |
|
| elisp | ✓ | | | | |
|
||||||
| elixir | ✓ | ✓ | ✓ | `elixir-ls` |
|
| elixir | ✓ | ✓ | ✓ | ✓ | `elixir-ls` |
|
||||||
| elm | ✓ | ✓ | | `elm-language-server` |
|
| elm | ✓ | ✓ | | | `elm-language-server` |
|
||||||
| elvish | ✓ | | | `elvish` |
|
| elvish | ✓ | | | | `elvish` |
|
||||||
| env | ✓ | ✓ | | |
|
| env | ✓ | ✓ | | | |
|
||||||
| erb | ✓ | | | |
|
| erb | ✓ | | | | |
|
||||||
| erlang | ✓ | ✓ | | `erlang_ls`, `elp` |
|
| erlang | ✓ | ✓ | | ✓ | `erlang_ls`, `elp` |
|
||||||
| esdl | ✓ | | | |
|
| esdl | ✓ | | | | |
|
||||||
| fennel | ✓ | | | `fennel-ls` |
|
| fennel | ✓ | | | | `fennel-ls` |
|
||||||
| fga | ✓ | ✓ | ✓ | |
|
| fga | ✓ | ✓ | ✓ | | |
|
||||||
| fidl | ✓ | | | |
|
| fidl | ✓ | | | | |
|
||||||
| fish | ✓ | ✓ | ✓ | `fish-lsp` |
|
| fish | ✓ | ✓ | ✓ | | `fish-lsp` |
|
||||||
| forth | ✓ | | | `forth-lsp` |
|
| forth | ✓ | | | | `forth-lsp` |
|
||||||
| fortran | ✓ | | ✓ | `fortls` |
|
| fortran | ✓ | | ✓ | | `fortls` |
|
||||||
| fsharp | ✓ | | | `fsautocomplete` |
|
| fsharp | ✓ | | | | `fsautocomplete` |
|
||||||
| gas | ✓ | ✓ | | `asm-lsp` |
|
| gas | ✓ | ✓ | | | `asm-lsp` |
|
||||||
| gdscript | ✓ | ✓ | ✓ | |
|
| gdscript | ✓ | ✓ | ✓ | | |
|
||||||
| gemini | ✓ | | | |
|
| gemini | ✓ | | | | |
|
||||||
| gherkin | ✓ | | | |
|
| gherkin | ✓ | | | | |
|
||||||
| ghostty | ✓ | | | |
|
| ghostty | ✓ | | | | |
|
||||||
| git-attributes | ✓ | | | |
|
| git-attributes | ✓ | | | | |
|
||||||
| git-commit | ✓ | ✓ | | |
|
| git-commit | ✓ | ✓ | | | |
|
||||||
| git-config | ✓ | ✓ | | |
|
| git-config | ✓ | ✓ | | | |
|
||||||
| git-ignore | ✓ | | | |
|
| git-ignore | ✓ | | | | |
|
||||||
| git-rebase | ✓ | | | |
|
| git-rebase | ✓ | | | | |
|
||||||
| gjs | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
|
| gjs | ✓ | ✓ | ✓ | | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
|
||||||
| gleam | ✓ | ✓ | | `gleam` |
|
| gleam | ✓ | ✓ | | ✓ | `gleam` |
|
||||||
| glimmer | ✓ | | | `ember-language-server` |
|
| glimmer | ✓ | | | | `ember-language-server` |
|
||||||
| glsl | ✓ | ✓ | ✓ | `glsl_analyzer` |
|
| glsl | ✓ | ✓ | ✓ | | `glsl_analyzer` |
|
||||||
| gn | ✓ | | | |
|
| gn | ✓ | | | | |
|
||||||
| go | ✓ | ✓ | ✓ | `gopls`, `golangci-lint-langserver` |
|
| go | ✓ | ✓ | ✓ | ✓ | `gopls`, `golangci-lint-langserver` |
|
||||||
| godot-resource | ✓ | ✓ | | |
|
| godot-resource | ✓ | ✓ | | | |
|
||||||
| gomod | ✓ | | | `gopls` |
|
| gomod | ✓ | | | | `gopls` |
|
||||||
| gotmpl | ✓ | | | `gopls` |
|
| gotmpl | ✓ | | | | `gopls` |
|
||||||
| gowork | ✓ | | | `gopls` |
|
| gowork | ✓ | | | | `gopls` |
|
||||||
| gpr | ✓ | | | `ada_language_server` |
|
| gpr | ✓ | | | | `ada_language_server` |
|
||||||
| graphql | ✓ | ✓ | | `graphql-lsp` |
|
| graphql | ✓ | ✓ | | | `graphql-lsp` |
|
||||||
| gren | ✓ | ✓ | | |
|
| gren | ✓ | ✓ | | | |
|
||||||
| groovy | ✓ | | | |
|
| groovy | ✓ | | | | |
|
||||||
| gts | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
|
| gts | ✓ | ✓ | ✓ | | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
|
||||||
| hare | ✓ | | | |
|
| hare | ✓ | | | | |
|
||||||
| haskell | ✓ | ✓ | | `haskell-language-server-wrapper` |
|
| haskell | ✓ | ✓ | | | `haskell-language-server-wrapper` |
|
||||||
| haskell-persistent | ✓ | | | |
|
| haskell-persistent | ✓ | | | | |
|
||||||
| hcl | ✓ | ✓ | ✓ | `terraform-ls` |
|
| hcl | ✓ | ✓ | ✓ | | `terraform-ls` |
|
||||||
| heex | ✓ | ✓ | | `elixir-ls` |
|
| heex | ✓ | ✓ | | | `elixir-ls` |
|
||||||
| helm | ✓ | | | `helm_ls` |
|
| helm | ✓ | | | | `helm_ls` |
|
||||||
| hocon | ✓ | ✓ | ✓ | |
|
| hocon | ✓ | ✓ | ✓ | | |
|
||||||
| hoon | ✓ | | | |
|
| hoon | ✓ | | | | |
|
||||||
| hosts | ✓ | | | |
|
| hosts | ✓ | | | | |
|
||||||
| html | ✓ | | | `vscode-html-language-server`, `superhtml` |
|
| html | ✓ | | | ✓ | `vscode-html-language-server`, `superhtml` |
|
||||||
| hurl | ✓ | ✓ | ✓ | |
|
| hurl | ✓ | ✓ | ✓ | | |
|
||||||
| hyprlang | ✓ | | ✓ | `hyprls` |
|
| hyprlang | ✓ | | ✓ | | `hyprls` |
|
||||||
| idris | | | | `idris2-lsp` |
|
| idris | | | | | `idris2-lsp` |
|
||||||
| iex | ✓ | | | |
|
| iex | ✓ | | | | |
|
||||||
| ini | ✓ | | | |
|
| ini | ✓ | | | | |
|
||||||
| ink | ✓ | | | |
|
| ink | ✓ | | | | |
|
||||||
| inko | ✓ | ✓ | ✓ | |
|
| inko | ✓ | ✓ | ✓ | | |
|
||||||
| janet | ✓ | | | |
|
| janet | ✓ | | | | |
|
||||||
| java | ✓ | ✓ | ✓ | `jdtls` |
|
| java | ✓ | ✓ | ✓ | ✓ | `jdtls` |
|
||||||
| javascript | ✓ | ✓ | ✓ | `typescript-language-server` |
|
| javascript | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` |
|
||||||
| jinja | ✓ | | | |
|
| jinja | ✓ | | | | |
|
||||||
| jjdescription | ✓ | | | |
|
| jjdescription | ✓ | | | | |
|
||||||
| jq | ✓ | ✓ | | `jq-lsp` |
|
| jq | ✓ | ✓ | | | `jq-lsp` |
|
||||||
| jsdoc | ✓ | | | |
|
| jsdoc | ✓ | | | | |
|
||||||
| json | ✓ | ✓ | ✓ | `vscode-json-language-server` |
|
| json | ✓ | ✓ | ✓ | ✓ | `vscode-json-language-server` |
|
||||||
| json5 | ✓ | | | |
|
| json5 | ✓ | | | | |
|
||||||
| jsonc | ✓ | | ✓ | `vscode-json-language-server` |
|
| jsonc | ✓ | | ✓ | | `vscode-json-language-server` |
|
||||||
| jsonnet | ✓ | | | `jsonnet-language-server` |
|
| jsonnet | ✓ | | | | `jsonnet-language-server` |
|
||||||
| jsx | ✓ | ✓ | ✓ | `typescript-language-server` |
|
| jsx | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` |
|
||||||
| julia | ✓ | ✓ | ✓ | `julia` |
|
| julia | ✓ | ✓ | ✓ | | `julia` |
|
||||||
| just | ✓ | ✓ | ✓ | `just-lsp` |
|
| just | ✓ | ✓ | ✓ | | `just-lsp` |
|
||||||
| kdl | ✓ | ✓ | ✓ | |
|
| kdl | ✓ | ✓ | ✓ | | |
|
||||||
| koka | ✓ | | ✓ | `koka` |
|
| koka | ✓ | | ✓ | | `koka` |
|
||||||
| kotlin | ✓ | ✓ | ✓ | `kotlin-language-server` |
|
| kotlin | ✓ | ✓ | ✓ | | `kotlin-language-server` |
|
||||||
| koto | ✓ | ✓ | ✓ | `koto-ls` |
|
| koto | ✓ | ✓ | ✓ | | `koto-ls` |
|
||||||
| latex | ✓ | ✓ | | `texlab` |
|
| latex | ✓ | ✓ | | | `texlab` |
|
||||||
| ld | ✓ | | ✓ | |
|
| ld | ✓ | | ✓ | | |
|
||||||
| ldif | ✓ | | | |
|
| ldif | ✓ | | | | |
|
||||||
| lean | ✓ | | | `lean` |
|
| lean | ✓ | | | | `lean` |
|
||||||
| ledger | ✓ | | | |
|
| ledger | ✓ | | | | |
|
||||||
| llvm | ✓ | ✓ | ✓ | |
|
| llvm | ✓ | ✓ | ✓ | | |
|
||||||
| llvm-mir | ✓ | ✓ | ✓ | |
|
| llvm-mir | ✓ | ✓ | ✓ | | |
|
||||||
| llvm-mir-yaml | ✓ | | ✓ | |
|
| llvm-mir-yaml | ✓ | | ✓ | | |
|
||||||
| log | ✓ | | | |
|
| log | ✓ | | | | |
|
||||||
| lpf | ✓ | | | |
|
| lpf | ✓ | | | | |
|
||||||
| lua | ✓ | ✓ | ✓ | `lua-language-server` |
|
| lua | ✓ | ✓ | ✓ | | `lua-language-server` |
|
||||||
| luau | ✓ | ✓ | ✓ | `luau-lsp` |
|
| luau | ✓ | ✓ | ✓ | | `luau-lsp` |
|
||||||
| mail | ✓ | ✓ | | |
|
| mail | ✓ | ✓ | | | |
|
||||||
| make | ✓ | | ✓ | |
|
| make | ✓ | | ✓ | | |
|
||||||
| markdoc | ✓ | | | `markdoc-ls` |
|
| markdoc | ✓ | | | | `markdoc-ls` |
|
||||||
| markdown | ✓ | | | `marksman`, `markdown-oxide` |
|
| markdown | ✓ | | | | `marksman`, `markdown-oxide` |
|
||||||
| markdown-rustdoc | ✓ | | | |
|
| markdown-rustdoc | ✓ | | | | |
|
||||||
| markdown.inline | ✓ | | | |
|
| markdown.inline | ✓ | | | | |
|
||||||
| matlab | ✓ | ✓ | ✓ | |
|
| matlab | ✓ | ✓ | ✓ | | |
|
||||||
| mermaid | ✓ | | | |
|
| mermaid | ✓ | | | | |
|
||||||
| meson | ✓ | | ✓ | `mesonlsp` |
|
| meson | ✓ | | ✓ | | `mesonlsp` |
|
||||||
| mint | | | | `mint` |
|
| mint | | | | | `mint` |
|
||||||
| mojo | ✓ | ✓ | ✓ | `pixi` |
|
| mojo | ✓ | ✓ | ✓ | | `pixi` |
|
||||||
| move | ✓ | | | |
|
| move | ✓ | | | | |
|
||||||
| msbuild | ✓ | | ✓ | |
|
| msbuild | ✓ | | ✓ | | |
|
||||||
| nasm | ✓ | ✓ | | `asm-lsp` |
|
| nasm | ✓ | ✓ | | | `asm-lsp` |
|
||||||
| nestedtext | ✓ | ✓ | ✓ | |
|
| nestedtext | ✓ | ✓ | ✓ | | |
|
||||||
| nginx | ✓ | | | |
|
| nginx | ✓ | | | | |
|
||||||
| nickel | ✓ | | ✓ | `nls` |
|
| nickel | ✓ | | ✓ | | `nls` |
|
||||||
| nim | ✓ | ✓ | ✓ | `nimlangserver` |
|
| nim | ✓ | ✓ | ✓ | | `nimlangserver` |
|
||||||
| nix | ✓ | ✓ | ✓ | `nil`, `nixd` |
|
| nix | ✓ | ✓ | ✓ | ✓ | `nil`, `nixd` |
|
||||||
| nu | ✓ | | | `nu` |
|
| nu | ✓ | | | | `nu` |
|
||||||
| nunjucks | ✓ | | | |
|
| nunjucks | ✓ | | | | |
|
||||||
| ocaml | ✓ | | ✓ | `ocamllsp` |
|
| ocaml | ✓ | | ✓ | | `ocamllsp` |
|
||||||
| ocaml-interface | ✓ | | | `ocamllsp` |
|
| ocaml-interface | ✓ | | | | `ocamllsp` |
|
||||||
| odin | ✓ | ✓ | ✓ | `ols` |
|
| odin | ✓ | ✓ | ✓ | | `ols` |
|
||||||
| ohm | ✓ | ✓ | ✓ | |
|
| ohm | ✓ | ✓ | ✓ | | |
|
||||||
| opencl | ✓ | ✓ | ✓ | `clangd` |
|
| opencl | ✓ | ✓ | ✓ | | `clangd` |
|
||||||
| openscad | ✓ | | | `openscad-lsp` |
|
| openscad | ✓ | | | | `openscad-lsp` |
|
||||||
| org | ✓ | | | |
|
| org | ✓ | | | | |
|
||||||
| pascal | ✓ | ✓ | | `pasls` |
|
| pascal | ✓ | ✓ | | | `pasls` |
|
||||||
| passwd | ✓ | | | |
|
| passwd | ✓ | | | | |
|
||||||
| pem | ✓ | | | |
|
| pem | ✓ | | | | |
|
||||||
| perl | ✓ | ✓ | ✓ | `perlnavigator` |
|
| perl | ✓ | ✓ | ✓ | | `perlnavigator` |
|
||||||
| pest | ✓ | ✓ | ✓ | `pest-language-server` |
|
| pest | ✓ | ✓ | ✓ | | `pest-language-server` |
|
||||||
| php | ✓ | ✓ | ✓ | `intelephense` |
|
| php | ✓ | ✓ | ✓ | | `intelephense` |
|
||||||
| php-only | ✓ | | | |
|
| php-only | ✓ | | | | |
|
||||||
| pkgbuild | ✓ | ✓ | ✓ | `termux-language-server`, `bash-language-server` |
|
| pkgbuild | ✓ | ✓ | ✓ | | `termux-language-server`, `bash-language-server` |
|
||||||
| pkl | ✓ | | ✓ | `pkl-lsp` |
|
| pkl | ✓ | | ✓ | | `pkl-lsp` |
|
||||||
| po | ✓ | ✓ | | |
|
| po | ✓ | ✓ | | | |
|
||||||
| pod | ✓ | | | |
|
| pod | ✓ | | | | |
|
||||||
| ponylang | ✓ | ✓ | ✓ | |
|
| ponylang | ✓ | ✓ | ✓ | | |
|
||||||
| powershell | ✓ | | | |
|
| powershell | ✓ | | | | |
|
||||||
| prisma | ✓ | ✓ | | `prisma-language-server` |
|
| prisma | ✓ | ✓ | | | `prisma-language-server` |
|
||||||
| prolog | ✓ | | ✓ | `swipl` |
|
| prolog | ✓ | | ✓ | | `swipl` |
|
||||||
| protobuf | ✓ | ✓ | ✓ | `buf`, `pb`, `protols` |
|
| protobuf | ✓ | ✓ | ✓ | | `buf`, `pb`, `protols` |
|
||||||
| prql | ✓ | | | |
|
| prql | ✓ | | | | |
|
||||||
| pug | ✓ | | | |
|
| pug | ✓ | | | | |
|
||||||
| purescript | ✓ | ✓ | | `purescript-language-server` |
|
| purescript | ✓ | ✓ | | | `purescript-language-server` |
|
||||||
| python | ✓ | ✓ | ✓ | `ty`, `ruff`, `jedi-language-server`, `pylsp` |
|
| python | ✓ | ✓ | ✓ | ✓ | `ty`, `ruff`, `jedi-language-server`, `pylsp` |
|
||||||
| qml | ✓ | | ✓ | `qmlls` |
|
| qml | ✓ | | ✓ | | `qmlls` |
|
||||||
| quarto | ✓ | | ✓ | |
|
| quarto | ✓ | | ✓ | | |
|
||||||
| quint | ✓ | | | `quint-language-server` |
|
| quint | ✓ | | | | `quint-language-server` |
|
||||||
| r | ✓ | | | `R` |
|
| r | ✓ | | | | `R` |
|
||||||
| racket | ✓ | | ✓ | `racket` |
|
| racket | ✓ | | ✓ | ✓ | `racket` |
|
||||||
| regex | ✓ | | | |
|
| regex | ✓ | | | ✓ | |
|
||||||
| rego | ✓ | | | `regols` |
|
| rego | ✓ | | | | `regols` |
|
||||||
| rescript | ✓ | ✓ | | `rescript-language-server` |
|
| rescript | ✓ | ✓ | | | `rescript-language-server` |
|
||||||
| rmarkdown | ✓ | | ✓ | `R` |
|
| rmarkdown | ✓ | | ✓ | | `R` |
|
||||||
| robot | ✓ | | | `robotframework_ls` |
|
| robot | ✓ | | | | `robotframework_ls` |
|
||||||
| ron | ✓ | | ✓ | |
|
| ron | ✓ | | ✓ | | |
|
||||||
| rst | ✓ | | | |
|
| rst | ✓ | | | | |
|
||||||
| ruby | ✓ | ✓ | ✓ | `ruby-lsp`, `solargraph` |
|
| ruby | ✓ | ✓ | ✓ | ✓ | `ruby-lsp`, `solargraph` |
|
||||||
| rust | ✓ | ✓ | ✓ | `rust-analyzer` |
|
| rust | ✓ | ✓ | ✓ | ✓ | `rust-analyzer` |
|
||||||
| rust-format-args | ✓ | | | |
|
| rust-format-args | ✓ | | | | |
|
||||||
| sage | ✓ | ✓ | | |
|
| sage | ✓ | ✓ | | | |
|
||||||
| scala | ✓ | ✓ | ✓ | `metals` |
|
| scala | ✓ | ✓ | ✓ | | `metals` |
|
||||||
| scheme | ✓ | | ✓ | |
|
| scheme | ✓ | | ✓ | ✓ | |
|
||||||
| scss | ✓ | | | `vscode-css-language-server` |
|
| scss | ✓ | | | ✓ | `vscode-css-language-server` |
|
||||||
| slang | ✓ | ✓ | ✓ | `slangd` |
|
| slang | ✓ | ✓ | ✓ | | `slangd` |
|
||||||
| slint | ✓ | ✓ | ✓ | `slint-lsp` |
|
| slint | ✓ | ✓ | ✓ | | `slint-lsp` |
|
||||||
| smali | ✓ | | ✓ | |
|
| smali | ✓ | | ✓ | | |
|
||||||
| smithy | ✓ | | | `cs` |
|
| smithy | ✓ | | | | `cs` |
|
||||||
| sml | ✓ | | | |
|
| sml | ✓ | | | | |
|
||||||
| snakemake | ✓ | | ✓ | `pylsp` |
|
| snakemake | ✓ | | ✓ | | `pylsp` |
|
||||||
| solidity | ✓ | ✓ | | `solc` |
|
| solidity | ✓ | ✓ | | | `solc` |
|
||||||
| sourcepawn | ✓ | ✓ | | `sourcepawn-studio` |
|
| sourcepawn | ✓ | ✓ | | | `sourcepawn-studio` |
|
||||||
| spade | ✓ | | ✓ | `spade-language-server` |
|
| spade | ✓ | | ✓ | | `spade-language-server` |
|
||||||
| spicedb | ✓ | | | |
|
| spicedb | ✓ | | | | |
|
||||||
| sql | ✓ | ✓ | | |
|
| sql | ✓ | ✓ | | | |
|
||||||
| sshclientconfig | ✓ | | | |
|
| sshclientconfig | ✓ | | | | |
|
||||||
| starlark | ✓ | ✓ | ✓ | `starpls` |
|
| starlark | ✓ | ✓ | ✓ | ✓ | `starpls` |
|
||||||
| strace | ✓ | | | |
|
| strace | ✓ | | | | |
|
||||||
| supercollider | ✓ | | | |
|
| supercollider | ✓ | | | | |
|
||||||
| svelte | ✓ | | ✓ | `svelteserver` |
|
| svelte | ✓ | | ✓ | | `svelteserver` |
|
||||||
| sway | ✓ | ✓ | ✓ | `forc` |
|
| sway | ✓ | ✓ | ✓ | | `forc` |
|
||||||
| swift | ✓ | ✓ | | `sourcekit-lsp` |
|
| swift | ✓ | ✓ | | | `sourcekit-lsp` |
|
||||||
| t32 | ✓ | | | |
|
| t32 | ✓ | | | | |
|
||||||
| tablegen | ✓ | ✓ | ✓ | |
|
| tablegen | ✓ | ✓ | ✓ | | |
|
||||||
| tact | ✓ | ✓ | ✓ | |
|
| tact | ✓ | ✓ | ✓ | | |
|
||||||
| task | ✓ | | | |
|
| task | ✓ | | | | |
|
||||||
| tcl | ✓ | | ✓ | |
|
| tcl | ✓ | | ✓ | | |
|
||||||
| teal | ✓ | | | `teal-language-server` |
|
| teal | ✓ | | | | `teal-language-server` |
|
||||||
| templ | ✓ | | | `templ` |
|
| templ | ✓ | | | | `templ` |
|
||||||
| tera | ✓ | | | |
|
| tera | ✓ | | | | |
|
||||||
| textproto | ✓ | ✓ | ✓ | |
|
| textproto | ✓ | ✓ | ✓ | | |
|
||||||
| tfvars | ✓ | | ✓ | `terraform-ls` |
|
| tfvars | ✓ | | ✓ | | `terraform-ls` |
|
||||||
| thrift | ✓ | | | |
|
| thrift | ✓ | | | | |
|
||||||
| tlaplus | ✓ | | | |
|
| tlaplus | ✓ | | | | |
|
||||||
| todotxt | ✓ | | | |
|
| todotxt | ✓ | | | | |
|
||||||
| toml | ✓ | ✓ | | `taplo`, `tombi` |
|
| toml | ✓ | ✓ | | ✓ | `taplo`, `tombi` |
|
||||||
| tsq | ✓ | | | `ts_query_ls` |
|
| tsq | ✓ | | | | `ts_query_ls` |
|
||||||
| tsx | ✓ | ✓ | ✓ | `typescript-language-server` |
|
| tsx | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` |
|
||||||
| twig | ✓ | | | |
|
| twig | ✓ | | | | |
|
||||||
| typescript | ✓ | ✓ | ✓ | `typescript-language-server` |
|
| typescript | ✓ | ✓ | ✓ | ✓ | `typescript-language-server` |
|
||||||
| typespec | ✓ | ✓ | ✓ | `tsp-server` |
|
| typespec | ✓ | ✓ | ✓ | | `tsp-server` |
|
||||||
| typst | ✓ | | | `tinymist` |
|
| typst | ✓ | | | | `tinymist` |
|
||||||
| ungrammar | ✓ | | | |
|
| ungrammar | ✓ | | | | |
|
||||||
| unison | ✓ | ✓ | ✓ | |
|
| unison | ✓ | ✓ | ✓ | | |
|
||||||
| uxntal | ✓ | | | |
|
| uxntal | ✓ | | | | |
|
||||||
| v | ✓ | ✓ | ✓ | `v-analyzer` |
|
| v | ✓ | ✓ | ✓ | | `v-analyzer` |
|
||||||
| vala | ✓ | ✓ | | `vala-language-server` |
|
| vala | ✓ | ✓ | | | `vala-language-server` |
|
||||||
| vento | ✓ | | | |
|
| vento | ✓ | | | | |
|
||||||
| verilog | ✓ | ✓ | | `svlangserver` |
|
| verilog | ✓ | ✓ | | | `svlangserver` |
|
||||||
| vhdl | ✓ | | | `vhdl_ls` |
|
| vhdl | ✓ | | | | `vhdl_ls` |
|
||||||
| vhs | ✓ | | | |
|
| vhs | ✓ | | | | |
|
||||||
| vue | ✓ | | | `vue-language-server` |
|
| vue | ✓ | | | | `vue-language-server` |
|
||||||
| wast | ✓ | | | |
|
| wast | ✓ | | | | |
|
||||||
| wat | ✓ | | | `wat_server` |
|
| wat | ✓ | | | | `wat_server` |
|
||||||
| webc | ✓ | | | |
|
| webc | ✓ | | | | |
|
||||||
| werk | ✓ | | | |
|
| werk | ✓ | | | | |
|
||||||
| wesl | ✓ | ✓ | | |
|
| wesl | ✓ | ✓ | | | |
|
||||||
| wgsl | ✓ | | | `wgsl-analyzer` |
|
| wgsl | ✓ | | | | `wgsl-analyzer` |
|
||||||
| wit | ✓ | | ✓ | |
|
| wit | ✓ | | ✓ | | |
|
||||||
| wren | ✓ | ✓ | ✓ | |
|
| wren | ✓ | ✓ | ✓ | | |
|
||||||
| xit | ✓ | | | |
|
| xit | ✓ | | | | |
|
||||||
| xml | ✓ | | ✓ | |
|
| xml | ✓ | | ✓ | ✓ | |
|
||||||
| xtc | ✓ | | | |
|
| xtc | ✓ | | | | |
|
||||||
| yaml | ✓ | ✓ | ✓ | `yaml-language-server`, `ansible-language-server` |
|
| yaml | ✓ | ✓ | ✓ | ✓ | `yaml-language-server`, `ansible-language-server` |
|
||||||
| yara | ✓ | | | `yls` |
|
| yara | ✓ | | | | `yls` |
|
||||||
| yuck | ✓ | | | |
|
| yuck | ✓ | | | | |
|
||||||
| zig | ✓ | ✓ | ✓ | `zls` |
|
| zig | ✓ | ✓ | ✓ | | `zls` |
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Guides
|
# Guides
|
||||||
|
|
||||||
This section contains guides for adding new language server configurations,
|
This section contains guides for adding new language server configurations,
|
||||||
tree-sitter grammars, textobject queries, and other similar items.
|
tree-sitter grammars, textobject and rainbow bracket queries, and other similar items.
|
||||||
|
|
|
@ -0,0 +1,132 @@
|
||||||
|
# Adding Rainbow Bracket Queries
|
||||||
|
|
||||||
|
Helix uses `rainbows.scm` tree-sitter query files to provide rainbow bracket
|
||||||
|
functionality.
|
||||||
|
|
||||||
|
Tree-sitter queries are documented in the tree-sitter online documentation.
|
||||||
|
If you're writing queries for the first time, be sure to check out the section
|
||||||
|
on [syntax highlighting queries] and on [query syntax].
|
||||||
|
|
||||||
|
Rainbow queries have two captures: `@rainbow.scope` and `@rainbow.bracket`.
|
||||||
|
`@rainbow.scope` should capture any node that increases the nesting level
|
||||||
|
while `@rainbow.bracket` should capture any bracket nodes. Put another way:
|
||||||
|
`@rainbow.scope` switches to the next rainbow color for all nodes in the tree
|
||||||
|
under it while `@rainbow.bracket` paints captured nodes with the current
|
||||||
|
rainbow color.
|
||||||
|
|
||||||
|
For an example, let's add rainbow queries for the tree-sitter query (TSQ)
|
||||||
|
language itself. These queries will go into a
|
||||||
|
`runtime/queries/tsq/rainbows.scm` file in the repository root.
|
||||||
|
|
||||||
|
First we'll add the `@rainbow.bracket` captures. TSQ only has parentheses and
|
||||||
|
square brackets:
|
||||||
|
|
||||||
|
```tsq
|
||||||
|
["(" ")" "[" "]"] @rainbow.bracket
|
||||||
|
```
|
||||||
|
|
||||||
|
The ordering of the nodes within the alternation (square brackets) is not
|
||||||
|
taken into consideration.
|
||||||
|
|
||||||
|
> Note: Why are these nodes quoted? Most syntax highlights capture text
|
||||||
|
> surrounded by parentheses. These are _named nodes_ and correspond to the
|
||||||
|
> names of rules in the grammar. Brackets are usually written in tree-sitter
|
||||||
|
> grammars as literal strings, for example:
|
||||||
|
>
|
||||||
|
> ```js
|
||||||
|
> {
|
||||||
|
> // ...
|
||||||
|
> arguments: seq("(", repeat($.argument), ")"),
|
||||||
|
> // ...
|
||||||
|
> }
|
||||||
|
> ```
|
||||||
|
>
|
||||||
|
> Nodes written as literal strings in tree-sitter grammars may be captured
|
||||||
|
> in queries with those same literal strings.
|
||||||
|
|
||||||
|
Then we'll add `@rainbow.scope` captures. The easiest way to do this is to
|
||||||
|
view the `grammar.js` file in the tree-sitter grammar's repository. For TSQ,
|
||||||
|
that file is [here][tsq grammar.js]. As we scroll down the `grammar.js`, we
|
||||||
|
see that the `(alternation)`, (L36) `(group)` (L57), `(named_node)` (L59),
|
||||||
|
`(predicate)` (L87) and `(wildcard_node)` (L97) nodes all contain literal
|
||||||
|
parentheses or square brackets in their definitions. These nodes are all
|
||||||
|
direct parents of brackets and happen to also be the nodes we want to change
|
||||||
|
to the next rainbow color, so we capture them as `@rainbow.scope`.
|
||||||
|
|
||||||
|
```tsq
|
||||||
|
[
|
||||||
|
(group)
|
||||||
|
(named_node)
|
||||||
|
(wildcard_node)
|
||||||
|
(predicate)
|
||||||
|
(alternation)
|
||||||
|
] @rainbow.scope
|
||||||
|
```
|
||||||
|
|
||||||
|
This strategy works as a rule of thumb for most programming and configuration
|
||||||
|
languages. Markup languages can be trickier and may take additional
|
||||||
|
experimentation to find the correct nodes to use for scopes and brackets.
|
||||||
|
|
||||||
|
The `:tree-sitter-subtree` command shows the syntax tree under the primary
|
||||||
|
selection in S-expression format and can be a useful tool for determining how
|
||||||
|
to write a query.
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
The `rainbow.include-children` property may be applied to `@rainbow.scope`
|
||||||
|
captures. By default, all `@rainbow.bracket` captures must be direct descendant
|
||||||
|
of a node captured with `@rainbow.scope` in a syntax tree in order to be
|
||||||
|
highlighted. The `rainbow.include-children` property disables that check and
|
||||||
|
allows `@rainbow.bracket` captures to be highlighted if they are direct or
|
||||||
|
indirect descendants of some node captured with `@rainbow.scope`.
|
||||||
|
|
||||||
|
For example, this property is used in the HTML rainbow queries.
|
||||||
|
|
||||||
|
For a document like `<a>link</a>`, the syntax tree is:
|
||||||
|
|
||||||
|
```tsq
|
||||||
|
(element ; <a>link</a>
|
||||||
|
(start_tag ; <a>
|
||||||
|
(tag_name)) ; a
|
||||||
|
(text) ; link
|
||||||
|
(end_tag ; </a>
|
||||||
|
(tag_name))) ; a
|
||||||
|
```
|
||||||
|
|
||||||
|
If we want to highlight the `<`, `>` and `</` nodes with rainbow colors, we
|
||||||
|
capture them as `@rainbow.bracket`:
|
||||||
|
|
||||||
|
```tsq
|
||||||
|
["<" ">" "</"] @rainbow.bracket
|
||||||
|
```
|
||||||
|
|
||||||
|
And we capture `(element)` as `@rainbow.scope` because `(element)` nodes nest
|
||||||
|
within each other: they increment the nesting level and switch to the next
|
||||||
|
color in the rainbow.
|
||||||
|
|
||||||
|
```tsq
|
||||||
|
(element) @rainbow.scope
|
||||||
|
```
|
||||||
|
|
||||||
|
But this combination of `@rainbow.scope` and `@rainbow.bracket` will not
|
||||||
|
highlight any nodes. `<`, `>` and `</` are children of the `(start_tag)` and
|
||||||
|
`(end_tag)` nodes. We can't capture `(start_tag)` and `(end_tag)` as
|
||||||
|
`@rainbow.scope` because they don't nest other elements. We can fix this case
|
||||||
|
by removing the requirement that `<`, `>` and `</` are direct descendants of
|
||||||
|
`(element)` using the `rainbow.include-children` property.
|
||||||
|
|
||||||
|
```tsq
|
||||||
|
((element) @rainbow.scope
|
||||||
|
(#set! rainbow.include-children))
|
||||||
|
```
|
||||||
|
|
||||||
|
With this property set, `<`, `>`, and `</` will highlight with rainbow colors
|
||||||
|
even though they aren't direct descendents of the `(element)` node.
|
||||||
|
|
||||||
|
`rainbow.include-children` is not necessary for the vast majority of programming
|
||||||
|
languages. It is only necessary when the node that increments the nesting level
|
||||||
|
(changes rainbow color) is not the direct parent of the bracket node.
|
||||||
|
|
||||||
|
[syntax highlighting queries]: https://tree-sitter.github.io/tree-sitter/syntax-highlighting#highlights
|
||||||
|
[query syntax]: https://tree-sitter.github.io/tree-sitter/using-parsers#pattern-matching-with-queries
|
||||||
|
[tsq grammar.js]: https://github.com/the-mikedavis/tree-sitter-tsq/blob/48b5e9f82ae0a4727201626f33a17f69f8e0ff86/grammar.js
|
|
@ -73,6 +73,7 @@ These configuration keys are available:
|
||||||
| `path-completion` | Overrides the `editor.path-completion` config key for the language. |
|
| `path-completion` | Overrides the `editor.path-completion` config key for the language. |
|
||||||
| `workspace-lsp-roots` | Directories relative to the workspace root that are treated as LSP roots. Should only be set in `.helix/config.toml`. Overwrites the setting of the same name in `config.toml` if set. |
|
| `workspace-lsp-roots` | Directories relative to the workspace root that are treated as LSP roots. Should only be set in `.helix/config.toml`. Overwrites the setting of the same name in `config.toml` if set. |
|
||||||
| `persistent-diagnostic-sources` | An array of LSP diagnostic sources assumed unchanged when the language server resends the same set of diagnostics. Helix can track the position for these diagnostics internally instead. Useful for diagnostics that are recomputed on save.
|
| `persistent-diagnostic-sources` | An array of LSP diagnostic sources assumed unchanged when the language server resends the same set of diagnostics. Helix can track the position for these diagnostics internally instead. Useful for diagnostics that are recomputed on save.
|
||||||
|
| `rainbow-brackets` | Overrides the `editor.rainbow-brackets` config key for the language |
|
||||||
|
|
||||||
### File-type detection and the `file-types` key
|
### File-type detection and the `file-types` key
|
||||||
|
|
||||||
|
|
|
@ -130,6 +130,17 @@ inherits = "boo_berry"
|
||||||
berry = "#2A2A4D"
|
berry = "#2A2A4D"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Rainbow
|
||||||
|
|
||||||
|
The `rainbow` key is used for rainbow highlight for matching brackets.
|
||||||
|
The key is a list of styles.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
rainbow = ["#ff0000", "#ffa500", "#fff000", { fg = "#00ff00", modifiers = ["bold"] }]
|
||||||
|
```
|
||||||
|
|
||||||
|
Colors from the palette and modifiers may be used.
|
||||||
|
|
||||||
### Scopes
|
### Scopes
|
||||||
|
|
||||||
The following is a list of scopes available to use for styling:
|
The following is a list of scopes available to use for styling:
|
||||||
|
|
|
@ -12,11 +12,17 @@ pub enum TsFeature {
|
||||||
Highlight,
|
Highlight,
|
||||||
TextObject,
|
TextObject,
|
||||||
AutoIndent,
|
AutoIndent,
|
||||||
|
RainbowBracket,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TsFeature {
|
impl TsFeature {
|
||||||
pub fn all() -> &'static [Self] {
|
pub fn all() -> &'static [Self] {
|
||||||
&[Self::Highlight, Self::TextObject, Self::AutoIndent]
|
&[
|
||||||
|
Self::Highlight,
|
||||||
|
Self::TextObject,
|
||||||
|
Self::AutoIndent,
|
||||||
|
Self::RainbowBracket,
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn runtime_filename(&self) -> &'static str {
|
pub fn runtime_filename(&self) -> &'static str {
|
||||||
|
@ -24,6 +30,7 @@ impl TsFeature {
|
||||||
Self::Highlight => "highlights.scm",
|
Self::Highlight => "highlights.scm",
|
||||||
Self::TextObject => "textobjects.scm",
|
Self::TextObject => "textobjects.scm",
|
||||||
Self::AutoIndent => "indents.scm",
|
Self::AutoIndent => "indents.scm",
|
||||||
|
Self::RainbowBracket => "rainbows.scm",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +39,7 @@ impl TsFeature {
|
||||||
Self::Highlight => "Syntax Highlighting",
|
Self::Highlight => "Syntax Highlighting",
|
||||||
Self::TextObject => "Treesitter Textobjects",
|
Self::TextObject => "Treesitter Textobjects",
|
||||||
Self::AutoIndent => "Auto Indent",
|
Self::AutoIndent => "Auto Indent",
|
||||||
|
Self::RainbowBracket => "Rainbow Brackets",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +48,7 @@ impl TsFeature {
|
||||||
Self::Highlight => "Highlight",
|
Self::Highlight => "Highlight",
|
||||||
Self::TextObject => "Textobject",
|
Self::TextObject => "Textobject",
|
||||||
Self::AutoIndent => "Indent",
|
Self::AutoIndent => "Indent",
|
||||||
|
Self::RainbowBracket => "Rainbow",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue