Skip to main content
Symbiotic Code integrates with your Language Server Protocol (LSP) to help the LLM interact with your codebase. It uses diagnostics to provide feedback to the LLM: after the agent edits or writes a file, any errors reported by the language server are added to the tool result so the agent can fix them.

Built-in LSP Servers

Symbiotic Code comes with several built-in LSP servers for popular languages: LSP servers are automatically enabled when one of the above file extensions are detected and the requirements are met. Auto-installed servers are stored in ~/.local/share/symbiotic/bin/.
You can disable automatic LSP server downloads by setting the SYMBIOTIC_DISABLE_LSP_DOWNLOAD environment variable to true. Servers that are already installed or available on your PATH still work.
To use ty instead of pyright for Python, set SYMBIOTIC_EXPERIMENTAL_LSP_TY=true. ty must be on your PATH or in your project’s virtual environment.

How it works

When Symbiotic Code opens a file, it:
  1. Checks the file extension against all enabled LSP servers.
  2. Finds the project root for each matching server (for example the nearest lockfile, go.mod, or Cargo.toml).
  3. Starts the appropriate LSP server for that root if not already running.
If a server fails to start, it isn’t retried for that root until Symbiotic Code restarts.

LSP tool (experimental)

Set SYMBIOTIC_EXPERIMENTAL_LSP_TOOL=true (or SYMBIOTIC_EXPERIMENTAL=true) to give the agent an lsp tool for code navigation: go to definition, find references, hover, document and workspace symbols, go to implementation, and call hierarchy. It’s controlled by the lsp permission.

Configure

You can customize LSP servers through the lsp section in your Symbiotic Code config.
symbiotic.json
Each LSP server supports the following:
Configuring a built-in server replaces how it is started: your command is used instead of the built-in detection and auto-install, and built-in initialization options are not sent. The server keeps its built-in extensions and root detection unless you override extensions.
Let’s look at some examples.

Environment variables

Use the env property to set environment variables when starting the LSP server:
symbiotic.json

Initialization options

Use the initialization property to pass initialization options to the LSP server. These are server-specific settings sent during the LSP initialize request:
symbiotic.json
Initialization options vary by LSP server. Check your LSP server’s documentation for available options.

Disabling LSP servers

To disable all LSP servers globally, set lsp to false:
symbiotic.json
To disable a specific LSP server, set disabled to true:
symbiotic.json

Custom LSP servers

You can add custom LSP servers by specifying the command and file extensions:
symbiotic.json
Custom servers are started in your current working directory.