ncode

CLI docs Language servers

ncode CLI Features

Language servers

With a language server installed, agents can use the lsp tool to find their way through code by meaning rather than by text search:

OperationAnswers
goToDefinitionwhere a symbol is defined
findReferencesevery use of a symbol
goToImplementationthe implementations of an interface or behaviour
hoverthe type and documentation at a position
documentSymbolthe symbols of one file
workspaceSymbola symbol anywhere in the project

ncode starts one server per project and language when an agent first needs it, and stops it again after five minutes without a request. Each request has 30 seconds. Paths stay confined to the project.

Default servers#

ncode does not install language servers. It runs these commands when they are on your PATH:

LanguageCommand
Elixirelixir-ls --stdio
TypeScript, JavaScripttypescript-language-server --stdio
Pythonpyright-langserver --stdio
Rustrust-analyzer
Gogopls serve
C, C++clangd --log=error
Rubysolargraph stdio
Javajdtls
Swiftsourcekit-lsp
Zigzls
Erlangnone; set one yourself

Using another command#

Settings → Language servers has one row per language. Set your own command there, or from a shell:

sh
ncode config set lsp.python "basedpyright-langserver --stdio"
ncode config reset lsp.python

A changed command applies to the next server that starts.