Language Server (LSP)
The optional lsp plugin lets Chetty check code files and answer questions about them with a real language server instead of text search.
Install the plugin
- Open Settings → Available plugins and install lsp.
The plugin needs Chetty 0.30.47 or later. Project and tool permissions still apply. Check the registry for the plugin's current version and minimum Chetty version.
Note: Enabling or disabling the plugin restarts Chetty. The change applies after the restart.
The plugin has no page in the main navigation and no account panel.
Check a file
After Chetty edits a file, it checks the file in the background and gives the model any new errors and warnings on its next turn. The first check starts the language server, and disabling the plugin stops its servers.
In a conversation, the LSP entry in the chat rail shows whether live diagnostics are active, marked Active or Inactive.
Checks are best effort: Chetty checks the files it writes and edits itself, while a file changed outside Chetty is checked only when a tool asks for it. A file with no matching language server is skipped. If a check is dropped, ask Chetty to run it again.
Ask about a file or symbol
| Tool | What it does |
|---|---|
LspDiagnostics |
Checks a file and returns errors and warnings with line and column positions. |
LspGoToDefinition |
Finds a symbol's definition. |
LspFindReferences |
Lists references to a symbol. |
LspHover |
Shows a symbol's type and documentation. |
LspDocumentSymbol |
Lists a file's functions, classes and variables. |
LspWorkspaceSymbol |
Searches symbols by name in the current workspace. |
All six tools are read-only and safe in plan mode.
A workspace-symbol search that fails says so, instead of reporting that no symbols exist. A cancelled search is reported as cancelled, and an empty result means the server answered successfully.
Supported languages
Chetty supports language servers for TypeScript and JavaScript, Python, Go, Rust, Ruby, PHP, C and C++, Lua, YAML and Bash. A language without an installed server is skipped.
Administrators can install the npm-based servers through the plugin's /lsp command: TypeScript, Pyright, Intelephense, YAML and Bash. Other servers are installed with their language toolchains. Core setup does not install language servers.
On the host, installed npm servers share the plugin's persistent data directory under npm, which is searched before PATH. Existing host installations need an offline move by an administrator before this update is activated; the plugin does not search the former location. The administrator procedure below describes the move and rollback. Servers provided on PATH remain available.
In a managed Project, servers run in that Project's environment, separately for each account.
Work on a paired computer
- Select the paired computer in the Project picker, then open a conversation in it.
- Install the language server you need on that computer and make it available on the computer's PATH.
All six tools and the automatic after-edit checks then run on that computer, and the conversation's working directory is the workspace. Each account and conversation owns its own server, and changing the selected computer or working directory releases the previous one.
If the computer is disconnected, the check reports a failure. Reconnect the computer and repeat the check: Chetty does not repeat a request that lost its answer.
Settings
| Setting | Default | What it does |
|---|---|---|
| Live diagnostics | On | Checks edits. Turning it off stops running servers; the tools stay listed and report that LSP is off. |
| How long to keep servers running | 1 minute | Idle lifetime of a server. Zero disables idle expiry, but the server is still released when the conversation's work finishes. |
Each setting shows a short hint, and the help icon gives more detail.
Saving these settings, or using the /lsp toggle, requests a Chetty restart, so the change applies after the restart.
Administer language servers
Administrators can run /lsp in the Chetty CLI to see server status, switch diagnostics on or off, and install or remove the npm-managed servers. The /lsp toggle writes the same Live diagnostics setting.
:::admin
Before activating this update on an existing host installation, move the old npm prefix to the plugin's persistent data directory under npm. This is offline POSIX maintenance, not an automatic migration:
Stop every process that owns either prefix and exclude concurrent writers for the entire move. The command does not discover processes or acquire that exclusion for you.
Choose absolute, disjoint source and destination paths. The source must be a real npm prefix with
lib/node_modulesand optionallybin. The destination's parent must already be a real directory, not a symlink; the destination itself must not exist, even as an empty directory or symlink. Do not create it beforehand.From the matching source checkout, using Node with TypeScript support, run the command below with your explicit paths. It validates the prefix and performs only a same-filesystem directory rename: no overwrite, package installation, deletion or cross-device copy fallback.
source-missingmeans the source was not found, not that migration succeeded.node plugins/lsp/scripts/migrate-prefix.mjs --source /absolute/old-prefix --destination /absolute/new-prefixAfter separately approved activation, check the server inventory and run a real diagnostic on a file. Successful synthetic checks or a rename alone do not establish runtime readiness.
To roll back, stop all owners and exclude concurrent writers again, then run the same command with the two paths reversed. The former source must be absent so it can become the destination, and the same filesystem and directory requirements still apply. This moves the entire current prefix back; it does not undo later package changes or restore an earlier snapshot. :::