My favorite editor is Zed, but I also like to have Helix configured for quick edits directly in the terminal.
Like Zed, Helix is written in Rust which makes it fast. Helix is a post modern text editor that runs inside the terminal. It uses the VIM philosophy, but changes a few things.
It comes pre-configured with a few things, like syntax highlighting. But it needs some work (minimal) to add things like a language server for your favorite language.
I use Elixir, so I want to configure ElixirLS to work with Helix.
-
Check if
hx
already knows where ElixirLS is
Configured language server: elixir-ls Binary for language server: /path/to/elixir-ls/elixir-ls Configured debug adapter: None Highlight queries: ✓ Textobject queries: ✓ Indent queries: ✓
If it doesn't know about it (it will report it can't find the binary), or you want a very specific version of ElixirLS, download the latest release from GitHub.
Unzip the archive
-
Locate
language-server.sh
and rename it toelixir-ls
mv /path/to/language-server.sh /path/to/elixir-ls
Move the whole ElixirLS folder to a preferred path
-
Add the following to your
.zshrc
export="/path/to/elixir-ls:$PATH"
Now if you run hx --health elixir
it should be able to find the server. Helix expects elixir-ls
to be in the PATH, that's why we needed to rename language-server.sh
.
If you are looking for more information or ways to customize language servers, you can check Helix's documentation.
Top comments (0)