/** * LSP (Language Server Protocol) configuration and communication types */ export interface LspServerConfig { command: string; args?: string[]; extensionToLanguage: Record; transport?: "stdio" | "socket"; env?: Record; initializationOptions?: unknown; settings?: unknown; workspaceFolder?: string; startupTimeout?: number; shutdownTimeout?: number; restartOnCrash?: boolean; maxRestarts?: number; /** Internal: plugin directory path when the server is registered by a plugin */ pluginRoot?: string; } export interface LspConfig { [language: string]: LspServerConfig; } export interface LspPosition { line: number; character: number; } export interface LspRange { start: LspPosition; end: LspPosition; } export interface LspLocation { uri: string; range: LspRange; } export interface LspLocationLink { originSelectionRange?: LspRange; targetUri: string; targetRange: LspRange; targetSelectionRange?: LspRange; } export interface LspHover { contents: | string | { kind: string; value: string } | Array; range?: LspRange; } export interface LspSymbolInformation { name: string; kind: number; location: LspLocation; containerName?: string; } export interface LspDocumentSymbol { name: string; detail?: string; kind: number; range: LspRange; selectionRange: LspRange; children?: LspDocumentSymbol[]; } export interface LspCallHierarchyItem { name: string; kind: number; detail?: string; uri: string; range: LspRange; selectionRange: LspRange; } export interface LspCallHierarchyIncomingCall { from: LspCallHierarchyItem; fromRanges: LspRange[]; } export interface LspCallHierarchyOutgoingCall { to: LspCallHierarchyItem; fromRanges: LspRange[]; } export interface ILspManager { execute(args: { operation: string; filePath: string; line: number; character: number; }): Promise<{ success: boolean; content: string }>; }