@nocturnium/svelte-ide 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +251 -0
- package/dist/components/agents/AgentActivityPanel.svelte +565 -0
- package/dist/components/agents/AgentActivityPanel.svelte.d.ts +24 -0
- package/dist/components/agents/AgentAvatar.svelte +417 -0
- package/dist/components/agents/AgentAvatar.svelte.d.ts +23 -0
- package/dist/components/agents/AgentCursor.svelte +224 -0
- package/dist/components/agents/AgentCursor.svelte.d.ts +35 -0
- package/dist/components/agents/AgentPresenceBar.svelte +261 -0
- package/dist/components/agents/AgentPresenceBar.svelte.d.ts +20 -0
- package/dist/components/agents/index.d.ts +4 -0
- package/dist/components/agents/index.js +5 -0
- package/dist/components/ai/AIConversationList.svelte +524 -0
- package/dist/components/ai/AIConversationList.svelte.d.ts +17 -0
- package/dist/components/ai/AIEditPreview.svelte +132 -0
- package/dist/components/ai/AIEditPreview.svelte.d.ts +8 -0
- package/dist/components/ai/AIInlineEdit.svelte +155 -0
- package/dist/components/ai/AIInlineEdit.svelte.d.ts +10 -0
- package/dist/components/ai/AIMessage.svelte +239 -0
- package/dist/components/ai/AIMessage.svelte.d.ts +13 -0
- package/dist/components/ai/AIMessageActions.svelte +176 -0
- package/dist/components/ai/AIMessageActions.svelte.d.ts +12 -0
- package/dist/components/ai/AIMessageContent.svelte +355 -0
- package/dist/components/ai/AIMessageContent.svelte.d.ts +7 -0
- package/dist/components/ai/AIPanel.svelte +561 -0
- package/dist/components/ai/AIPanel.svelte.d.ts +7 -0
- package/dist/components/ai/AISuggestionWidget.svelte +132 -0
- package/dist/components/ai/AISuggestionWidget.svelte.d.ts +10 -0
- package/dist/components/ai/AIToolCallDisplay.svelte +317 -0
- package/dist/components/ai/AIToolCallDisplay.svelte.d.ts +12 -0
- package/dist/components/ai/index.d.ts +9 -0
- package/dist/components/ai/index.js +10 -0
- package/dist/components/core/Avatar.svelte +110 -0
- package/dist/components/core/Avatar.svelte.d.ts +12 -0
- package/dist/components/core/Badge.svelte +98 -0
- package/dist/components/core/Badge.svelte.d.ts +11 -0
- package/dist/components/core/Button.svelte +175 -0
- package/dist/components/core/Button.svelte.d.ts +18 -0
- package/dist/components/core/ConnectionStatus.svelte +294 -0
- package/dist/components/core/ConnectionStatus.svelte.d.ts +20 -0
- package/dist/components/core/ContextMenu.svelte +176 -0
- package/dist/components/core/ContextMenu.svelte.d.ts +19 -0
- package/dist/components/core/ErrorBoundary.svelte +277 -0
- package/dist/components/core/ErrorBoundary.svelte.d.ts +23 -0
- package/dist/components/core/Icon.svelte +107 -0
- package/dist/components/core/Icon.svelte.d.ts +8 -0
- package/dist/components/core/Input.svelte +138 -0
- package/dist/components/core/Input.svelte.d.ts +20 -0
- package/dist/components/core/Kbd.svelte +34 -0
- package/dist/components/core/Kbd.svelte.d.ts +7 -0
- package/dist/components/core/ResizeHandle.svelte +200 -0
- package/dist/components/core/ResizeHandle.svelte.d.ts +23 -0
- package/dist/components/core/Spinner.svelte +35 -0
- package/dist/components/core/Spinner.svelte.d.ts +7 -0
- package/dist/components/core/Textarea.svelte +112 -0
- package/dist/components/core/Textarea.svelte.d.ts +18 -0
- package/dist/components/core/Tooltip.svelte +103 -0
- package/dist/components/core/Tooltip.svelte.d.ts +11 -0
- package/dist/components/core/index.d.ts +13 -0
- package/dist/components/core/index.js +14 -0
- package/dist/components/editor/AIFocusLayer.svelte +430 -0
- package/dist/components/editor/AIFocusLayer.svelte.d.ts +32 -0
- package/dist/components/editor/Breadcrumbs.svelte +435 -0
- package/dist/components/editor/Breadcrumbs.svelte.d.ts +33 -0
- package/dist/components/editor/BreakpointLayer.svelte +642 -0
- package/dist/components/editor/BreakpointLayer.svelte.d.ts +20 -0
- package/dist/components/editor/CognitiveLoadMeter.svelte +324 -0
- package/dist/components/editor/CognitiveLoadMeter.svelte.d.ts +18 -0
- package/dist/components/editor/CollaborativeEditor.svelte +218 -0
- package/dist/components/editor/CollaborativeEditor.svelte.d.ts +32 -0
- package/dist/components/editor/CommandPalette.svelte +434 -0
- package/dist/components/editor/CommandPalette.svelte.d.ts +11 -0
- package/dist/components/editor/ComplexityLayer.svelte +293 -0
- package/dist/components/editor/ComplexityLayer.svelte.d.ts +23 -0
- package/dist/components/editor/ConflictZoneLayer.svelte +441 -0
- package/dist/components/editor/ConflictZoneLayer.svelte.d.ts +25 -0
- package/dist/components/editor/ContextLens.svelte +262 -0
- package/dist/components/editor/ContextLens.svelte.d.ts +27 -0
- package/dist/components/editor/CustomEditor.svelte +1242 -0
- package/dist/components/editor/CustomEditor.svelte.d.ts +37 -0
- package/dist/components/editor/DebugConsole.svelte +646 -0
- package/dist/components/editor/DebugConsole.svelte.d.ts +41 -0
- package/dist/components/editor/EchoCursorLayer.svelte +363 -0
- package/dist/components/editor/EchoCursorLayer.svelte.d.ts +24 -0
- package/dist/components/editor/Editor.svelte +61 -0
- package/dist/components/editor/Editor.svelte.d.ts +22 -0
- package/dist/components/editor/EditorGutter.svelte +119 -0
- package/dist/components/editor/EditorGutter.svelte.d.ts +19 -0
- package/dist/components/editor/EditorLines.svelte +182 -0
- package/dist/components/editor/EditorLines.svelte.d.ts +43 -0
- package/dist/components/editor/EditorPane.svelte +134 -0
- package/dist/components/editor/EditorPane.svelte.d.ts +9 -0
- package/dist/components/editor/EditorSelections.svelte +186 -0
- package/dist/components/editor/EditorSelections.svelte.d.ts +25 -0
- package/dist/components/editor/EditorTabs.svelte +170 -0
- package/dist/components/editor/EditorTabs.svelte.d.ts +12 -0
- package/dist/components/editor/FileExplorer.svelte +811 -0
- package/dist/components/editor/FileExplorer.svelte.d.ts +67 -0
- package/dist/components/editor/FileIcon.svelte +110 -0
- package/dist/components/editor/FileIcon.svelte.d.ts +10 -0
- package/dist/components/editor/FindReplace.svelte +448 -0
- package/dist/components/editor/FindReplace.svelte.d.ts +40 -0
- package/dist/components/editor/GhostBracketLayer.svelte +391 -0
- package/dist/components/editor/GhostBracketLayer.svelte.d.ts +24 -0
- package/dist/components/editor/GitBlameLayer.svelte +436 -0
- package/dist/components/editor/GitBlameLayer.svelte.d.ts +18 -0
- package/dist/components/editor/InlineDiagnosticsLayer.svelte +540 -0
- package/dist/components/editor/InlineDiagnosticsLayer.svelte.d.ts +35 -0
- package/dist/components/editor/InlineDiffLayer.svelte +337 -0
- package/dist/components/editor/InlineDiffLayer.svelte.d.ts +31 -0
- package/dist/components/editor/MinimalEditor.svelte +75 -0
- package/dist/components/editor/MinimalEditor.svelte.d.ts +6 -0
- package/dist/components/editor/MinimalEditor2.svelte +84 -0
- package/dist/components/editor/MinimalEditor2.svelte.d.ts +6 -0
- package/dist/components/editor/Minimap.svelte +327 -0
- package/dist/components/editor/Minimap.svelte.d.ts +34 -0
- package/dist/components/editor/PluginPreviewSandbox.svelte +793 -0
- package/dist/components/editor/PluginPreviewSandbox.svelte.d.ts +49 -0
- package/dist/components/editor/ProblemsPanel.svelte +628 -0
- package/dist/components/editor/ProblemsPanel.svelte.d.ts +25 -0
- package/dist/components/editor/QuickActionsMenu.svelte +403 -0
- package/dist/components/editor/QuickActionsMenu.svelte.d.ts +18 -0
- package/dist/components/editor/SnippetPalette.svelte +530 -0
- package/dist/components/editor/SnippetPalette.svelte.d.ts +16 -0
- package/dist/components/editor/StructureMap.svelte +431 -0
- package/dist/components/editor/StructureMap.svelte.d.ts +37 -0
- package/dist/components/editor/SymbolOutline.svelte +722 -0
- package/dist/components/editor/SymbolOutline.svelte.d.ts +44 -0
- package/dist/components/editor/TimelineScrubber.svelte +470 -0
- package/dist/components/editor/TimelineScrubber.svelte.d.ts +40 -0
- package/dist/components/editor/TokenRenderer.svelte +69 -0
- package/dist/components/editor/TokenRenderer.svelte.d.ts +15 -0
- package/dist/components/editor/constants.d.ts +32 -0
- package/dist/components/editor/constants.js +36 -0
- package/dist/components/editor/core/ai-awareness.d.ts +176 -0
- package/dist/components/editor/core/ai-awareness.js +210 -0
- package/dist/components/editor/core/bracket-healer.d.ts +189 -0
- package/dist/components/editor/core/bracket-healer.js +406 -0
- package/dist/components/editor/core/breakpoints.d.ts +203 -0
- package/dist/components/editor/core/breakpoints.js +414 -0
- package/dist/components/editor/core/commands.d.ts +108 -0
- package/dist/components/editor/core/commands.js +246 -0
- package/dist/components/editor/core/complexity-analyzer.d.ts +123 -0
- package/dist/components/editor/core/complexity-analyzer.js +376 -0
- package/dist/components/editor/core/conflict-predictor.d.ts +135 -0
- package/dist/components/editor/core/conflict-predictor.js +316 -0
- package/dist/components/editor/core/crdt-binding.d.ts +118 -0
- package/dist/components/editor/core/crdt-binding.js +286 -0
- package/dist/components/editor/core/diagnostics.d.ts +210 -0
- package/dist/components/editor/core/diagnostics.js +335 -0
- package/dist/components/editor/core/echo-cursor.d.ts +201 -0
- package/dist/components/editor/core/echo-cursor.js +267 -0
- package/dist/components/editor/core/folding.d.ts +124 -0
- package/dist/components/editor/core/folding.js +672 -0
- package/dist/components/editor/core/ghost-pair.d.ts +122 -0
- package/dist/components/editor/core/ghost-pair.js +221 -0
- package/dist/components/editor/core/git-blame.d.ts +170 -0
- package/dist/components/editor/core/git-blame.js +324 -0
- package/dist/components/editor/core/index.d.ts +26 -0
- package/dist/components/editor/core/index.js +24 -0
- package/dist/components/editor/core/keybindings.d.ts +79 -0
- package/dist/components/editor/core/keybindings.js +357 -0
- package/dist/components/editor/core/multi-cursor.d.ts +196 -0
- package/dist/components/editor/core/multi-cursor.js +521 -0
- package/dist/components/editor/core/navigation.d.ts +107 -0
- package/dist/components/editor/core/navigation.js +408 -0
- package/dist/components/editor/core/quick-actions.d.ts +189 -0
- package/dist/components/editor/core/quick-actions.js +427 -0
- package/dist/components/editor/core/search.d.ts +88 -0
- package/dist/components/editor/core/search.js +192 -0
- package/dist/components/editor/core/semantic-analyzer.d.ts +77 -0
- package/dist/components/editor/core/semantic-analyzer.js +424 -0
- package/dist/components/editor/core/snippet-manager.d.ts +202 -0
- package/dist/components/editor/core/snippet-manager.js +565 -0
- package/dist/components/editor/core/state.d.ts +367 -0
- package/dist/components/editor/core/state.js +900 -0
- package/dist/components/editor/core/timeline.d.ts +204 -0
- package/dist/components/editor/core/timeline.js +349 -0
- package/dist/components/editor/editor-find.d.ts +56 -0
- package/dist/components/editor/editor-find.js +148 -0
- package/dist/components/editor/editor-input.d.ts +77 -0
- package/dist/components/editor/editor-input.js +445 -0
- package/dist/components/editor/editor-multicursor.d.ts +21 -0
- package/dist/components/editor/editor-multicursor.js +196 -0
- package/dist/components/editor/editor-scroll.d.ts +14 -0
- package/dist/components/editor/editor-scroll.js +34 -0
- package/dist/components/editor/index.d.ts +15 -0
- package/dist/components/editor/index.js +21 -0
- package/dist/components/editor/languages.d.ts +62 -0
- package/dist/components/editor/languages.js +285 -0
- package/dist/components/editor/theme.d.ts +88 -0
- package/dist/components/editor/theme.js +139 -0
- package/dist/components/editor/tokenizer/base.d.ts +40 -0
- package/dist/components/editor/tokenizer/base.js +203 -0
- package/dist/components/editor/tokenizer/index.d.ts +56 -0
- package/dist/components/editor/tokenizer/index.js +215 -0
- package/dist/components/editor/tokenizer/languages/css.d.ts +17 -0
- package/dist/components/editor/tokenizer/languages/css.js +194 -0
- package/dist/components/editor/tokenizer/languages/go.d.ts +17 -0
- package/dist/components/editor/tokenizer/languages/go.js +220 -0
- package/dist/components/editor/tokenizer/languages/html.d.ts +24 -0
- package/dist/components/editor/tokenizer/languages/html.js +145 -0
- package/dist/components/editor/tokenizer/languages/javascript.d.ts +56 -0
- package/dist/components/editor/tokenizer/languages/javascript.js +452 -0
- package/dist/components/editor/tokenizer/languages/json.d.ts +12 -0
- package/dist/components/editor/tokenizer/languages/json.js +91 -0
- package/dist/components/editor/tokenizer/languages/markdown.d.ts +16 -0
- package/dist/components/editor/tokenizer/languages/markdown.js +156 -0
- package/dist/components/editor/tokenizer/languages/python.d.ts +20 -0
- package/dist/components/editor/tokenizer/languages/python.js +227 -0
- package/dist/components/editor/tokenizer/languages/svelte.d.ts +40 -0
- package/dist/components/editor/tokenizer/languages/svelte.js +326 -0
- package/dist/components/editor/tokenizer/types.d.ts +86 -0
- package/dist/components/editor/tokenizer/types.js +4 -0
- package/dist/components/layout/IDELayout.svelte +274 -0
- package/dist/components/layout/IDELayout.svelte.d.ts +29 -0
- package/dist/components/layout/StatusBar.svelte +511 -0
- package/dist/components/layout/StatusBar.svelte.d.ts +47 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/index.js +3 -0
- package/dist/components/lsp/AutocompleteWidget.svelte +364 -0
- package/dist/components/lsp/AutocompleteWidget.svelte.d.ts +33 -0
- package/dist/components/lsp/DiagnosticMarker.svelte +166 -0
- package/dist/components/lsp/DiagnosticMarker.svelte.d.ts +19 -0
- package/dist/components/lsp/DiagnosticsPanel.svelte +388 -0
- package/dist/components/lsp/DiagnosticsPanel.svelte.d.ts +21 -0
- package/dist/components/lsp/HoverTooltip.svelte +274 -0
- package/dist/components/lsp/HoverTooltip.svelte.d.ts +24 -0
- package/dist/components/lsp/LSPEditor.svelte +486 -0
- package/dist/components/lsp/LSPEditor.svelte.d.ts +39 -0
- package/dist/components/lsp/SignatureHelpWidget.svelte +216 -0
- package/dist/components/lsp/SignatureHelpWidget.svelte.d.ts +22 -0
- package/dist/components/lsp/index.d.ts +6 -0
- package/dist/components/lsp/index.js +7 -0
- package/dist/components/plugins/PluginCard.svelte +153 -0
- package/dist/components/plugins/PluginCard.svelte.d.ts +19 -0
- package/dist/components/plugins/PluginPanel.svelte +280 -0
- package/dist/components/plugins/PluginPanel.svelte.d.ts +8 -0
- package/dist/components/plugins/PluginProposalForm.svelte +250 -0
- package/dist/components/plugins/PluginProposalForm.svelte.d.ts +6 -0
- package/dist/components/plugins/PluginStatusBadge.svelte +14 -0
- package/dist/components/plugins/PluginStatusBadge.svelte.d.ts +8 -0
- package/dist/components/plugins/index.d.ts +4 -0
- package/dist/components/plugins/index.js +5 -0
- package/dist/components/vfs/LockConflictDialog.svelte +705 -0
- package/dist/components/vfs/LockConflictDialog.svelte.d.ts +21 -0
- package/dist/components/vfs/LockIndicator.svelte +194 -0
- package/dist/components/vfs/LockIndicator.svelte.d.ts +29 -0
- package/dist/components/vfs/LockOverlay.svelte +344 -0
- package/dist/components/vfs/LockOverlay.svelte.d.ts +17 -0
- package/dist/components/vfs/VersionConflictDialog.svelte +549 -0
- package/dist/components/vfs/VersionConflictDialog.svelte.d.ts +24 -0
- package/dist/components/vfs/index.d.ts +4 -0
- package/dist/components/vfs/index.js +5 -0
- package/dist/crdt/awareness.d.ts +42 -0
- package/dist/crdt/awareness.js +109 -0
- package/dist/crdt/document.d.ts +101 -0
- package/dist/crdt/document.js +187 -0
- package/dist/crdt/index.d.ts +9 -0
- package/dist/crdt/index.js +8 -0
- package/dist/crdt/provider.d.ts +85 -0
- package/dist/crdt/provider.js +150 -0
- package/dist/crdt/types.d.ts +61 -0
- package/dist/crdt/types.js +4 -0
- package/dist/crdt/undo.d.ts +34 -0
- package/dist/crdt/undo.js +70 -0
- package/dist/index.d.ts +277 -0
- package/dist/index.js +280 -0
- package/dist/plugins/index.d.ts +103 -0
- package/dist/plugins/index.js +153 -0
- package/dist/services/error-handling.d.ts +95 -0
- package/dist/services/error-handling.js +413 -0
- package/dist/services/ide-integration.d.ts +83 -0
- package/dist/services/ide-integration.js +367 -0
- package/dist/services/lsp-client.d.ts +69 -0
- package/dist/services/lsp-client.js +667 -0
- package/dist/services/mock-ai.d.ts +37 -0
- package/dist/services/mock-ai.js +318 -0
- package/dist/services/optimistic.d.ts +141 -0
- package/dist/services/optimistic.js +367 -0
- package/dist/services/vfs-client.d.ts +81 -0
- package/dist/services/vfs-client.js +348 -0
- package/dist/stores/agents.svelte.d.ts +85 -0
- package/dist/stores/agents.svelte.js +459 -0
- package/dist/stores/ai-persistence.svelte.d.ts +76 -0
- package/dist/stores/ai-persistence.svelte.js +334 -0
- package/dist/stores/ai.svelte.d.ts +140 -0
- package/dist/stores/ai.svelte.js +383 -0
- package/dist/stores/collaboration.svelte.d.ts +164 -0
- package/dist/stores/collaboration.svelte.js +334 -0
- package/dist/stores/editor.svelte.d.ts +131 -0
- package/dist/stores/editor.svelte.js +250 -0
- package/dist/stores/index.d.ts +10 -0
- package/dist/stores/index.js +29 -0
- package/dist/stores/layout.svelte.d.ts +171 -0
- package/dist/stores/layout.svelte.js +351 -0
- package/dist/stores/plugin.svelte.d.ts +121 -0
- package/dist/stores/plugin.svelte.js +410 -0
- package/dist/stores/vfs.svelte.d.ts +123 -0
- package/dist/stores/vfs.svelte.js +680 -0
- package/dist/styles/theme.css +623 -0
- package/dist/types/agents.d.ts +127 -0
- package/dist/types/agents.js +5 -0
- package/dist/types/ai.d.ts +137 -0
- package/dist/types/ai.js +4 -0
- package/dist/types/crdt.d.ts +222 -0
- package/dist/types/crdt.js +5 -0
- package/dist/types/editor.d.ts +52 -0
- package/dist/types/editor.js +18 -0
- package/dist/types/events.d.ts +133 -0
- package/dist/types/events.js +4 -0
- package/dist/types/filesystem.d.ts +77 -0
- package/dist/types/filesystem.js +4 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.js +12 -0
- package/dist/types/lsp.d.ts +691 -0
- package/dist/types/lsp.js +108 -0
- package/dist/types/plugin.d.ts +239 -0
- package/dist/types/plugin.js +5 -0
- package/dist/types/vfs.d.ts +191 -0
- package/dist/types/vfs.js +18 -0
- package/dist/utils/format.d.ts +55 -0
- package/dist/utils/format.js +152 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/keybindings.d.ts +33 -0
- package/dist/utils/keybindings.js +171 -0
- package/dist/utils/language.d.ts +27 -0
- package/dist/utils/language.js +222 -0
- package/package.json +178 -0
|
@@ -0,0 +1,691 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Language Server Protocol (LSP) Type Definitions
|
|
3
|
+
* Based on LSP 3.17 specification
|
|
4
|
+
*/
|
|
5
|
+
/** Position in a text document (0-indexed) */
|
|
6
|
+
export interface Position {
|
|
7
|
+
/** Line position (0-indexed) */
|
|
8
|
+
line: number;
|
|
9
|
+
/** Character offset on line (0-indexed, UTF-16 code units) */
|
|
10
|
+
character: number;
|
|
11
|
+
}
|
|
12
|
+
/** A range in a text document */
|
|
13
|
+
export interface Range {
|
|
14
|
+
/** Start position (inclusive) */
|
|
15
|
+
start: Position;
|
|
16
|
+
/** End position (exclusive) */
|
|
17
|
+
end: Position;
|
|
18
|
+
}
|
|
19
|
+
/** Represents a location inside a resource */
|
|
20
|
+
export interface Location {
|
|
21
|
+
uri: string;
|
|
22
|
+
range: Range;
|
|
23
|
+
}
|
|
24
|
+
/** A text edit applicable to a document */
|
|
25
|
+
export interface TextEdit {
|
|
26
|
+
/** The range to replace */
|
|
27
|
+
range: Range;
|
|
28
|
+
/** The string to insert (empty string for delete) */
|
|
29
|
+
newText: string;
|
|
30
|
+
}
|
|
31
|
+
/** Describes textual changes on a single text document */
|
|
32
|
+
export interface TextDocumentEdit {
|
|
33
|
+
textDocument: VersionedTextDocumentIdentifier;
|
|
34
|
+
edits: TextEdit[];
|
|
35
|
+
}
|
|
36
|
+
/** An identifier to denote a specific version of a text document */
|
|
37
|
+
export interface VersionedTextDocumentIdentifier {
|
|
38
|
+
uri: string;
|
|
39
|
+
version: number;
|
|
40
|
+
}
|
|
41
|
+
/** A workspace edit represents changes to many resources */
|
|
42
|
+
export interface WorkspaceEdit {
|
|
43
|
+
changes?: {
|
|
44
|
+
[uri: string]: TextEdit[];
|
|
45
|
+
};
|
|
46
|
+
documentChanges?: TextDocumentEdit[];
|
|
47
|
+
}
|
|
48
|
+
/** Markup content for documentation */
|
|
49
|
+
export interface MarkupContent {
|
|
50
|
+
kind: 'plaintext' | 'markdown';
|
|
51
|
+
value: string;
|
|
52
|
+
}
|
|
53
|
+
/** How documents are synced to the server */
|
|
54
|
+
export declare enum TextDocumentSyncKind {
|
|
55
|
+
None = 0,
|
|
56
|
+
Full = 1,
|
|
57
|
+
Incremental = 2
|
|
58
|
+
}
|
|
59
|
+
/** An event describing a change to a text document */
|
|
60
|
+
export interface TextDocumentContentChangeEvent {
|
|
61
|
+
/** The range that got replaced (for incremental sync) */
|
|
62
|
+
range?: Range;
|
|
63
|
+
/** The length of the range that got replaced (deprecated) */
|
|
64
|
+
rangeLength?: number;
|
|
65
|
+
/** The new text for the range/document */
|
|
66
|
+
text: string;
|
|
67
|
+
}
|
|
68
|
+
/** Parameters for textDocument/didOpen */
|
|
69
|
+
export interface DidOpenTextDocumentParams {
|
|
70
|
+
textDocument: TextDocumentItem;
|
|
71
|
+
}
|
|
72
|
+
/** An item to transfer a text document from the client to the server */
|
|
73
|
+
export interface TextDocumentItem {
|
|
74
|
+
uri: string;
|
|
75
|
+
languageId: string;
|
|
76
|
+
version: number;
|
|
77
|
+
text: string;
|
|
78
|
+
}
|
|
79
|
+
/** Parameters for textDocument/didChange */
|
|
80
|
+
export interface DidChangeTextDocumentParams {
|
|
81
|
+
textDocument: VersionedTextDocumentIdentifier;
|
|
82
|
+
contentChanges: TextDocumentContentChangeEvent[];
|
|
83
|
+
}
|
|
84
|
+
/** Parameters for textDocument/didClose */
|
|
85
|
+
export interface DidCloseTextDocumentParams {
|
|
86
|
+
textDocument: {
|
|
87
|
+
uri: string;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
/** Parameters for textDocument/didSave */
|
|
91
|
+
export interface DidSaveTextDocumentParams {
|
|
92
|
+
textDocument: {
|
|
93
|
+
uri: string;
|
|
94
|
+
};
|
|
95
|
+
text?: string;
|
|
96
|
+
}
|
|
97
|
+
/** Diagnostic severity levels */
|
|
98
|
+
export declare enum DiagnosticSeverity {
|
|
99
|
+
Error = 1,
|
|
100
|
+
Warning = 2,
|
|
101
|
+
Information = 3,
|
|
102
|
+
Hint = 4
|
|
103
|
+
}
|
|
104
|
+
/** Diagnostic tags */
|
|
105
|
+
export declare enum DiagnosticTag {
|
|
106
|
+
Unnecessary = 1,
|
|
107
|
+
Deprecated = 2
|
|
108
|
+
}
|
|
109
|
+
/** Related diagnostic information */
|
|
110
|
+
export interface DiagnosticRelatedInformation {
|
|
111
|
+
location: Location;
|
|
112
|
+
message: string;
|
|
113
|
+
}
|
|
114
|
+
/** Represents a diagnostic (error, warning, hint) */
|
|
115
|
+
export interface Diagnostic {
|
|
116
|
+
/** The range at which the diagnostic applies */
|
|
117
|
+
range: Range;
|
|
118
|
+
/** The diagnostic's severity */
|
|
119
|
+
severity?: DiagnosticSeverity;
|
|
120
|
+
/** The diagnostic's code (string or number) */
|
|
121
|
+
code?: string | number;
|
|
122
|
+
/** A human-readable string describing the source */
|
|
123
|
+
source?: string;
|
|
124
|
+
/** The diagnostic's message */
|
|
125
|
+
message: string;
|
|
126
|
+
/** Additional metadata about the diagnostic */
|
|
127
|
+
tags?: DiagnosticTag[];
|
|
128
|
+
/** Related diagnostic information */
|
|
129
|
+
relatedInformation?: DiagnosticRelatedInformation[];
|
|
130
|
+
/** Additional data for code actions */
|
|
131
|
+
data?: unknown;
|
|
132
|
+
}
|
|
133
|
+
/** Parameters for textDocument/publishDiagnostics */
|
|
134
|
+
export interface PublishDiagnosticsParams {
|
|
135
|
+
uri: string;
|
|
136
|
+
version?: number;
|
|
137
|
+
diagnostics: Diagnostic[];
|
|
138
|
+
}
|
|
139
|
+
/** Completion item kinds */
|
|
140
|
+
export declare enum CompletionItemKind {
|
|
141
|
+
Text = 1,
|
|
142
|
+
Method = 2,
|
|
143
|
+
Function = 3,
|
|
144
|
+
Constructor = 4,
|
|
145
|
+
Field = 5,
|
|
146
|
+
Variable = 6,
|
|
147
|
+
Class = 7,
|
|
148
|
+
Interface = 8,
|
|
149
|
+
Module = 9,
|
|
150
|
+
Property = 10,
|
|
151
|
+
Unit = 11,
|
|
152
|
+
Value = 12,
|
|
153
|
+
Enum = 13,
|
|
154
|
+
Keyword = 14,
|
|
155
|
+
Snippet = 15,
|
|
156
|
+
Color = 16,
|
|
157
|
+
File = 17,
|
|
158
|
+
Reference = 18,
|
|
159
|
+
Folder = 19,
|
|
160
|
+
EnumMember = 20,
|
|
161
|
+
Constant = 21,
|
|
162
|
+
Struct = 22,
|
|
163
|
+
Event = 23,
|
|
164
|
+
Operator = 24,
|
|
165
|
+
TypeParameter = 25
|
|
166
|
+
}
|
|
167
|
+
/** Insert text format */
|
|
168
|
+
export declare enum InsertTextFormat {
|
|
169
|
+
PlainText = 1,
|
|
170
|
+
Snippet = 2
|
|
171
|
+
}
|
|
172
|
+
/** Completion item insert text mode */
|
|
173
|
+
export declare enum InsertTextMode {
|
|
174
|
+
AsIs = 1,
|
|
175
|
+
AdjustIndentation = 2
|
|
176
|
+
}
|
|
177
|
+
/** A completion item */
|
|
178
|
+
export interface CompletionItem {
|
|
179
|
+
/** The label of this completion item */
|
|
180
|
+
label: string;
|
|
181
|
+
/** Additional details for the label */
|
|
182
|
+
labelDetails?: CompletionItemLabelDetails;
|
|
183
|
+
/** The kind of this completion item */
|
|
184
|
+
kind?: CompletionItemKind;
|
|
185
|
+
/** Tags for this completion item */
|
|
186
|
+
tags?: number[];
|
|
187
|
+
/** A human-readable string with additional information */
|
|
188
|
+
detail?: string;
|
|
189
|
+
/** A human-readable string that represents documentation */
|
|
190
|
+
documentation?: string | MarkupContent;
|
|
191
|
+
/** Select this item when showing */
|
|
192
|
+
preselect?: boolean;
|
|
193
|
+
/** A string that should be used when comparing this item */
|
|
194
|
+
sortText?: string;
|
|
195
|
+
/** A string that should be used when filtering */
|
|
196
|
+
filterText?: string;
|
|
197
|
+
/** A string that should be inserted */
|
|
198
|
+
insertText?: string;
|
|
199
|
+
/** The format of the insert text */
|
|
200
|
+
insertTextFormat?: InsertTextFormat;
|
|
201
|
+
/** How whitespace should be handled */
|
|
202
|
+
insertTextMode?: InsertTextMode;
|
|
203
|
+
/** An edit which is applied when selecting this completion */
|
|
204
|
+
textEdit?: TextEdit;
|
|
205
|
+
/** Additional text edits */
|
|
206
|
+
additionalTextEdits?: TextEdit[];
|
|
207
|
+
/** Characters that trigger commit */
|
|
208
|
+
commitCharacters?: string[];
|
|
209
|
+
/** A command to execute after insertion */
|
|
210
|
+
command?: Command;
|
|
211
|
+
/** Additional data to resolve later */
|
|
212
|
+
data?: unknown;
|
|
213
|
+
}
|
|
214
|
+
/** Additional details for a completion item label */
|
|
215
|
+
export interface CompletionItemLabelDetails {
|
|
216
|
+
detail?: string;
|
|
217
|
+
description?: string;
|
|
218
|
+
}
|
|
219
|
+
/** Represents a collection of completion items */
|
|
220
|
+
export interface CompletionList {
|
|
221
|
+
isIncomplete: boolean;
|
|
222
|
+
items: CompletionItem[];
|
|
223
|
+
}
|
|
224
|
+
/** Parameters for textDocument/completion */
|
|
225
|
+
export interface CompletionParams {
|
|
226
|
+
textDocument: {
|
|
227
|
+
uri: string;
|
|
228
|
+
};
|
|
229
|
+
position: Position;
|
|
230
|
+
context?: CompletionContext;
|
|
231
|
+
}
|
|
232
|
+
/** Context for a completion request */
|
|
233
|
+
export interface CompletionContext {
|
|
234
|
+
triggerKind: CompletionTriggerKind;
|
|
235
|
+
triggerCharacter?: string;
|
|
236
|
+
}
|
|
237
|
+
/** How a completion was triggered */
|
|
238
|
+
export declare enum CompletionTriggerKind {
|
|
239
|
+
Invoked = 1,
|
|
240
|
+
TriggerCharacter = 2,
|
|
241
|
+
TriggerForIncompleteCompletions = 3
|
|
242
|
+
}
|
|
243
|
+
/** The result of a hover request */
|
|
244
|
+
export interface Hover {
|
|
245
|
+
/** The hover's content */
|
|
246
|
+
contents: MarkupContent | string | {
|
|
247
|
+
language: string;
|
|
248
|
+
value: string;
|
|
249
|
+
};
|
|
250
|
+
/** Optional range to highlight */
|
|
251
|
+
range?: Range;
|
|
252
|
+
}
|
|
253
|
+
/** Parameters for textDocument/hover */
|
|
254
|
+
export interface HoverParams {
|
|
255
|
+
textDocument: {
|
|
256
|
+
uri: string;
|
|
257
|
+
};
|
|
258
|
+
position: Position;
|
|
259
|
+
}
|
|
260
|
+
/** Signature help represents the signature of something callable */
|
|
261
|
+
export interface SignatureHelp {
|
|
262
|
+
/** One or more signatures */
|
|
263
|
+
signatures: SignatureInformation[];
|
|
264
|
+
/** The active signature */
|
|
265
|
+
activeSignature?: number;
|
|
266
|
+
/** The active parameter of the active signature */
|
|
267
|
+
activeParameter?: number;
|
|
268
|
+
}
|
|
269
|
+
/** Represents the signature of something callable */
|
|
270
|
+
export interface SignatureInformation {
|
|
271
|
+
/** The label of this signature */
|
|
272
|
+
label: string;
|
|
273
|
+
/** The human-readable documentation */
|
|
274
|
+
documentation?: string | MarkupContent;
|
|
275
|
+
/** The parameters of this signature */
|
|
276
|
+
parameters?: ParameterInformation[];
|
|
277
|
+
/** The index of the active parameter */
|
|
278
|
+
activeParameter?: number;
|
|
279
|
+
}
|
|
280
|
+
/** Represents a parameter of a callable-signature */
|
|
281
|
+
export interface ParameterInformation {
|
|
282
|
+
/** The label of this parameter */
|
|
283
|
+
label: string | [number, number];
|
|
284
|
+
/** The human-readable documentation */
|
|
285
|
+
documentation?: string | MarkupContent;
|
|
286
|
+
}
|
|
287
|
+
/** Parameters for textDocument/signatureHelp */
|
|
288
|
+
export interface SignatureHelpParams {
|
|
289
|
+
textDocument: {
|
|
290
|
+
uri: string;
|
|
291
|
+
};
|
|
292
|
+
position: Position;
|
|
293
|
+
context?: SignatureHelpContext;
|
|
294
|
+
}
|
|
295
|
+
/** Additional information about the context in which a signature help request was triggered */
|
|
296
|
+
export interface SignatureHelpContext {
|
|
297
|
+
triggerKind: SignatureHelpTriggerKind;
|
|
298
|
+
triggerCharacter?: string;
|
|
299
|
+
isRetrigger: boolean;
|
|
300
|
+
activeSignatureHelp?: SignatureHelp;
|
|
301
|
+
}
|
|
302
|
+
/** How a signature help was triggered */
|
|
303
|
+
export declare enum SignatureHelpTriggerKind {
|
|
304
|
+
Invoked = 1,
|
|
305
|
+
TriggerCharacter = 2,
|
|
306
|
+
ContentChange = 3
|
|
307
|
+
}
|
|
308
|
+
/** Parameters for textDocument/definition */
|
|
309
|
+
export interface DefinitionParams {
|
|
310
|
+
textDocument: {
|
|
311
|
+
uri: string;
|
|
312
|
+
};
|
|
313
|
+
position: Position;
|
|
314
|
+
}
|
|
315
|
+
/** Parameters for textDocument/references */
|
|
316
|
+
export interface ReferenceParams {
|
|
317
|
+
textDocument: {
|
|
318
|
+
uri: string;
|
|
319
|
+
};
|
|
320
|
+
position: Position;
|
|
321
|
+
context: ReferenceContext;
|
|
322
|
+
}
|
|
323
|
+
/** Reference context */
|
|
324
|
+
export interface ReferenceContext {
|
|
325
|
+
includeDeclaration: boolean;
|
|
326
|
+
}
|
|
327
|
+
/** A code action represents a change that can be performed in code */
|
|
328
|
+
export interface CodeAction {
|
|
329
|
+
/** A short, human-readable title */
|
|
330
|
+
title: string;
|
|
331
|
+
/** The kind of the code action */
|
|
332
|
+
kind?: CodeActionKind;
|
|
333
|
+
/** The diagnostics that this code action resolves */
|
|
334
|
+
diagnostics?: Diagnostic[];
|
|
335
|
+
/** Marks this as a preferred action */
|
|
336
|
+
isPreferred?: boolean;
|
|
337
|
+
/** The workspace edit this code action performs */
|
|
338
|
+
edit?: WorkspaceEdit;
|
|
339
|
+
/** A command to execute */
|
|
340
|
+
command?: Command;
|
|
341
|
+
/** Additional data */
|
|
342
|
+
data?: unknown;
|
|
343
|
+
}
|
|
344
|
+
/** Code action kinds */
|
|
345
|
+
export type CodeActionKind = 'quickfix' | 'refactor' | 'refactor.extract' | 'refactor.inline' | 'refactor.rewrite' | 'source' | 'source.organizeImports' | 'source.fixAll';
|
|
346
|
+
/** Parameters for textDocument/codeAction */
|
|
347
|
+
export interface CodeActionParams {
|
|
348
|
+
textDocument: {
|
|
349
|
+
uri: string;
|
|
350
|
+
};
|
|
351
|
+
range: Range;
|
|
352
|
+
context: CodeActionContext;
|
|
353
|
+
}
|
|
354
|
+
/** Context for a code action request */
|
|
355
|
+
export interface CodeActionContext {
|
|
356
|
+
diagnostics: Diagnostic[];
|
|
357
|
+
only?: CodeActionKind[];
|
|
358
|
+
triggerKind?: CodeActionTriggerKind;
|
|
359
|
+
}
|
|
360
|
+
/** How a code action was triggered */
|
|
361
|
+
export declare enum CodeActionTriggerKind {
|
|
362
|
+
Invoked = 1,
|
|
363
|
+
Automatic = 2
|
|
364
|
+
}
|
|
365
|
+
/** Parameters for textDocument/rename */
|
|
366
|
+
export interface RenameParams {
|
|
367
|
+
textDocument: {
|
|
368
|
+
uri: string;
|
|
369
|
+
};
|
|
370
|
+
position: Position;
|
|
371
|
+
newName: string;
|
|
372
|
+
}
|
|
373
|
+
/** Parameters for textDocument/prepareRename */
|
|
374
|
+
export interface PrepareRenameParams {
|
|
375
|
+
textDocument: {
|
|
376
|
+
uri: string;
|
|
377
|
+
};
|
|
378
|
+
position: Position;
|
|
379
|
+
}
|
|
380
|
+
/** Parameters for textDocument/formatting */
|
|
381
|
+
export interface DocumentFormattingParams {
|
|
382
|
+
textDocument: {
|
|
383
|
+
uri: string;
|
|
384
|
+
};
|
|
385
|
+
options: FormattingOptions;
|
|
386
|
+
}
|
|
387
|
+
/** Formatting options */
|
|
388
|
+
export interface FormattingOptions {
|
|
389
|
+
tabSize: number;
|
|
390
|
+
insertSpaces: boolean;
|
|
391
|
+
trimTrailingWhitespace?: boolean;
|
|
392
|
+
insertFinalNewline?: boolean;
|
|
393
|
+
trimFinalNewlines?: boolean;
|
|
394
|
+
}
|
|
395
|
+
/** Represents a reference to a command */
|
|
396
|
+
export interface Command {
|
|
397
|
+
/** Title of the command */
|
|
398
|
+
title: string;
|
|
399
|
+
/** The identifier of the actual command handler */
|
|
400
|
+
command: string;
|
|
401
|
+
/** Arguments to the command handler */
|
|
402
|
+
arguments?: unknown[];
|
|
403
|
+
}
|
|
404
|
+
/** Defines the capabilities provided by a language server */
|
|
405
|
+
export interface ServerCapabilities {
|
|
406
|
+
textDocumentSync?: TextDocumentSyncKind | TextDocumentSyncOptions;
|
|
407
|
+
completionProvider?: CompletionOptions;
|
|
408
|
+
hoverProvider?: boolean;
|
|
409
|
+
signatureHelpProvider?: SignatureHelpOptions;
|
|
410
|
+
definitionProvider?: boolean;
|
|
411
|
+
typeDefinitionProvider?: boolean;
|
|
412
|
+
implementationProvider?: boolean;
|
|
413
|
+
referencesProvider?: boolean;
|
|
414
|
+
documentHighlightProvider?: boolean;
|
|
415
|
+
documentSymbolProvider?: boolean;
|
|
416
|
+
codeActionProvider?: boolean | CodeActionOptions;
|
|
417
|
+
codeLensProvider?: CodeLensOptions;
|
|
418
|
+
documentFormattingProvider?: boolean;
|
|
419
|
+
documentRangeFormattingProvider?: boolean;
|
|
420
|
+
documentOnTypeFormattingProvider?: DocumentOnTypeFormattingOptions;
|
|
421
|
+
renameProvider?: boolean | RenameOptions;
|
|
422
|
+
documentLinkProvider?: DocumentLinkOptions;
|
|
423
|
+
executeCommandProvider?: ExecuteCommandOptions;
|
|
424
|
+
workspaceSymbolProvider?: boolean;
|
|
425
|
+
}
|
|
426
|
+
/** Text document sync options */
|
|
427
|
+
export interface TextDocumentSyncOptions {
|
|
428
|
+
openClose?: boolean;
|
|
429
|
+
change?: TextDocumentSyncKind;
|
|
430
|
+
save?: boolean | {
|
|
431
|
+
includeText?: boolean;
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
/** Completion options */
|
|
435
|
+
export interface CompletionOptions {
|
|
436
|
+
triggerCharacters?: string[];
|
|
437
|
+
resolveProvider?: boolean;
|
|
438
|
+
}
|
|
439
|
+
/** Signature help options */
|
|
440
|
+
export interface SignatureHelpOptions {
|
|
441
|
+
triggerCharacters?: string[];
|
|
442
|
+
retriggerCharacters?: string[];
|
|
443
|
+
}
|
|
444
|
+
/** Code action options */
|
|
445
|
+
export interface CodeActionOptions {
|
|
446
|
+
codeActionKinds?: CodeActionKind[];
|
|
447
|
+
resolveProvider?: boolean;
|
|
448
|
+
}
|
|
449
|
+
/** Code lens options */
|
|
450
|
+
export interface CodeLensOptions {
|
|
451
|
+
resolveProvider?: boolean;
|
|
452
|
+
}
|
|
453
|
+
/** Document on type formatting options */
|
|
454
|
+
export interface DocumentOnTypeFormattingOptions {
|
|
455
|
+
firstTriggerCharacter: string;
|
|
456
|
+
moreTriggerCharacter?: string[];
|
|
457
|
+
}
|
|
458
|
+
/** Rename options */
|
|
459
|
+
export interface RenameOptions {
|
|
460
|
+
prepareProvider?: boolean;
|
|
461
|
+
}
|
|
462
|
+
/** Document link options */
|
|
463
|
+
export interface DocumentLinkOptions {
|
|
464
|
+
resolveProvider?: boolean;
|
|
465
|
+
}
|
|
466
|
+
/** Execute command options */
|
|
467
|
+
export interface ExecuteCommandOptions {
|
|
468
|
+
commands: string[];
|
|
469
|
+
}
|
|
470
|
+
/** Parameters for the initialize request */
|
|
471
|
+
export interface InitializeParams {
|
|
472
|
+
processId: number | null;
|
|
473
|
+
rootUri: string | null;
|
|
474
|
+
capabilities: ClientCapabilities;
|
|
475
|
+
initializationOptions?: unknown;
|
|
476
|
+
trace?: 'off' | 'messages' | 'verbose';
|
|
477
|
+
workspaceFolders?: WorkspaceFolder[] | null;
|
|
478
|
+
}
|
|
479
|
+
/** Workspace folder */
|
|
480
|
+
export interface WorkspaceFolder {
|
|
481
|
+
uri: string;
|
|
482
|
+
name: string;
|
|
483
|
+
}
|
|
484
|
+
/** Client capabilities */
|
|
485
|
+
export interface ClientCapabilities {
|
|
486
|
+
workspace?: {
|
|
487
|
+
applyEdit?: boolean;
|
|
488
|
+
workspaceEdit?: {
|
|
489
|
+
documentChanges?: boolean;
|
|
490
|
+
};
|
|
491
|
+
didChangeConfiguration?: {
|
|
492
|
+
dynamicRegistration?: boolean;
|
|
493
|
+
};
|
|
494
|
+
didChangeWatchedFiles?: {
|
|
495
|
+
dynamicRegistration?: boolean;
|
|
496
|
+
};
|
|
497
|
+
symbol?: {
|
|
498
|
+
dynamicRegistration?: boolean;
|
|
499
|
+
};
|
|
500
|
+
executeCommand?: {
|
|
501
|
+
dynamicRegistration?: boolean;
|
|
502
|
+
};
|
|
503
|
+
workspaceFolders?: boolean;
|
|
504
|
+
configuration?: boolean;
|
|
505
|
+
};
|
|
506
|
+
textDocument?: {
|
|
507
|
+
synchronization?: {
|
|
508
|
+
dynamicRegistration?: boolean;
|
|
509
|
+
willSave?: boolean;
|
|
510
|
+
willSaveWaitUntil?: boolean;
|
|
511
|
+
didSave?: boolean;
|
|
512
|
+
};
|
|
513
|
+
completion?: {
|
|
514
|
+
dynamicRegistration?: boolean;
|
|
515
|
+
completionItem?: {
|
|
516
|
+
snippetSupport?: boolean;
|
|
517
|
+
commitCharactersSupport?: boolean;
|
|
518
|
+
documentationFormat?: ('plaintext' | 'markdown')[];
|
|
519
|
+
deprecatedSupport?: boolean;
|
|
520
|
+
preselectSupport?: boolean;
|
|
521
|
+
insertReplaceSupport?: boolean;
|
|
522
|
+
labelDetailsSupport?: boolean;
|
|
523
|
+
};
|
|
524
|
+
completionItemKind?: {
|
|
525
|
+
valueSet?: CompletionItemKind[];
|
|
526
|
+
};
|
|
527
|
+
contextSupport?: boolean;
|
|
528
|
+
};
|
|
529
|
+
hover?: {
|
|
530
|
+
dynamicRegistration?: boolean;
|
|
531
|
+
contentFormat?: ('plaintext' | 'markdown')[];
|
|
532
|
+
};
|
|
533
|
+
signatureHelp?: {
|
|
534
|
+
dynamicRegistration?: boolean;
|
|
535
|
+
signatureInformation?: {
|
|
536
|
+
documentationFormat?: ('plaintext' | 'markdown')[];
|
|
537
|
+
parameterInformation?: {
|
|
538
|
+
labelOffsetSupport?: boolean;
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
contextSupport?: boolean;
|
|
542
|
+
};
|
|
543
|
+
declaration?: {
|
|
544
|
+
dynamicRegistration?: boolean;
|
|
545
|
+
linkSupport?: boolean;
|
|
546
|
+
};
|
|
547
|
+
definition?: {
|
|
548
|
+
dynamicRegistration?: boolean;
|
|
549
|
+
linkSupport?: boolean;
|
|
550
|
+
};
|
|
551
|
+
typeDefinition?: {
|
|
552
|
+
dynamicRegistration?: boolean;
|
|
553
|
+
linkSupport?: boolean;
|
|
554
|
+
};
|
|
555
|
+
implementation?: {
|
|
556
|
+
dynamicRegistration?: boolean;
|
|
557
|
+
linkSupport?: boolean;
|
|
558
|
+
};
|
|
559
|
+
references?: {
|
|
560
|
+
dynamicRegistration?: boolean;
|
|
561
|
+
};
|
|
562
|
+
documentHighlight?: {
|
|
563
|
+
dynamicRegistration?: boolean;
|
|
564
|
+
};
|
|
565
|
+
documentSymbol?: {
|
|
566
|
+
dynamicRegistration?: boolean;
|
|
567
|
+
};
|
|
568
|
+
codeAction?: {
|
|
569
|
+
dynamicRegistration?: boolean;
|
|
570
|
+
codeActionLiteralSupport?: {
|
|
571
|
+
codeActionKind: {
|
|
572
|
+
valueSet: CodeActionKind[];
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
isPreferredSupport?: boolean;
|
|
576
|
+
disabledSupport?: boolean;
|
|
577
|
+
dataSupport?: boolean;
|
|
578
|
+
resolveSupport?: {
|
|
579
|
+
properties: string[];
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
codeLens?: {
|
|
583
|
+
dynamicRegistration?: boolean;
|
|
584
|
+
};
|
|
585
|
+
formatting?: {
|
|
586
|
+
dynamicRegistration?: boolean;
|
|
587
|
+
};
|
|
588
|
+
rangeFormatting?: {
|
|
589
|
+
dynamicRegistration?: boolean;
|
|
590
|
+
};
|
|
591
|
+
onTypeFormatting?: {
|
|
592
|
+
dynamicRegistration?: boolean;
|
|
593
|
+
};
|
|
594
|
+
rename?: {
|
|
595
|
+
dynamicRegistration?: boolean;
|
|
596
|
+
prepareSupport?: boolean;
|
|
597
|
+
};
|
|
598
|
+
publishDiagnostics?: {
|
|
599
|
+
relatedInformation?: boolean;
|
|
600
|
+
tagSupport?: {
|
|
601
|
+
valueSet: DiagnosticTag[];
|
|
602
|
+
};
|
|
603
|
+
versionSupport?: boolean;
|
|
604
|
+
codeDescriptionSupport?: boolean;
|
|
605
|
+
dataSupport?: boolean;
|
|
606
|
+
};
|
|
607
|
+
};
|
|
608
|
+
window?: {
|
|
609
|
+
workDoneProgress?: boolean;
|
|
610
|
+
showMessage?: {
|
|
611
|
+
messageActionItem?: {
|
|
612
|
+
additionalPropertiesSupport?: boolean;
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
showDocument?: {
|
|
616
|
+
support?: boolean;
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
/** The result of the initialize request */
|
|
621
|
+
export interface InitializeResult {
|
|
622
|
+
capabilities: ServerCapabilities;
|
|
623
|
+
serverInfo?: {
|
|
624
|
+
name: string;
|
|
625
|
+
version?: string;
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
/** JSON-RPC request */
|
|
629
|
+
export interface JSONRPCRequest {
|
|
630
|
+
jsonrpc: '2.0';
|
|
631
|
+
id: number | string;
|
|
632
|
+
method: string;
|
|
633
|
+
params?: unknown;
|
|
634
|
+
}
|
|
635
|
+
/** JSON-RPC response */
|
|
636
|
+
export interface JSONRPCResponse {
|
|
637
|
+
jsonrpc: '2.0';
|
|
638
|
+
id: number | string | null;
|
|
639
|
+
result?: unknown;
|
|
640
|
+
error?: JSONRPCError;
|
|
641
|
+
}
|
|
642
|
+
/** JSON-RPC notification (no id, no response expected) */
|
|
643
|
+
export interface JSONRPCNotification {
|
|
644
|
+
jsonrpc: '2.0';
|
|
645
|
+
method: string;
|
|
646
|
+
params?: unknown;
|
|
647
|
+
}
|
|
648
|
+
/** JSON-RPC error */
|
|
649
|
+
export interface JSONRPCError {
|
|
650
|
+
code: number;
|
|
651
|
+
message: string;
|
|
652
|
+
data?: unknown;
|
|
653
|
+
}
|
|
654
|
+
/** Standard JSON-RPC error codes */
|
|
655
|
+
export declare enum JSONRPCErrorCode {
|
|
656
|
+
ParseError = -32700,
|
|
657
|
+
InvalidRequest = -32600,
|
|
658
|
+
MethodNotFound = -32601,
|
|
659
|
+
InvalidParams = -32602,
|
|
660
|
+
InternalError = -32603,
|
|
661
|
+
ServerNotInitialized = -32002,
|
|
662
|
+
UnknownErrorCode = -32001,
|
|
663
|
+
RequestCancelled = -32800,
|
|
664
|
+
ContentModified = -32801
|
|
665
|
+
}
|
|
666
|
+
/** Configuration for the LSP client */
|
|
667
|
+
export interface LSPClientConfig {
|
|
668
|
+
/** WebSocket URL to connect to */
|
|
669
|
+
serverUrl: string;
|
|
670
|
+
/** Root URI of the workspace */
|
|
671
|
+
rootUri: string;
|
|
672
|
+
/** Auto-reconnect on disconnect */
|
|
673
|
+
autoReconnect?: boolean;
|
|
674
|
+
/** Reconnect delay in ms */
|
|
675
|
+
reconnectDelay?: number;
|
|
676
|
+
/** Maximum reconnect attempts */
|
|
677
|
+
maxReconnectAttempts?: number;
|
|
678
|
+
/** Request timeout in ms */
|
|
679
|
+
requestTimeout?: number;
|
|
680
|
+
/** Debug mode (logs all messages) */
|
|
681
|
+
debug?: boolean;
|
|
682
|
+
}
|
|
683
|
+
/** LSP client connection state */
|
|
684
|
+
export type LSPConnectionState = 'disconnected' | 'connecting' | 'connected' | 'initializing' | 'ready' | 'error';
|
|
685
|
+
/** LSP client events */
|
|
686
|
+
export interface LSPClientEvents {
|
|
687
|
+
onConnectionStateChange: (state: LSPConnectionState) => void;
|
|
688
|
+
onDiagnostics: (params: PublishDiagnosticsParams) => void;
|
|
689
|
+
onError: (error: Error) => void;
|
|
690
|
+
onServerCapabilities: (capabilities: ServerCapabilities) => void;
|
|
691
|
+
}
|