Welcome to Snow CLI! Agentic coding in your terminal.
LSP (Language Server Protocol) is a standard protocol that enables a "language server" to provide capabilities to editors/tools, such as:
- Go to Definition
- Document Symbols / Outline
- Hover
- References
- Completion
Snow CLI will try to use LSP first for certain code-search capabilities. If LSP is unavailable or times out, it automatically falls back to regex/text-based search (so it won’t block usage).
Currently, LSP mainly enhances these built-in tools:
ace-search(action=find_definition): prefers LSP "go to definition"; falls back to regex search on failureace-search(action=file_outline): prefers LSPdocumentSymbol; falls back to regex search on failure
Notes:
- LSP calls have an internal timeout (default: 3 seconds). Large projects or cold-starting language servers may exceed this timeout and trigger fallback.
- Some servers (e.g., OmniSharp) strongly depend on accurate cursor position; it’s recommended to provide
contextFile + line + columnwhen calling tools (see below).
LSP config file path: ~/.snow/lsp-config.json
Loading behavior:
- When Snow CLI first needs LSP, it attempts to read
~/.snow/lsp-config.json. - If the file does not exist, Snow CLI creates a default config file and uses the built-in default server list.
- The config is cached in-process; restart Snow CLI after editing the file.
Two formats are supported:
{
"schemaVersion": 1,
"servers": {
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"],
"fileExtensions": [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"],
"installCommand": "npm install -g typescript-language-server typescript",
"initializationOptions": {}
}
}
}{
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"],
"fileExtensions": [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"]
}
}Each language server entry supports:
command(required): command used to start the language server (must be resolvable from PATH)args(required): argument arrayfileExtensions(required): file extensions used to match files to this languageinstallCommand(optional): an installation hint (Snow CLI will not run it automatically)initializationOptions(optional): forwarded to the LSPinitializerequest asinitializationOptions
Important:
- The config uses an "all-or-nothing" validation strategy: if any server entry is missing required fields or has incorrect types, the entire config is treated as invalid and Snow CLI falls back to defaults.
- Language selection is based on file extensions (e.g.,
.ts,.py). Ensure yourfileExtensionsmatch your actual project files.
Default language keys (you can add/remove/modify):
typescript:typescript-language-server --stdiopython:pylspgo:goplsrust:rust-analyzerjava:jdtlscsharp:csharp-ls
Note: installation methods differ by platform. The main requirement is that command can be found from your terminal.
On Windows, Snow CLI uses where <command> to check whether a language server is installed and available on PATH.
You can verify manually:
where typescript-language-server
where pylsp
where gopls
where rust-analyzer
where jdtls
where csharp-lsCommon installation examples:
- TypeScript / JavaScript
npm install -g typescript-language-server typescript- Python
python -m pip install python-lsp-server- Go
go install golang.org/x/tools/gopls@latestIf you don’t want to install LSP for a language, remove its entry (or remove its extensions). Snow CLI will fall back to regex search.
If you provide contextFile, Snow CLI will try LSP first; otherwise it uses regex search directly.
It’s recommended to pass cursor position:
line: 0-indexed (first line is 0)column: 0-indexed (first column is 0)
Example: if your editor shows "Line 34, Column 7", you usually pass line=33, column=6.
For extracting symbols from a single file, Snow CLI tries LSP documentSymbol first and falls back to regex search.
Tip:
- For large files/projects, start with
ace-search(action=file_outline) to get a high-level map, then drill down.
- Make sure
~/.snow/lsp-config.jsonis saved - Restart Snow CLI (config is cached)
Common causes:
- Language server not installed or not on PATH (verify with
where <command>on Windows) fileExtensionsdoes not match your actual file suffixes- Language server startup is slow and hits the 3s timeout
- Provide
contextFile + line + columnwhen callingace-search(action=find_definition) - If
symbolNameappears multiple times in the file and you don’t pass position, Snow CLI will try the first occurrence, which may be inaccurate