hey! i'm just getting started with Roc and im exploring editors to use. I've used both Zed and VSCode so far, and I'm just wondering, is there no auto-indentation support as of now? and additionally, im not sure if this is just how it is, but the syntax highlighting sometimes colors everything, and then other times it only colors keywords.
There is an LSP built into the roc cli which provides semantic tokens for nicer highlighting. I know VS Code supports that, but I haven't tested it on the Zed extension.
Auto indentation should work... isn't that just using the format document action which delegates to roc fmt? I'm not sure I haven't looked to closely at that in a while.
Also -- it depends on if you are talking about the old rust or new zig compiler... :sweat_smile:
mm, whatever i installed from the archives on the website. im guessing the old rust compiler?
also, does the new language server work with vscode?
Looks like we need to make a new extension for that, can you confirm @Eli Dowling?
A new exention for vs code? ... I have been using @Ivan Demchenko's https://github.com/ivan-demchenko/roc-vscode-unofficial/pull/50
Should I just use path/roc experimental-lsp for the exe path in the extension settings?
I think that was basically the main change... and adding support for the --debug flag arguments our cli accepts
I get the following error:
LS executable path: Some(/Users/username/gitrepos/temp/roc_nightly-macos_apple_silicon-2026-04-14-c4161ad/roc experimental-lsp)
LS debug executable path: None
You are ready to Roc!Error: roc experimental-lsp received an unexpected argument: `--stdio`
[Error - 3:42:06 PM] Server process exited with code 1.
[Error - 3:42:06 PM] Server initialization failed.
I got the same error
LS executable path: Some(/Users/romain/Projects/roc-clay/roc_nightly-macos_apple_silicon-2026-06-16-6a21172/roc experimental-lsp)
LS debug executable path: None
You are ready to Roc!Error: roc experimental-lsp received an unexpected argument: `--stdio`
[Error - 13:46:49] Server initialization failed.
I'm taking a look at this @Romain Lepert
It is fixed in PR#9729 :)
Anton said:
It is fixed in PR#9729 :)
thank you Anton
LS executable path: Some(/Users/romain/.rocup/roc/roc experimental-lsp)
LS debug executable path: None
You are ready to Roc!Roc language server started
this looks the following issue is still ongoing for the language server.
#6792
suppose i have
# main.roc
app [Model, program] { rr: platform "https://github.com/lukewilliamboswell/roc-ray/releases/download/0.6/YsrMnLJw2ahDsyFXNEpipwWQfiM5DSxq5Ve6SyHczN7.tar.zst" }
# Foo.roc
import rr.Draw
Bar : Draw.Font
Then LSP type checks Foo.roc independently and therefore does not know about rr...
MODULE NOT FOUND
The type Font is qualified by the module rr.Draw, but that module was not found in this Roc project.
that means every module with a platform (that is not main) get an error report from the LSP :grimacing:
I plan from the issue it to add --main <path-to-main.roc> to the LSP
Start the experimental Roc language server (LSP)
Usage: roc experimental-lsp [OPTIONS]
Options:
--stdio Communicate over stdio (the default and only
transport; accepted for compatibility with LSP
clients that pass it explicitly)
--debug-transport Mirror all JSON-RPC traffic to a temp log file
--debug-build Log build environment actions to the debug log
--debug-syntax Log syntax/type checking steps to the debug log
--debug-server Log server lifecycle details to the debug log
-h, --help Print help
and then the vscode extension would be setup like
{
"roc-lang.language-server.exe": "/Users/romain/.rocup/roc/roc experimental-lsp --main <path-to-main.roc>",
}
{
"roc-lang.language-server.exe": "/Users/romain/.rocup/roc/roc experimental-lsp",
"roc-lang.language-server.main": "<path-to-main.roc>",
}
Last updated: Jul 23 2026 at 13:15 UTC