Skip to content

Language Server Protocol (lsp) ​

Provides code intelligence via the Language Server Protocol. Supports definitions, references, hover, symbols, call hierarchy, diagnostics, and code actions.

Operations ​

OperationDescription
goToDefinitionJump to symbol definition
findReferencesFind all references to a symbol
hoverShow type info, documentation, and signature at a location
documentSymbolList symbols in a file
workspaceSymbolSearch for symbols across the workspace
goToImplementationJump to symbol implementation
prepareCallHierarchyPrepare call hierarchy at a location
incomingCallsShow callers of a function
outgoingCallsShow functions called by a function
diagnosticsShow diagnostics for a specific file
workspaceDiagnosticsShow diagnostics across the entire workspace
codeActionsGet available code actions (quickfix, refactor, etc.)

Parameters ​

ParameterRequiredDescription
operationYesThe LSP operation to perform (see table above)
filePathNoAbsolute or workspace-relative file path
lineNo1-based line number for location-targeted operations
characterNo1-based character/column number for location-targeted operations
endLineNo1-based end line for range-based operations
endCharacterNo1-based end character for range-based operations
queryNoSymbol query for workspace symbol search
serverNameNoOptional LSP server name to target
limitNoOptional maximum number of results to return

Location-targeted operations (goToDefinition, findReferences, hover, goToImplementation, prepareCallHierarchy) require filePath + line + character.

Range-based operations (diagnostics, codeActions) require filePath and optionally line/endLine.

See Also ​

Released under the Apache-2.0 License.