@treedy/vue-lsp-mcp 0.2.0 → 0.2.2
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/README.md +33 -0
- package/dist/index.js +1115 -27
- package/dist/vue-service.d.ts +139 -0
- package/package.json +1 -1
package/dist/vue-service.d.ts
CHANGED
|
@@ -4,6 +4,38 @@
|
|
|
4
4
|
* Provides programmatic access to Vue Language Server features
|
|
5
5
|
* by spawning vue-language-server and communicating via LSP.
|
|
6
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* Set the active workspace.
|
|
9
|
+
*/
|
|
10
|
+
export declare function setActiveWorkspace(workspace: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Get the active workspace.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getActiveWorkspace(): string | null;
|
|
15
|
+
/**
|
|
16
|
+
* Check if a file is in the active workspace.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isFileInWorkspace(filePath: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Resolve a file path and validate it against the active workspace.
|
|
21
|
+
*
|
|
22
|
+
* Supports:
|
|
23
|
+
* 1. Absolute paths (must be within active workspace)
|
|
24
|
+
* 2. Relative paths (resolved against active workspace)
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveFilePath(filePath: string): {
|
|
27
|
+
absPath: string | null;
|
|
28
|
+
error: string | null;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Validate that a file is within the active workspace.
|
|
32
|
+
* @deprecated Use resolveFilePath instead.
|
|
33
|
+
*/
|
|
34
|
+
export declare function validateFileWorkspace(filePath: string): string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Clear all connections and caches.
|
|
37
|
+
*/
|
|
38
|
+
export declare function clearAllConnections(): void;
|
|
7
39
|
/**
|
|
8
40
|
* Find project root by looking for package.json or tsconfig.json
|
|
9
41
|
*/
|
|
@@ -43,6 +75,26 @@ export declare function getDefinition(filePath: string, line: number, column: nu
|
|
|
43
75
|
line: number;
|
|
44
76
|
column: number;
|
|
45
77
|
}>>;
|
|
78
|
+
/**
|
|
79
|
+
* Get implementation locations
|
|
80
|
+
*/
|
|
81
|
+
export declare function getImplementation(filePath: string, line: number, column: number): Promise<Array<{
|
|
82
|
+
file: string;
|
|
83
|
+
line: number;
|
|
84
|
+
column: number;
|
|
85
|
+
endLine: number;
|
|
86
|
+
endColumn: number;
|
|
87
|
+
}>>;
|
|
88
|
+
/**
|
|
89
|
+
* Get type definition locations
|
|
90
|
+
*/
|
|
91
|
+
export declare function getTypeDefinition(filePath: string, line: number, column: number): Promise<Array<{
|
|
92
|
+
file: string;
|
|
93
|
+
line: number;
|
|
94
|
+
column: number;
|
|
95
|
+
endLine: number;
|
|
96
|
+
endColumn: number;
|
|
97
|
+
}>>;
|
|
46
98
|
/**
|
|
47
99
|
* Get all references to a symbol
|
|
48
100
|
*/
|
|
@@ -51,6 +103,17 @@ export declare function getReferences(filePath: string, line: number, column: nu
|
|
|
51
103
|
line: number;
|
|
52
104
|
column: number;
|
|
53
105
|
}>>;
|
|
106
|
+
/**
|
|
107
|
+
* Get document highlights for a symbol
|
|
108
|
+
*/
|
|
109
|
+
export declare function getDocumentHighlights(filePath: string, line: number, column: number): Promise<Array<{
|
|
110
|
+
file: string;
|
|
111
|
+
line: number;
|
|
112
|
+
column: number;
|
|
113
|
+
endLine: number;
|
|
114
|
+
endColumn: number;
|
|
115
|
+
kind: number;
|
|
116
|
+
}>>;
|
|
54
117
|
/**
|
|
55
118
|
* Get completions at a position
|
|
56
119
|
*/
|
|
@@ -72,6 +135,82 @@ export declare function getSignatureHelp(filePath: string, line: number, column:
|
|
|
72
135
|
activeSignature: number;
|
|
73
136
|
activeParameter: number;
|
|
74
137
|
} | null>;
|
|
138
|
+
/**
|
|
139
|
+
* Check whether rename is valid at this position
|
|
140
|
+
*/
|
|
141
|
+
export declare function getPrepareRename(filePath: string, line: number, column: number): Promise<{
|
|
142
|
+
canRename: boolean;
|
|
143
|
+
placeholder?: string;
|
|
144
|
+
range?: {
|
|
145
|
+
line: number;
|
|
146
|
+
column: number;
|
|
147
|
+
endLine: number;
|
|
148
|
+
endColumn: number;
|
|
149
|
+
};
|
|
150
|
+
}>;
|
|
151
|
+
/**
|
|
152
|
+
* Get inlay hints for a file
|
|
153
|
+
*/
|
|
154
|
+
export declare function getInlayHints(filePath: string): Promise<any[]>;
|
|
155
|
+
/**
|
|
156
|
+
* Get semantic tokens for a file and decode to absolute positions.
|
|
157
|
+
*/
|
|
158
|
+
export declare function getSemanticTokens(filePath: string): Promise<{
|
|
159
|
+
tokens: any[];
|
|
160
|
+
count: number;
|
|
161
|
+
}>;
|
|
162
|
+
/**
|
|
163
|
+
* Get nested smart selection ranges for a position.
|
|
164
|
+
*/
|
|
165
|
+
export declare function getSelectionRanges(filePath: string, line: number, column: number): Promise<Array<{
|
|
166
|
+
line: number;
|
|
167
|
+
column: number;
|
|
168
|
+
endLine: number;
|
|
169
|
+
endColumn: number;
|
|
170
|
+
}>>;
|
|
171
|
+
/**
|
|
172
|
+
* Get foldable ranges in a file.
|
|
173
|
+
*/
|
|
174
|
+
export declare function getFoldingRanges(filePath: string): Promise<Array<{
|
|
175
|
+
kind?: string;
|
|
176
|
+
line: number;
|
|
177
|
+
column: number;
|
|
178
|
+
endLine: number;
|
|
179
|
+
endColumn: number;
|
|
180
|
+
}>>;
|
|
181
|
+
/**
|
|
182
|
+
* Get document links (imports/URLs).
|
|
183
|
+
*/
|
|
184
|
+
export declare function getDocumentLinks(filePath: string): Promise<Array<{
|
|
185
|
+
target?: string;
|
|
186
|
+
line: number;
|
|
187
|
+
column: number;
|
|
188
|
+
endLine: number;
|
|
189
|
+
endColumn: number;
|
|
190
|
+
}>>;
|
|
191
|
+
/**
|
|
192
|
+
* Get call hierarchy around a symbol.
|
|
193
|
+
*/
|
|
194
|
+
export declare function getCallHierarchy(filePath: string, line: number, column: number, direction?: "incoming" | "outgoing" | "both"): Promise<{
|
|
195
|
+
items: any[];
|
|
196
|
+
count: number;
|
|
197
|
+
direction: "incoming" | "outgoing" | "both";
|
|
198
|
+
}>;
|
|
199
|
+
/**
|
|
200
|
+
* Get code actions at a position.
|
|
201
|
+
*/
|
|
202
|
+
export declare function getCodeActions(filePath: string, line: number, column: number): Promise<any[]>;
|
|
203
|
+
/**
|
|
204
|
+
* Execute command from code action.
|
|
205
|
+
*/
|
|
206
|
+
export declare function executeCommand(filePath: string, command: string, args?: any[]): Promise<any>;
|
|
207
|
+
/**
|
|
208
|
+
* Apply WorkspaceEdit to disk and sync open docs.
|
|
209
|
+
*/
|
|
210
|
+
export declare function applyWorkspaceEdit(edit: any): Promise<{
|
|
211
|
+
filesChanged: number;
|
|
212
|
+
editsApplied: number;
|
|
213
|
+
}>;
|
|
75
214
|
/**
|
|
76
215
|
* Diagnostic type for internal use
|
|
77
216
|
*/
|