LSPs
Crush can use LSPs for additional context to help inform its decisions, just like you would. LSPs can be added manually like so:
bash
# crushrc
lsp add go --command "gopls" --env "GOTOOLCHAIN go1.24.5"
lsp add typescript --command "typescript-language-server" --args --stdio
lsp add nix --command "nil"Command Reference
Manage language servers.
text
Usage:
lsp [command]
Available Commands:
add Add or update a language server
remove Remove a language server
rm Alias for removelsp add
Add a language server, or update an existing server with the same name.
text
Usage:
lsp add <name> --command <command> [flags]
Flags:
--args string command argument (repeatable)
--env key value environment variable (repeatable)
--filetypes string file type to attach to (repeatable)
--root-markers string root marker file (repeatable)
--timeout int startup timeout in seconds
--disabled bool disable without removing
--init-options JSON initialization options
--options JSON server settingsbash
lsp add go --command gopls --env GOPATH "$HOME/go"lsp remove
Remove a language server.
text
Usage:
lsp remove <name>
lsp rm <name>