Skip to content

LSP Plugin ​

Help query: "What does the lsp plugin do?" / "How do I use lsp in Volt?" / "How do I start rust-analyzer?" / "C# LSP in Volt?" / "How do I start roslyn-language-server?" / "How do I start csharp-ls?" / "PowerShell LSP in Volt?" / "Terraform LSP in Volt?" / "How do I start terraform-ls?" / "How does go to definition open decompiled source?"

The lsp plugin is Volt's language server integration. It starts and stops servers, jumps to definition/references/implementation, shows diagnostics and code actions, supports Copilot sign-in, and auto-starts the right server when matching files open. Live sessions are Owned Processes: Workspace Close and Application Quit tear them down through Process Launch.

Package namelsp
Moduleuser/lsp.rs

What it does ​

  • Start, stop, and restart language servers (stop/restart choose a live session from a picker)
  • Go to definition, references, and implementation, including a read-only decompiled or virtual document when the target is not a project file
  • Show diagnostics and code actions
  • Install servers via picker and manage Copilot auth
  • Auto-start servers from buffer.file-open hook bindings by extension
  • Expose per-server lsp.start-* commands (rust-analyzer, marksman, roslyn-language-server, csharp-ls, typescript-language-server, powershell-editor-services, terraform-ls, and others)

Commands ​

CommandDescription
lsp.startStarts the language servers registered for the active file.
lsp.stopStops a live Language Server Session chosen from a picker.
lsp.restartRestarts a live Language Server Session chosen from a picker.
lsp.logOpens the live LSP transport log buffer.
lsp.definitionJumps to the LSP definition under the cursor, including a decompiled or virtual document.
lsp.referencesFinds LSP references for the symbol under the cursor, including a decompiled or virtual document.
lsp.implementationJumps to LSP implementations for the symbol under the cursor, including a decompiled or virtual document.
lsp.diagnosticsOpens a picker of current LSP diagnostics from live servers.
lsp.code-actions / lsp.code-actionOpens LSP code actions available at the cursor.
lsp.copilot-sign-inStarts GitHub Copilot device authentication for the active file.
lsp.copilot-sign-outSigns the active GitHub Copilot language server session out.
lsp.install-serverInstalls a Language Server from a picker, or a Spec id.

Additional lsp.start-* commands exist per registered server — see user/lsp.rs.

Keybindings ​

ChordCommandScope
Ctrl+Spacelsp.code-actionsWorkspace (Normal)

Notes ​

Auto-start bindings fire on buffer.file-open for registered extensions (.rs, .md, .ts/.tsx/.js/.jsx, .cs/.razor/.cshtml, .ps1/.psm1/.psd1, .tf/.tfvars/.tofu, and more). Language-server specs are exported from user/lsp.rs via language_servers(). Auto-start and lsp.start only launch servers with enabled_by_default (manual alternatives need their lsp.start-* command).

Definition, references, implementation, hover, and similar multi-session requests aggregate across live Language Server Sessions for the file. If one Session errors, Volt still returns results from Sessions that succeeded; the request fails only when every non-Copilot Session fails.

lsp.definition, lsp.references, and lsp.implementation open a normal project file when the location is in an open workspace or under the Language Server Session root. Any other location — a path outside those roots, or a URI with no filesystem path — opens a read-only lsp-metadata buffer. The buffer is pinned to the language server, session root, and server URI that returned the location, so later jumps in that buffer stay on that session.

roslyn-language-server returns decompiled metadata as a temporary file:// URI under MetadataAsSource. Volt reads that file into the lsp-metadata buffer. textDocument/didOpen for that document does not send workspace/didChangeWatchedFiles Created, so Roslyn keeps it as metadata-as-source instead of a new project file.

A location with no filesystem path (for example csharp:/... from csharp-ls) is fetched from the originating server with workspace/textDocumentContent, then csharp/metadata when the URI uses the csharp: scheme. The same read-only buffer and pin apply.

C#: Default Language Server is roslyn-language-server (roslyn-language-server): enabled by default for .cs, .razor, and .cshtml auto-start (lsp.auto-start-csharp / razor / cshtml). Install with lsp.install-server (dotnet tool, prerelease) or start with lsp.start-roslyn-language-server. Launch args include --stdio and --autoLoadProjects; initialize also sends initializationOptions.autoLoadProjects: 500. Root strategy is markers-or-workspace with *.sln, *.slnx, and *.csproj (a Solution loads into one Language Server Session). Document language ids map .razor / .cshtml to razor. csharp-ls remains registered but manual (enabled_by_default=false): start with lsp.start-csharp-ls (same extensions and Solution-oriented roots; keeps its csharp workspace configuration). Prefer one C# server at a time unless you intentionally run both.

PowerShell: The lang-powershell package (user/lang/powershell.rs) attaches on .ps1, .psm1, and .psd1 and registers tree-sitter grammar airbus-cert/tree-sitter-powershell. Highlight queries ship under crates/volt/assets/grammars/queries/powershell/. Default editor settings for the language id live in user/themes/global.toml under [langs.powershell]. LSP uses PowerShell Editor Services (powershell-editor-services): run lsp.install-server and pick that id, or lsp.start-powershell-editor-services. Install unpacks the PowerShellEditorServices.zip GitHub release and runs Start-EditorServices.ps1 via pwsh. Workspace roots can include *.psd1 or PSScriptAnalyzerSettings.psd1 markers.

Terraform: The lang-terraform package (user/lang/terraform.rs) attaches on .tf, .tfvars, and .tofu. Syntax uses the Terraform dialect from tree-sitter-grammars/tree-sitter-hcl (dialects/terraform). Highlight queries ship under crates/volt/assets/grammars/queries/terraform/. Defaults live in user/themes/global.toml under [langs.terraform]. Generic HCL (lang-hcl) covers .hcl and .nomad only — not .tf. LSP uses terraform-ls (terraform-ls): run lsp.install-server and pick that id, or lsp.start-terraform-ls. The server language id is terraform; .tfvars documents use language id terraform-vars. Workspace root markers include *.tf, *.tfvars, and .terraform.lock.hcl.

Volt — modal editor platform · docs optimized for in-editor help search