Can't configure my custom lsp server on NixOS #16102
|
Hi! I'm working on a lsp for a music language called CSound as a personal project. Since I'm working on Nixos I coded a nix expression to create my binary file and access it through a devshell. The expression builds the binary without any issue but I struggle with setting up Helix even when running languages.toml [[language]]
name = "csound"
scope = "source.csound"
file-types = ["csd", "sco", "orc"]
language-servers = ["cslsp"]My log: Where does Helix look up for language servers on NixOS if not in path? Should I put my binary somewhere else in my system? |
Replies: 1 comment 2 replies
|
[language-server.cslsp]
command = "cslsp"
# args = ["..."] # only if your server needs arguments
[[language]]
name = "csound"
scope = "source.csound"
file-types = ["csd", "sco", "orc"]
language-servers = ["cslsp"]You can put this in the project The error says the language server is ?not defined?, which is different from ?executable not found?: the missing piece is the |
language-servers = ["cslsp"]only references a server name; it does not define the command that Helix should start. Add a language-server definition alongside your language declaration:You can put this in the project
.helix/languages.tomlor your userlanguages.toml. Helix resolvescommandusing the environment of the Helix process, sowhich cslspmust succeed in the samenix develop/nix-shellenvironment from which you launch Helix. If you start Helix from the desktop, it ma…