You can use the lang server in a flake like this:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
roc.url = "github:roc-lang/roc";
};
outputs = {nixpkgs, roc, flake-utils, ...}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
rocPkgs = roc.packages.${system};
in
{
devShells = {
default = pkgs.mkShell {
buildInputs = with pkgs;
[
rocPkgs.cli
rocPkgs.lang-server
];
};
};
}
);
}
If you do nix develop
followed by whcih roc_ls
, you'll get the path of the lang_server, which you'll need to provide in the settings for the vscode roc plugin.
That did the trick, thank you!!
Andrew Bucknall has marked this topic as resolved.
Last updated: Jul 06 2025 at 12:14 UTC