LspServer
Section titled “LspServer”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LspServer( transport: HttpTransport, languageId: string, pathToProject: string): LspServer;Parameters:
transportHttpTransportlanguageIdstringpathToProjectstring
Returns:
LspServer
Methods
Section titled “Methods”[Symbol.asyncDispose]()
Section titled “[Symbol.asyncDispose]()”[Symbol.asyncDispose](): Promise<void>;Returns:
Promise<void>
completions()
Section titled “completions()”completions( uri: string, position: LspPosition, options: LspCompletionsOptions = {}): Promise<LspCompletionList>;Parameters:
uristringpositionLspPositionoptionsLspCompletionsOptions = {}
Returns:
Promise<LspCompletionList>
didClose()
Section titled “didClose()”didClose(uri: string): Promise<void>;Parameters:
uristring
Returns:
Promise<void>
didOpen()
Section titled “didOpen()”didOpen(uri: string): Promise<void>;Parameters:
uristring
Returns:
Promise<void>
documentSymbols()
Section titled “documentSymbols()”documentSymbols(uri: string): Promise<LspSymbol[]>;Parameters:
uristring
Returns:
Promise<LspSymbol[]>
stop()
Section titled “stop()”stop(): Promise<void>;Returns:
Promise<void>
workspaceSymbols()
Section titled “workspaceSymbols()”workspaceSymbols(query: string): Promise<LspSymbol[]>;Parameters:
querystring
Returns:
Promise<LspSymbol[]>
LspService
Section titled “LspService”Sandbox LSP namespace.
Every call is scoped by languageId + pathToProject: the daemon keys one
language server per pair, starting it on demand and reusing it afterwards.
start() is therefore about controlling WHEN the server boots (and
surfacing LSP_SERVER_UNAVAILABLE when the image lacks it), not a
precondition the other calls can skip — they answer LSP_NOT_STARTED
rather than starting one implicitly.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LspService(transport: HttpTransport): LspService;Parameters:
transportHttpTransport
Returns:
LspService
Methods
Section titled “Methods”start()
Section titled “start()”start(languageId: string, pathToProject: string): Promise<LspServer>;Start the language server for a project.
Parameters:
languageIdstringpathToProjectstring
Returns:
Promise<LspServer>
LspCompletionsOptions
Section titled “LspCompletionsOptions”Properties:
context?toolbox.CompletionRequest[‘context’]
LspCompletionItem
Section titled “LspCompletionItem”type LspCompletionItem = { [key: string]: unknown} & Omit<toolbox.CompletionItem, 'documentation'> & { documentation?: unknown}One completion candidate. Shape follows the language server, so the
daemon passes items through with only isIncomplete/items normalized.
LspCompletionList
Section titled “LspCompletionList”type LspCompletionList = Omit<toolbox.CompletionList, 'items'> & { items: LspCompletionItem[] }LspLocation
Section titled “LspLocation”type LspLocation = toolbox.SymbolLocationLspPosition
Section titled “LspPosition”type LspPosition = toolbox.SymbolPositionA zero-based LSP position.
LspRange
Section titled “LspRange”type LspRange = toolbox.SymbolRangeLspSymbol
Section titled “LspSymbol”type LspSymbol = toolbox.SymbolInfoOne symbol from documentSymbols() / workspaceSymbols().