Language Server Configurations - helix-editor/helix GitHub Wiki
Use hx --health to check the status of any of the language servers that are
configured by default or in your personal languages.toml file. See
the documentation for more
information about where these files are and how they work.
For Helix to use a language server, it must first be installed onto your computer. If it is one of the default language servers, it will be used automatically with no further setup needed once it is installed.
You can see the configuration of the default language servers for each language
in the
helix repo languages.toml file.
By adding the configurations below, you can supplement or replace the default
configurations.
Check if your operating system repository has them available, or install them manually, following the instructions below.
If your language server does not support stdio, you can use netcat as a
drop-in proxy, just add this to your languages.toml:
[language-server.example-language-server]
command = "nc"
args = ["127.0.0.1", "6008"]
[[language]]
name = "example-language"
language-servers = [ "example-language-server" ]Much of this information was originally sourced from nvim-lspconfig, emacs-lspconfig thanks to those authors!
https://github.com/angular/vscode-ng-language-service
In this example we use
npm, the exact same results can be achieved withpnpm, by replacingnpmwithpnpm.
# Install language-service(backend), typescript and language-server(vscode-ng-ls..) in one go. This provides all necessary dependencies:
npm install -g @angular/language-service@next typescript @angular/language-server
# Append this to your shell config (~/.bashrc, ~/.zshrc, etc.) to make it persistent
echo 'export NODE_MODULES_GLOBAL="$(npm root -g)"' >> ~/.bashrclanguages.toml
[language-server.angular-ls]
command = "ngserver"
args = [
"--ngProbeLocations",
"${$NODE_MODULES_GLOBAL}",
"--tsProbeLocations",
"${$NODE_MODULES_GLOBAL}",
"--stdio",
# If this for some reason doesn't work, try replacing ${NODE_MODULES_GLOBAL} with the absolute paths, e.g. output of `npm root -g`
]
file-types = ["ts", "typescript", "html"]
[[language]]
name = "typescript"
language-servers = ["angular-ls", "typescript-language-server"]
[[language]]
name = "html"
language-servers = ["angular-ls", "vscode-html-language-server"]To enable the latest Language Service features, set the strictTemplates option in tsconfig.json by setting strictTemplates to true, as shown in the following example:
"angularCompilerOptions": {
"strictTemplates": true
}For more information, see https://angular.dev/tools/language-service.
If your OS package manager hasn't packaged
ansible-language-server,
you can install it from NPM:
npm i -g @ansible/ansible-language-serverIn turn, this binary will check if ansible-lint and yamllint are installed
on your system and use them if found.
In addition to highlighting and linting your code, the Ansible language server can also be used to look up docs for Ansible keywords. With your cursor on a keyword, use "<space>k".
https://github.com/withastro/language-tools/tree/main/packages/language-server
npm i -g @astrojs/language-serverSample settings in languages.toml
[language-server.astro-ls]
command = "astro-ls"
args = ["--stdio"]
config = {typescript = {tsdk = "/Users/user/.bun/install/global/node_modules/typescript/lib"}, environment = "node"}
[[language]]
name = "astro"
auto-format = true
language-servers = [ "astro-ls" ]Please note that a valid config.typescript.tsdk path must be passed to the LSP
config. You will need typescript installed. If you have typescript installed
globally you can find where by running npm list -g | head -1.
https://github.com/Beaglefoot/awk-language-server
npm i -g "awk-language-server@>=0.5.2"Language server for Bash, written using tree-sitter in TypeScript.
https://github.com/mads-hartmann/bash-language-server
bash-language-server can be installed via NPM:
npm i -g bash-language-serverNote that bash-language-server has external dependencies for certain features!
| Feature | Binary |
|---|---|
| Diagnostics | shellcheck |
| Formatting | shfmt |
https://github.com/vito/bass/releases/latest
Bass's language server is built in to the bass command as bass --lsp. See
the Guide for more info.
https://github.com/Azure/bicep/releases/latest
The Bicep language server is published separately as a Windows package. Download the bicep-langserver.zip from the releases page.
To run this under Linux/WSL you will need to install the dotnet runtime
for your OS.
Unzip this in a directory of your choosing for example, /home/myUser/.cache/.
Create the following bash script somewhere in your $PATH:
/usr/local/bin/bicep-langserver
#!/usr/bin/env bash
exec dotnet /home/myUser/.cache/bicep-langserver/Bicep.LangServer.dllbqnlsp: https://git.sr.ht/~detegr/bqnlsp, which depends on:
Sample settings in languages.toml
[language-server.bqnlsp]
command = "bqnlsp"
[[language]]
name = "bqn"
file-types = ["bqn"]
comment-token = "#"
indent = { tab-width = 2, unit = " " }
shebangs = ["bqn", "cbqn"]
roots = []
injection-regex = "bqn"
scope = "scope.bqn"
language-servers = ["bqnlsp"]
language-id = "bqn"Note: you can input the glyphs by
key remapping in config.toml
like:
[keys.insert."\\"]
"=" = [ ":insert-output /bin/echo -n ×", "move_char_right" ]
minus = [ ":insert-output /bin/echo -n ÷", "move_char_right" ]
"+" = [ ":insert-output /bin/echo -n ⋆", "move_char_right" ]
# ...https://clangd.llvm.org/installation.html
NOTE: Clang >= 9 is recommended!
clangd relies on a
JSON compilation database
specified as compile_commands.json or, for simpler projects, a
compile_flags.txt. For details on how to automatically generate one using
CMake look
here.
Alternatively, you can use Bear.
Please go to the installation page. https://clojure-lsp.io/installation/
An example for MacOs/Linux (copied from the installation page)
brew remove clojure-lsp # if you have old clojure-lsp installed via brew
brew install clojure-lsp/brew/clojure-lsp-nativeCMake LSP Implementation.
https://github.com/regen100/cmake-language-server
Core languages.toml contains configuration options, view at the top level of
this repo.
Install the unofficial LSP server
Crystalline. Below is copied from the
LSP repo.
wget https://github.com/elbywan/crystalline/releases/latest/download/crystalline_x86_64-unknown-linux-musl.gz -O crystalline.gz &&\
gzip -d crystalline.gz &&\
chmod u+x crystallineyay -S crystallineInstall using homebrew:
brew install crystallinehttps://github.com/hrsh7th/vscode-langservers-extracted
vscode-css-language-server can be installed via npm:
npm i -g vscode-langservers-extractedhttps://github.com/omnisharp/omnisharp-roslyn OmniSharp server based on Roslyn workspaces
omnisharp-roslyn can be installed by downloading and extracting a release for
your platform from
here.
Be sure to use the "net6.0" version of Omnisharp - https://github.com/OmniSharp/omnisharp-roslyn/issues/2676.
Omnisharp can also be built from source by following the instructions here.
Omnisharp requires the dotnet-sdk to be installed.
To use Omnisharp, you only need to have the OmniSharp binary in your
environment path. The default languages.toml configuration should work fine.
Download the -netX.0 build. Because OmniSharp is not shipped as a binary file,
instead as OmniSharp.dll, it needs to be run using dotnet. As such the
languages.toml config should be changed to this:
[language-server.omnisharp]
command = "dotnet"
args = [ "path/to/OmniSharp.dll", "--languageserver" ]If the language server immediately exits or otherwise doesn't appear to work,
try running dotnet restore and/or dotnet build in the current project
directory.
Serve-D.
https://github.com/Pure-D/serve-d
Install using dub fetch serve-d
Language server for dart.
https://github.com/dart-lang/sdk/tree/master/pkg/analysis_server/tool/lsp_spec
Install Deno from https://docs.deno.com/runtime/getting_started/installation/
Deno requires custom configuration in languages.toml see the Helix environment setup section for an up-to-date configuration.
https://github.com/rcjsuen/dockerfile-language-server-nodejs
docker-langserver can be installed via npm:
npm install -g dockerfile-language-server-nodejshttps://github.com/microsoft/compose-language-service
docker-compose-langserver can be installed via npm:
npm install -g @microsoft/compose-language-servicehttps://github.com/nikeee/dot-language-server
npm i -g dot-language-serverhttps://github.com/alschena/eiffel-tools.git
Clone the project, build it with cargo build --release and add the generated eiffel-language-server binary to your PATH.
https://github.com/elixir-lsp/elixir-ls
elixir-ls can be installed by following the instructions
here.
curl -fLO https://github.com/elixir-lsp/elixir-ls/releases/latest/download/elixir-ls.zip
unzip elixir-ls.zip -d /path/to/elixir-ls
# Unix
chmod +x /path/to/elixir-ls/language_server.shRename language_server.sh to elixir-ls and add it to your $PATH as this is
how helix expects to find it.
Install using homebrew:
brew install elixir-lshttps://github.com/elm-tooling/elm-language-server#installation
npm install -g elm elm-test elm-format @elm-tooling/elm-language-serverhttps://github.com/alexanderbrevig/forth-lsp#install
cargo install forth-lsphttps://github.com/fsharp/FsAutoComplete
dotnet tool install --global fsautocompleteWe need to install nc or netcat. Port 6005 is used in Godot 4.0 beta6. You
will find the right value in the editor configuration panel.
[language-server.godot]
command = "nc"
args = [ "127.0.0.1", "6005"]
[[language]]
name = "gdscript"
language-servers = [ "godot" ]For Windows 10/11
Use winget to install nmap. This will install ncat.
winget install nmapOnce installed, make sure the folder that nmap is now located at is added to
your PATH, as winget fails to do this automatically for some people.
In Godot 3.5.1 port used is 6008. You have to change the command used also.
Instead of nc type ncat and modify the port. You can find the port when you
open the Godot editor and navigate here:
Editor -> Editor Settings -> Network -> Language Server -> Remote Port.
[language-server.godot]
command = "ncat"
args = [ "127.0.0.1", "6008"]
[[language]]
name = "gdscript"
language-servers = [ "godot" ]npm install --global gh-actions-language-server
[language-server.gh-actions-language-server]
command = 'gh-actions-language-server'
args = ['--stdio']
config = { sessionToken = ""}
# GitHub Actions workflow language
[[language]]
name = "yaml"
file-types = [{ glob = ".github/workflows/*.yml" }, { glob = ".github/workflows/*.yaml" }]
language-servers = ["gh-actions-language-server"]
roots = [".github", ".git"]Starting with version 0.21.0, the Gleam language server is built-in to the
gleam command-line interface.
See the official announcement for more information.
gleam lsphttps://github.com/ember-tooling/ember-language-server
Does not currently work with embroider-vite and .gjs/.gts files, only .hbs
install -g @ember-tooling/ember-language-server[[language]]
name = "glimmer"
language-servers = ["ember-language-server"]
formatter = { command = "prettier", args = ["--parser", "glimmer"] }The default is glsl_analyzer
The folder for go packages (typically $HOME/go/bin) will need to be added to your PATH for any of the below to work.
go install golang.org/x/tools/gopls@latest # LSP
go install github.com/go-delve/delve/cmd/dlv@latest # Debugger
go install golang.org/x/tools/cmd/goimports@latest # Formatter
go install github.com/nametake/golangci-lint-langserver@latest # Linter
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest # Linter cli
The LSP formatter (gofmt) does not fix imports, goimports should be used
instead.
languages.toml
[[language]]
name = "go"
auto-format = true
formatter = { command = "goimports" }https://github.com/graphql/graphiql/blob/main/packages/graphql-language-service-cli/
npm i -g graphql-language-service-cliHaskell Language Server.
https://github.com/haskell/haskell-language-server
The Helm-ls installation guide can be found under the "Getting Started" section in the readme.
https://github.com/mrjosh/helm-ls#getting-started
https://github.com/hrsh7th/vscode-langservers-extracted
vscode-html-language-server can be installed via npm:
npm i -g vscode-langservers-extractedhttps://github.com/kristoff-it/superhtml
- Download from https://github.com/kristoff-it/superhtml/releases
- Extract the superhtml executable
- chmod +x superhtml
- add it to your $PATH
[[language]]
name = "html"
language-servers = [{ name = "superhtml", except-features = ["format"] }, "vscode-html-language-server"]
auto-format = truehttps://github.com/eclipse/eclipse.jdt.ls
Installation instructions can be found on the projects README.
On macOS installation can also be done via brew install jdtls.
On debian based distros try a fantastic install script made by eruizc-dev: jdtls-launcher.
For the Arch Linux: yay -Sy jdtls
AUR jdtls source.
After installing, test to see if the jdtls works out of the box (it should
work for the debian script). For versions older than 1.16.0: the -data
parameter must be passed to jdtls and it must be different for each project.
This can be achieved by adding a .helix/languages.toml configuration to the
project root:
[language-server]
jdtls = { command = "jdtls" }
language-server = { command = "jdtls", args = [
"-data", "/home/<USER>/.cache/jdtls/workspace"
]}
[[language]]
name = "java"
scope = "source.java"
injection-regex = "java"
file-types = ["java"]
roots = ["pom.xml", "build.gradle", ]
indent = { tab-width = 4, unit = " " }
language-servers = [ "jdtls" ]Note: the -data parameter must be up one directory from the project directory.
The following will enable inlay hints for the jdtls language server when added to .helix/languages.toml
[language-server.jdtls.config.java.inlayHints]
parameterNames.enabled = "all"See tsserver.
https://github.com/hrsh7th/vscode-langservers-extracted
vscode-json-language-server, a language server for JSON and JSON schema
vscode-json-language-server can be installed via npm:
npm i -g vscode-langservers-extractedAvailable settings can be found here: https://github.com/microsoft/vscode/blob/4f69cdf95a12cef48d405b38bf7812a7f297c310/extensions/json-language-features/server/src/jsonServer.ts#L183
Usage
config = { "provideFormatter" = true, "json" = { "keepLines" = { "enable" = true } } }https://github.com/grafana/jsonnet-language-server
A Language Server Protocol (LSP) server for Jsonnet.
Can be installed either via the latest release binary or if you have golang installed, you can use:
go install github.com/grafana/jsonnet-language-server@latesthttps://github.com/julia-vscode/LanguageServer.jl
LanguageServer.jl can be installed with julia and Pkg:
julia -e 'using Pkg; Pkg.add("LanguageServer")'To update an existing install, use the following command:
julia -e 'using Pkg; Pkg.update()'A Kotlin language server which was developed for internal usage and released afterward. Maintaining is not done by the original author, but by fwcd.
It is built via gradle and developed on GitHub. Source and additional description: https://github.com/fwcd/kotlin-language-server
TexLab: A cross-platform implementation of the Language Server Protocol providing rich cross-editing support for the LaTeX typesetting system.
Add the following to your languages.toml to enable build on save:
[language-server.texlab.config.texlab.build]
onSave = trueTexLab can be further configured to jump to your current location in the pdf
following the build, among other useful things. For all available options, see
the TexLab wiki.
Everything under the texlab key goes under
language-server.texlab.config.texlab (or possibly language.config.texlab on
older releases). For instance, setting the texlab.build.onSave property to
true (as per the
TexLab wiki)
is achieved with the above languages.toml.
https://github.com/leanprover/lean-client-js/tree/master/lean-language-server
Lean installation instructions can be found here.
Once Lean is installed, you can install the Lean 3 language server by running
npm install -g lean-language-serverBinaries are available from: https://github.com/LuaLS/lua-language-server/releases
mac
brew install lua-language-server@markdoc/language-server -
an experimental language server for markdoc. markdoc-ls should be available
after installation.
Install using
npm install -g @markdoc/language-serverThe primary default language server is Marksman
Binaries are available from here
macOS and Linux:
brew install marksmanor
yay -S marksman-binWindows:
scoop install marksmanAs an alternative you can use ltex-ls which provides grammar and spelling
errors in markup documents: https://valentjn.github.io/ltex/
[[language]]
name = "markdown"
language-servers = [ "marksman", "ltex-ls" ]Additional configuration settings can be added, for example to disable the
profanity rules and add the word builtin to two dictionaries:
[language-server.ltex-ls.config]
ltex.disabledRules = { "en-US" = ["PROFANITY"], "en-GB" = ["PROFANITY"] }
ltex.dictionary = { "en-US" = ["builtin"], "en-GB" = ["builtin"] }Currently, the ability to add to your user dictionary while running Helix is not supported, so adding words to the config is the best workaround.
Important
ltex-ls has not been updated in a while, but there is a new fork with bug fixes and new features to try here: https://github.com/ltex-plus/ltex-ls-plus. If your build of Helix is before 16th Dec 24 you need to add:
[language-server]
ltex-ls-plus = { command = "ltex-ls-plus" }An alternative to marksman that provides support for advanced markdown PKM
systems in your favorite text editor. It features complete compatibility with
Obsidian.md markdown syntax and bases its features on the features of the
Obsidian.md editor. For a list of all features, check out the
README
- It can be installed for Arch from the AUR under the name
markdown-oxide-git
paru -S markdown-oxide-git- Or it can be installed by
cargo
cargo install --git https://github.com/Feel-ix-343/markdown-oxide.git markdown-oxide- Or manually by following these directions
Note: as per the README, "MATLAB language server requires MATLAB version R2021a or later."
[language-server.matlab-ls]
command = "matlab-language-server"
args = ["--stdio"]
[language-server.matlab-ls.config.MATLAB]
indexWorkspace = false
installPath = "/PATH/TO/MATLAB/INSTALLATION"
matlabConnectionTiming = "onStart"
telemetry = false
[[language]]
name = "matlab"
scope = "source.m"
file-types = ["m"]
language-servers = ["matlab-ls"]
comment-token = "%"
shebangs = ["octave-cli", "matlab"]
indent = { tab-width = 2, unit = " " }Install Mint using the instructions. The language server is included since version 0.12.0.
- Install the Modular CLI
- Install the Mojo SDK
See this PR: https://github.com/helix-editor/helix/pull/8583
https://github.com/nim-lang/langserver
# May require choosenim
nimble install nimlangserverThe default language server is nil since the 2022-12 release.
https://github.com/oxalica/nil
This program is available in NixOS/nixpkgs
under attribute nil, and is regularly updated.
- If you use
nix-env, runnix-env -iA nixpkgs.nil - If you use
nix profile, runnix profile install nixpkgs#nil - Check out the GitHub repository for additional options
The formatter nixpkgs-fmt is not included and can be installed with
nix-env -iA nixpkgs.nixpkgs-fmt
To set up the formatter, set the following in your languages.toml :
[[language]]
name = "nix"
formatter = { command = "nixpkgs-fmt" }To use the previous default language server, check out https://github.com/nix-community/rnix-lsp
https://github.com/ocaml/ocaml-lsp
The OCaml language server ocamllsp can be installed via OPAM:
opam install ocaml-lsp-serverols - https://github.com/DanielGavin/ols
Provides syntax highlighting, auto-complete, code formatting and more for Odin.
An implementation of the language server protocol for OpenPolicyAgent's rego.
You can download it from its releases page, or
$ go install github.com/kitagry/regols@latesthttps://github.com/bscan/PerlNavigator
Provides syntax checking, autocompletion, perlcritic, code navigation, hover for Perl.
Implemented as a Language Server using the Microsoft LSP libraries along with Perl doing the syntax checking and parsing.
Perl Navigator can be installed by downloading the latest release for your platform at the project's releases page and putting the perlnavigator executable somewhere in your PATH.
https://github.com/pest-parser/pest-ide-tools
This repository contains an implementation of the Language Server Protocol in Rust, for the Pest parser generator.
https://phpactor.readthedocs.io/en/master/index.html
Phpactor requires PHP 8.1.
You can download phpactor.phar as follows:
curl -Lo phpactor.phar https://github.com/phpactor/phpactor/releases/latest/download/phpactor.pharThen make it executable and symlink it somewhere in your PATH:
chmod a+x phpactor.phar
mv phpactor.phar ~/.local/bin/phpactorCheck support using the status command:
phpactor status
✔ Composer detected - faster class location and more features!
✔ Git detected - enables faster refactorings in your repository scope!Then, to enable this LSP you have to create a file languages.toml in your
project directory .helix/languages.toml and place the following code inside
(or if you want you could do this to helix languages.toml file globally):
[language-server.phpactor]
command = "phpactor"
args = [ "language-server" ]
[[language]]
name = "php"
language-servers = [ "phpactor" ]Warning
Intelephense is proprietary, so be sure to review its licensing terms.
intelephense can be installed via npm:
npm install -g intelephenseTo enable the premium features you have to provide a license key for which you have a few options:
- Adding the license key directly to your languages.toml file:
[language-server.intelephense.config]
licenceKey = "MY_LICENSE_KEY"- Adding the path to your license file
[language-server.intelephense.config]
licenceKey = "/home/username/.config/intelephense/license.txt"- Adding the license file to your home directory under
$HOME/intelephense/licence.txt
Note: Keep in mind how the word is written licenceKey and not licenseKey, also for step 3) it has to be licence.txt.
https://github.com/termux/termux-language-server
yay -S termux-language-serverA Language Server for Powershell is not present by default, but can be added with the following configuration.
Download the latest
PowerShellEditorServices
zip and extract it. In this example, I extracted it to C:\.
You must then run Get-ChildItem <PowerShellEditorServices-Path> -Recurse | Unblock-File (in my case Get-ChildItem C:\PowerShellEditorServices\ -Recurse | Unblock-File) to remove the 'Mark of the Web' and allow PowerShellEditorServices to be executed.
After PowerShellEditorServices is present, you can add this config to your languages.toml:
[[language]]
name = 'powershell'
scope = 'source.ps1'
file-types = ['ps1', 'psm1']
roots = ['.git']
comment-token = '#'
indent = { tab-width = 4, unit = ' ' }
language-servers = [ 'powershell-editor-services' ]
[language-server.powershell-editor-services]
name = 'powershell-editor-services'
transport = 'stdio'
command = 'pwsh'
args = ['-NoLogo', '-NoProfile', '-Command', 'C:\\PowerShellEditorServices\\PowerShellEditorServices\\Start-EditorServices.ps1 -SessionDetailsPath C:\\PowerShellEditorServices\\PowerShellEditorServices.sessions.lsp.json -LanguageServiceOnly -Stdio']In combination with this LSP Config, you might want to use the DAP Config I wrote here: Debugger Configurations
https://github.com/prisma/language-tools/tree/main/packages/language-server
prisma-language-server can be installed via npm:
npm install -g @prisma/language-serverAn implementation of the language server protocol for SWI-Prolog
https://github.com/jamesnvc/lsp_server
Install the swi-prolog package and run swipl:
?- pack_install(lsp_server).
python-lsp/python-lsp-server
(pylsp) is a fork of the python-language-server project (pyls), maintained
by the Spyder IDE team and the community. It is a Python 3.7+ implementation of
the
Language Server Protocol
(versions <1.4 should still work with Python 3.6).
Installation instructions can be found in the
project's README,
but it consists of installing a package using pip (or
pipx):
pip install -U 'python-lsp-server[all]'The [all] above refers to the optional providers supported. You can fine-tune
what to install following the instructions
here.
python-lsp/pylsp-mypy (pylsp-mypy)
is a Mypy (type checker) plugin for Pylsp. First do the steps in Pylsp section
and then install pylsp-mypy:
pip install pylsp-mypylanguages.toml
[[language]]
name = "python"
language-servers = ["pylsp"]
[language-server.pylsp.config.pylsp]
plugins.pylsp_mypy.enabled = true
plugins.pylsp_mypy.live_mode = truePyrefly is a fast type checker for Python. It's designed to replace the existing Pyre type checker at Meta. Built in Rust and built for speed, Pyrefly aims to increase development velocity with IDE features and by checking your Python code.
https://github.com/facebook/pyrefly
The language server can be installed by running
pip install pyrefly
languages.toml
[language-server.pyrefly]
command = "pyrefly"
args = [ "lsp" ]
[[language]]
name = "python"
language-servers = [ "pyrefly" ]Pyright is a fast type checker and language server from Microsoft, meant for large Python source bases. It is the LSP part of pylance (the VS Code python daemon).
https://github.com/microsoft/pyright
The language server can be installed by running
npm install --location=global pyright
languages.toml
[[language]]
name = "python"
language-servers = [ "pyright" ]Basedpyright is a fork of pyright with various type checking improvements, improved vscode support and pylance features built into the language server.
The language server can be installed by running pip install basedpyright
languages.toml
[[language]]
name = "python"
language-servers = [ "basedpyright" ]charliermarsh/ruff is an extremely fast Python linter, written in Rust (see installation instructions).
Ruff ships with a builtin LSP, see ruff docs for integration with helix.
A suggested Helix configuration using ruff as lsp is given below:
[[language]]
name = "python"
language-servers = [ "ruff" ]
auto-format = true
[language-server.ruff]
command = "ruff"
args = ["server"]Note that ruff lacks basic features and is meant to be used alongside another LSP (helix-editor/helix#5399 (comment), charliermarsh/ruff-lsp#23, charliermarsh/ruff-lsp#23 (comment)).
As an alternative, pylsp has support for ruff via a plugin. See instructions for Helix here
Refer to Ruff's documentation and the python-lsp-ruff docs
[language-server.pylsp.config.pylsp.plugins.ruff]
lineLength = 88
preview = true
select = ["E4", "E7", "E9", "F"] # Rules to be enabled by ruff
ignore = ["D210"] # Rules to be ignored by ruffpyright - npm install pyright -g
ruff-lsp - pip install ruff-lsp or
ruff - pip install ruff (ruff-lsp is A
Language Server Protocol
implementation for ruff, you can choose one)
[[language]]
name = "python"
language-servers = [ "pyright", "ruff" ]
[language-server.pyright.config.python.analysis]
typeCheckingMode = "basic"
# if you choose `ruff-lsp`
[language-server.ruff]
command = "ruff-lsp"
[language-server.ruff.config.settings]
args = ["--ignore", "E501"]
# if you choose `ruff` itself
[language-server.ruff]
command = "ruff"
args = ["server"]# in languages.toml
[[language]]
name = "python"
language-servers = ["pyright", "ruff", "pylyzer"]
[language-server.pyright.config.python.analysis]
typeCheckingMode = "basic"
[language-server.ruff]
command = "ruff"
args = ["server"]
[language-server.pylyzer]
command = "pylyzer"
args = ["--server"]An implementation of the Language Server Protocol for R.
https://github.com/REditorSupport/languageserver
The language server can be installed by running
R -e 'install.packages("languageserver")'.
https://github.com/jeapostrophe/racket-langserver
The Racket language server. This project seeks to use DrRacket's public API to provide functionality that mimics DrRacket's code tools as closely as possible.
Install via raco: raco pkg install racket-langserver
https://github.com/rescript-lang/rescript-vscode
// ReScript language server.
rust-analyzer, a language server for Rust.
You can install rust-analyzer using rustup starting from Rust 1.64, and it
will be added to your system's $PATH
starting from Rustup 1.26.0:
rustup component add rust-analyzerAdd the following to your languages.toml to enable
clippy on save:
[language-server.rust-analyzer.config.check]
command = "clippy"You may also wish to enable all features, as it will allow you to use rust-analyzer in integration-test for example.
[language-server.rust-analyzer.config.cargo]
features = "all"See docs for extra settings.
Everything under the rust-analyzer key goes under
language-server.rust-analyzer.config key in helix (for example,
rust-analyzer.check.command = "clippy" is translated into the language.toml
as above.)
Scala language server with rich IDE features.
- Install Coursier
- Run
coursier install metals
Steel's language server is available at github.com/mattwparas/crates/steel-language-server.
Recommended installation for LSP + interpreter (link):
git clone [email protected]:mattwparas/steel.git
cd steel
cargo xtask installThen follow the configuration instructions.
Finally, add the following to your language configuration file:
[[language]]
name = "scheme"
language-servers = ["steel-language-server"]
[language-server.steel-language-server]
command = "steel-language-server"
args = []SCSS's language server is available from the vscode-langservers-extracted collection:
https://github.com/hrsh7th/vscode-langservers-extracted
You may install it by running:
npm i -g vscode-langservers-extractedhttps://github.com/slint-ui/slint/tree/HEAD/tools/lsp
https://slint-ui.com/
cargo install slint-lspFor Smithy projects the following LSP is used: https://github.com/awslabs/smithy-language-server
coursier must be installed so that the language server can be launched. To install coursier please see their installation instructions. Since coursier will take care of everything else, no other steps are necessary!
Solargraph, a language server for Ruby
You can install Solargraph via gem install.
gem install --user-install solargraphor
https://github.com/Shopify/ruby-lsp
You can install ruby-lsp via gem install too.
gem install --user-install ruby-lspsolc is the native language server for the Solidity language.
https://docs.soliditylang.org/en/latest/installing-solidity.html
https://github.com/sveltejs/language-tools/tree/master/packages/language-server
svelte-language-server can be installed via npm:
npm i -g svelte-language-serverFor integration with .js and .ts files install typescript-svelte-plugin
via npm:
npm i -g typescript-svelte-pluginThen for each svelte project update your tsconfig.json/jsconfig.json to add
the typescript-svelte-plugin
{
"compilerOptions": {
...
"plugins": [{
"name": "typescript-svelte-plugin"
}]
}
}Further information on js and ts integration for svelte can be found
here.
A language server for Swift, formatting provided via swift-format
https://github.com/apple/sourcekit-lsp
https://github.com/apple/swift-format
Follow the Getting Started guide to get sourcekit-lsp installed correctly for your OS. No additional configuration is needed, though note to use the same toolchain for both your installed LSP, and that you use to build.
https://github.com/joe-re/sql-language-server
npm i -g sql-language-serverlanguages.toml setting
[language-server.sql-language-server]
command = "sql-language-server"
args = ["up", "--method", "stdio"]
[[language]]
name = "sql"
language-servers = [ "sql-language-server" ]- Note: There is also https://github.com/sqls-server/sqls written in Go
https://github.com/tailwindlabs/tailwindcss-intellisense
tailwindcss-language-server can be installed via npm:
npm i -g @tailwindcss/language-serverAdd this to your local languages.toml file to enable it
languages.toml:
[language-server.tailwindcss-ls]
command = "tailwindcss-language-server"
args = ["--stdio"]
[[language]]
name = "html"
language-servers = [ "vscode-html-language-server", "tailwindcss-ls" ]
[[language]]
name = "css"
language-servers = [ "vscode-css-language-server", "tailwindcss-ls" ]
[[language]]
name = "jsx"
language-servers = [ "typescript-language-server", "tailwindcss-ls" ]
[[language]]
name = "tsx"
language-servers = [ "typescript-language-server", "tailwindcss-ls" ]
[[language]]
name = "svelte"
language-servers = [ "svelteserver", "tailwindcss-ls" ]If you want to use TailwindCSS language server with other languages, configure like example below. The example is with rust.
[[language]]
name = "rust"
language-servers = ["rust-analyzer", "tailwindcss-ls"]
[language-server.tailwindcss-ls]
config = { userLanguages = { rust = "html", "*.rs" = "html" } }You'll need terraform-ls installed; the instructions are
here.
Add this to your local languages.toml file to enable it
languages.toml:
[[language]]
name = "hcl"
language-servers = [ "terraform-ls" ]
language-id = "terraform"
[[language]]
name = "tfvars"
language-servers = [ "terraform-ls" ]
language-id = "terraform-vars"
[language-server.terraform-ls]
command = "terraform-ls"
args = ["serve"]
# config.indexing.ignorePaths = ["ignore.hcl"]To configure as your main formatter, read this.
The NPM versions and default builds of taplo does not contain the language server at this time. The
full version (with the language server) can be installed with:
cargo install taplo-cli --locked --features lspbrew install taplodocker run tamasfe/taplo --helplanguages.toml:
[[language]]
name = "toml"
# https://github.com/tamasfe/taplo/issues/580#issuecomment-2004174721
roots = ["."]
language-servers = ["taplo"]Note
To avoid potential issues with roots, that config doesn't include tombi.
Since tombi is a default LSP, that will disable it.
Run taplo lsp --help for more info.
https://github.com/typescript-language-server/typescript-language-server
typescript-language-server depends on typescript. Both packages can be
installed via npm:
npm install -g typescript typescript-language-serverTo configure type language server, add a
tsconfig.json
or jsconfig.json to
the root of your project.
Here's an example that disables type checking in JavaScript files.
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"checkJs": false
},
"exclude": ["node_modules"]
}Biome is a fast and efficient toolchain for web development that formats and lints code, supporting JavaScript, TypeScript, JSX, and JSON, with over 190 rules and high compatibility with existing tools like Prettier.
npm install --save-dev --save-exact @biomejs/biomeFollow the official instructions on how to configure Biome for Helix.
Important
The Biome CLI package doesn't ship with prebuilt binaries for Android yet. https://github.com/biomejs/biome/issues/1340
- Install the LSP:
npm i -g vscode-langservers-extracted- Add this to your
languages.toml:
[[language]]
name = "javascript"
language-servers = [
"typescript-language-server", # optional
"vscode-eslint-language-server",
]
[[language]]
name = "jsx"
language-servers = [
"typescript-language-server",
"vscode-eslint-language-server",
]
[[language]]
name = "typescript"
language-servers = [
"typescript-language-server",
"vscode-eslint-language-server",
]
[[language]]
name = "tsx"
language-servers = [
"typescript-language-server",
"vscode-eslint-language-server",
]https://github.com/microsoft/typespec
The language server is installed along with the compiler using npm:
npm install -g @typespec/compilerhttps://github.com/uben0/tree-sitter-typst/
cargo install --git https://github.com/nvarner/typst-lsp typst-lsp- language: https://www.uiua.org
- lsp: https://github.com/uiua-lang/uiua?tab=readme-ov-file#language-server
- tree-sitter: https://github.com/shnarazk/tree-sitter-uiua
[language-server.uiua-lsp]
command = "uiua"
args = ["lsp"]
[[language]]
name = "uiua"
scope = "source.uiua"
injection-regex = "uiua"
file-types = ["ua"]
roots = []
auto-format = true
comment-token = "#"
language-servers = [ "uiua-lsp" ]
indent = { tab-width = 2, unit = " " }
shebangs = ["uiua"]
auto-pairs = {'(' = ')', '{' = '}', '[' = ']', '"' = '"'}Unison language server.
More info: https://github.com/unisonweb/unison/blob/trunk/docs/language-server.markdown
Requirements:
-
ucmstarted -
ncat,ncornetcat
To ~/.config/helix/languages.toml append this code:
[language-server.ucm]
command = "ncat"
args = ["localhost", "5757"]
[[language]]
name = "unison"
language-servers = [ "ucm" ]https://github.com/vlang/v-analyzer
Clone, install and build:
git clone --filter=blob:none --recursive --shallow-submodules https://github.com/vlang/v-analyzer
cd v-analyzer
v build.vsh releaseor use the installer, and follow the instructions that it will print:
v -e "$(curl -fsSL https://raw.githubusercontent.com/vlang/v-analyzer/main/install.vsh)"
config path:
set the v-analyzer to environment variable:
PATH=your/path/v-analyzer/bin:$PATHhttps://github.com/vuejs/language-tools/tree/master/packages/language-server
The Vue language server vue-language-server can be installed via npm:
npm i -g @vue/language-serverIf you're using typescript, you'll also need the vue typescript plugin:
npm i -g @vue/typescript-pluginTo autoformat your .vue files upon save, you can first install prettier via
npm:
npm i -g prettierAnd then add this to your languages.toml file in your Helix configuration
directory:
[[language]]
name = "vue"
auto-format = true
formatter = { command = "prettier", args = ["--parser", "vue"] }
language-servers = ["typescript-language-server"]
[[language-server.typescript-language-server.config.plugins]]
name = "@vue/typescript-plugin"
location = "/full/path/to/node_modules/@vue/typescript-plugin"
languages = ["vue"]https://github.com/wgsl-analyzer/wgsl-analyzer
wgsl-analyzer can be installed via cargo:
cargo install --git https://github.com/wgsl-analyzer/wgsl-analyzer wgsl-analyzerhttps://github.com/bhsd-harry/vscode-extension-wikiparser
wikitext-lsp can be installed via npm:
npm i -g wikitext-lsphttps://github.com/redhat-developer/vscode-xml
wget https://github.com/redhat-developer/vscode-xml/releases/download/0.27.1/lemminx-linux.zip
- Download lemminx-linux.zip
- Extract and copy lemminx-linux binary to location in $PATH
- Install xmllint via package manger yay, dnf, pacman apt-get etc (rpm: dnf install libxml2)
Configuration:
[[language]]
name = "xml"
file-types = [ "xml", "svg", "xsd", "xslt", "xsl" ]
auto-format = true
formatter = { command = "xmllint", args = ["--format", "-"] }
language-servers = [ "xml" ]
[language-server.xml]
command = "lemminx-linux"
https://github.com/redhat-developer/yaml-language-server
yaml-language-server can be installed via brew on Mac:
brew install yaml-language-serveror via npm:
npm i -g yaml-language-server@nextExample configuration using json schemas.
[language-server.yaml-language-server.config.yaml]
format = { enable = true }
validation = true
[language-server.yaml-language-server.config.yaml.schemas]
"https://json.schemastore.org/github-workflow.json" = ".github/workflows/*.{yml,yaml}"
"https://raw.githubusercontent.com/ansible-community/schemas/main/f/ansible-tasks.json" = "roles/{tasks,handlers}/*.{yml,yaml}"Zig LSP implementation + Zig Language Server.
https://github.com/zigtools/zls
Non language-specific Language Server Protocols, non-coding LSPs, and others.
Harper is an English grammar and
spelling checker for comments and text.
Installing:
cargo install harper-ls --lockedHarper will need to be manually added to each language you'd like check's
language server list.
Usage:
[language-server.harper-ls]
command = "harper-ls"
args = ["--stdio"]Disabling specific rules.
[language-server.harper-ls.config.harper-ls.linters]
spaces = falseChange the default diagnosticSeverity from hint to warning:
[language-server.harper-ls.config.harper-ls]
diagnosticSeverity = "warning"Vale is a markup-aware linter for prose built with speed and extensibility in mind.
https://github.com/errata-ai/vale
| Tool | Extensible | Checks | Supports Markup | Built With | License |
|---|---|---|---|---|---|
| Vale | Yes (via YAML) | spelling, style | Yes (Markdown, AsciiDoc, reStructuredText, HTML, XML, Org) | Go | MIT |
The Vale Language Server is an implementation of the Language Server Protocol for Vale.
https://github.com/errata-ai/vale-ls
Vale supports linting source code comments in a number of languages
You must install both vale and vale-ls into your $PATH and add it to each
language you wish to lint, for example:
Since https://github.com/helix-editor/helix/pull/11636/ you only need to add:
[[language]]
name = "html"
language-servers = [ "vscode-html-language-server", "vale-ls" ]Before that PR:
languages.toml
[language-server.vale-ls]
command = "vale-ls"
[[language]]
name = "html"
language-servers = [ "vscode-html-language-server", "vale-ls" ]