True as of 2024-05-10, using Ubuntu on WSL
When you download the Roc binary, it comes bundled with the roc_language_server
.
If you want to use this language server with Neovim,
there's a bit of configuration that's required.
- Download and install Roc on your system following these instructions: https://www.roc-lang.org/install
- Make sure that the
roc_language_server
binary is available on your PATH. - Install the
neovim-lspconfig
plugin following their instructions. I use theLazy
plugin manager to do this. Make sure that the version you're using is up-to-date, as the Roc config was added recently. - Add this line to your
init.lua
:require("lspconfig").roc_ls.setup({})
- Associate the
.roc
extension with theroc
filetype by adding this to yourinit.lua
:vim.filetype.add({ extension = { roc = "roc" } })
- When you open a
.roc
file, it should now automatically start the language server. Additionally, if you havenvim-treesitter
installed, it should also automatically download the Roc lang syntax the first time you open a.roc
file, after associating the filetype.