data/tools/lsp_tool library

Classes

LspCallHierarchyItem
LSP CallHierarchyItem.
LspDocumentSymbol
LSP DocumentSymbol (hierarchical).
LspHover
LSP Hover result.
LspIncomingCall
LSP CallHierarchyIncomingCall.
LspLocation
LSP Location.
LSP LocationLink.
LspOutgoingCall
LSP CallHierarchyOutgoingCall.
LspPosition
LSP Position (0-based).
LspRange
LSP Range.
LspServerManager
Abstract LSP server manager interface.
LspSymbolInformation
LSP SymbolInformation (flat).
LspTool
The LSPTool — code intelligence via Language Server Protocol.
LspToolInput
Input for the LSP tool.
LspToolOutput
Output of an LSP tool operation.

Enums

LspInitStatus
Initialization status of the LSP server.
LspOperation
All supported LSP operations.

Constants

lspToolDescription → const String
lspToolName → const String
maxLspFileSizeBytes → const int
Maximum file size accepted for LSP analysis (10 MB).

Functions

extractMarkupText(dynamic contents) String
Extract text content from MarkupContent or MarkedString.
formatDocumentSymbolResult(List<LspDocumentSymbol>? symbols, {String? cwd}) String
Format documentSymbol result (hierarchical outline).
formatFindReferencesResult(List<LspLocation>? locations, {String? cwd}) String
Format findReferences result.
formatGoToDefinitionResult(List<LspLocation>? locations, {String? cwd}) String
Format goToDefinition result.
formatHoverResult(LspHover? hover, {String? cwd}) String
Format hover result.
formatIncomingCallsResult(List<LspIncomingCall>? calls, {String? cwd}) String
Format incomingCalls result.
formatLocation(LspLocation location, {String? cwd}) String
Format a Location as "file:line:char".
formatOutgoingCallsResult(List<LspOutgoingCall>? calls, {String? cwd}) String
Format outgoingCalls result.
formatPrepareCallHierarchyResult(List<LspCallHierarchyItem>? items, {String? cwd}) String
Format prepareCallHierarchy result.
formatUri(String? uri, {String? cwd}) String
Format a URI to a relative path if possible.
formatWorkspaceSymbolResult(List<LspSymbolInformation>? symbols, {String? cwd}) String
Format workspaceSymbol result (flat list).
groupByFile<T>(List<T> items, String getUri(T), {String? cwd}) Map<String, List<T>>
Group items by their file URI.
isValidLspOperation(String operation) bool
Check if a string is a valid LSP operation name.
symbolKindToString(int kind) String
Maps LSP SymbolKind enum values to readable strings.