I installed Roc (MacOS Apple Silicon). As expected, it created a "nightly" directory, and inside that directory there are two executables roc
and roc_lang_server
. Now, I'm trying to get my editor configuration to see and start the language server. Is the language server command roc_ls
or roc_lang_server
? According to the README in the lang_srv crate directory, the language server executable should be roc_ls
. But neither naming convention appears to work in my editor (Helix). Thanks for your help.
The name of the executable that is included in the nightly is roc_lang_server
. You need to make sure that it's in the PATH.
Occasionally the server crashes or seems to not respond, so that makes it more difficult to check if the setup is working.
roc_ls
is renamed to roc_lang_server
in package_release.sh
If you use VSCode Proper / Codium, you can add full path in the settings JSON: "roc-lang.language-server.exe": "..."
I've created good first issue #6330 to rename roc_ls
to roc_lang_server
everywhere. Descriptive names are nicer :)
Alex Kelley said:
I installed Roc (MacOS Apple Silicon). As expected, it created a "nightly" directory, and inside that directory there are two executables
roc
androc_lang_server
. Now, I'm trying to get my editor configuration to see and start the language server. Is the language server commandroc_ls
orroc_lang_server
? According to the README in the lang_srv crate directory, the language server executable should beroc_ls
. But neither naming convention appears to work in my editor (Helix). Thanks for your help.
Thanks everyone. It looks like I had my language.toml file (Helix editor) specified incorrectly.
For those using Helix, here's what's working for me:
[language-server.roc-ls]
command = "roc_lang_server"
[[language]]
name = "roc"
scope = "source.roc"
injection-regex = "roc"
file-types = ["roc"]
shebangs = ["roc"]
roots = []
auto-format = false
comment-token = "#"
language-servers = [ "roc-ls" ]
indent = { tab-width = 2, unit = " " }
auto-pairs = {'(' = ')', '{' = '}', '[' = ']', '"' = '"'}
[[grammar]]
name = "roc"
source.git = "https://github.com/adkelley/tree-sitter-roc"
source.rev = "d0c812eca21bd75005004bcef383a59ae6d5dc0e"
Note the commit hash (i.e., source.rev
) is subject to change
After updating your language.toml
file. Do the following:
$ hx -g fetch
$ hx -g build
$ mkdir -p $HELIX/runtime/queries/roc # or make your query directory
$ cp -r $HELIX/runtime/grammars/sources/roc/queries $HELIX/runtime/queries/roc
Thanks for sharing @Alex Kelley :)
Can you package the language server binary into nightly builds? This would make it possible to pull it into things like AUR packages.
@Alexander Pyattaev It is since c85b97d
Silly me. Now in AUR=)
Last updated: Jul 06 2025 at 12:14 UTC