Skip to content
ajit edited this page Nov 3, 2021 · 51 revisions

Missing syntax highlighting

If you are not using a package manager to install Helix, then you may have misplaced the required runtime folder. By default, it should be placed inside the same directory as the executable or inside the system's config directory. This is ~/.config/helix/ on Linux/MacOS, and ~/AppData/Roaming/helix/ on Windows. However, this can be overridden by setting the HELIX_RUNTIME environment variable to your desired directory.

Additionally, check if the runtime/grammars folder contains the associated compiled tree-sitter grammar for the language. It should not be empty.

LSP isn't working

Is the LSP server (E.g. rust-analyzer) in $PATH?

Try starting helix with the -v flag and checking the log file for LSP related messages.

On Windows

If you are on PowerShell, try these steps:

  • Check if the LSP server is available first by running gcm <lsp-command-name>. If you are unsure which LSP server is powering the language that you are using, then please refer to languages.toml. Upon running this command, you would see an output like this:

Image showing output of gcm command

  • Under Name column, notice the extension of these files. rust-analyzer ends with .exe, which is great, as it would work out of the box. But typescript-language-server ends with .ps1. In this case we would try to find a server file with .cmd extension:

output of gcm typescript-language-server.cmd showing that the corresponding file is available

  • That's good, we do have a .cmd file with us. We would use this filename as our LSP server for TypeScript. Open languages.toml file and type this in (you could find it in C:\Users\[username]\AppData\Roaming\helix\languages.toml, if it isn't present then create one):
[[language]]
name = "typescript"
language-server.command = "typescript-language-server.cmd"
  • Once you save the above file, close Helix and try to open your project again. Open the file you are expecting for LSP to work in. Within few seconds, Helix would be giving you errors and autocompletion.

Failed to execute C compiler (building from source)

Both a C and a C++ compiler need to be installed.

Rendering issues on MacOS terminal

The MacOS terminal lacks true color support, so you'll need to install a terminal that has it.