Installing Helix Editor Language Servers
I’ve been using Helix Editor as my daily driver for web development for most of this year and – while it has some outstanding issues1 (what doesn’t?) – I’m really enjoying it.2
One of the issues that might trip new folks is that while it has Language Server Protocol (LSP) support, and while there are default Language Servers configured, installing Helix Editor doesn’t actually install those language servers.3
Another issue is that since many of the language servers are written in Node.js and installed as global modules, if you update your version of Node (e.g., using nvm.fish on fish shell), you will also have to reinstall your language servers.
Needless to say, this can get tedious so here’s a little script I hacked together today for myself to easily install (and reinstall) the Language Servers I use for web development (mostly HTML, JS, CSS, and Node.js with Kitten these days) in Helix Editor.
I’m sharing it below in case it helps anyone else. Please feel free to adapt and use it for yourself.
Copy the code into a file named, e.g., install-helix-language-servers
Make that file executable. e.g.:
chmod +x install-helix-language-servers
Adapt it for your own needs (see notes) and enjoy!
If you’re running this on Fedora Silverblue or other immutable Linux distribution, make sure you do so from a mutable container (e.g., via Toolbox or Distrobox) that has the Rust toolchain installed so that the Language Servers that are installed by Cargo (e.g., TOML) can be compiled properly.
Note: TOML Language Server requires latest Rust to compile. Tested to work on 1.65.0 (does not work on 1.60.0). See https://github.com/tamasfe/taplo/issues/349
If you’re on a non-Linux platform, please modify the script accordingly.
You can find installation instructions for all Language Servers supported by Helix Editor at: https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers
Like this? Fund us!
Small Technology Foundation is a tiny, independent not-for-profit.
We exist in part thanks to patronage by people like you. If you share our vision and want to support our work, please become a patron or donate to us today and help us continue to exist.
Soft wrap doesn’t exist yet, for example, which makes it nigh on impossible to edit Markdown in it. For that, I’m currently using MarkText. ↩︎
This is not something I thought I’d ever say for a modal editor but Helix gets a lot of things right. While there is definitely a learning curve, I feel like I now think about my code as code instead of as lines of text and characters as I’m working and that’s a good feeling. ↩︎
This is understandable as not everyone needs or wants to install every language server. Especially considering that language servers can be very large. For example, the ltex-ls language server for Markdown is roughtly a 265MB download. ↩︎