@volar/language-service 2.4.0-alpha.9 → 2.4.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/lib/features/provideAutoInsertSnippet.d.ts +2 -2
- package/lib/features/provideAutoInsertSnippet.js +1 -3
- package/lib/features/provideCallHierarchyItems.d.ts +5 -2
- package/lib/features/provideCallHierarchyItems.js +83 -8
- package/lib/features/provideCodeActions.d.ts +2 -2
- package/lib/features/provideCodeActions.js +15 -12
- package/lib/features/provideCodeLenses.d.ts +2 -2
- package/lib/features/provideCodeLenses.js +14 -11
- package/lib/features/provideColorPresentations.d.ts +2 -2
- package/lib/features/provideColorPresentations.js +1 -3
- package/lib/features/provideCompletionItems.d.ts +2 -2
- package/lib/features/provideCompletionItems.js +46 -32
- package/lib/features/provideDefinition.d.ts +2 -2
- package/lib/features/provideDefinition.js +1 -2
- package/lib/features/provideDiagnostics.d.ts +7 -8
- package/lib/features/provideDiagnostics.js +88 -85
- package/lib/features/provideDocumentColors.d.ts +2 -2
- package/lib/features/provideDocumentColors.js +1 -3
- package/lib/features/provideDocumentDropEdits.d.ts +2 -2
- package/lib/features/provideDocumentDropEdits.js +1 -3
- package/lib/features/provideDocumentFormattingEdits.d.ts +2 -2
- package/lib/features/provideDocumentFormattingEdits.js +1 -2
- package/lib/features/provideDocumentHighlights.d.ts +2 -2
- package/lib/features/provideDocumentHighlights.js +1 -2
- package/lib/features/provideDocumentLinks.d.ts +2 -2
- package/lib/features/provideDocumentLinks.js +13 -10
- package/lib/features/provideDocumentSemanticTokens.d.ts +2 -2
- package/lib/features/provideDocumentSemanticTokens.js +2 -4
- package/lib/features/provideDocumentSymbols.d.ts +2 -2
- package/lib/features/provideDocumentSymbols.js +1 -3
- package/lib/features/provideFileReferences.d.ts +2 -2
- package/lib/features/provideFileReferences.js +1 -2
- package/lib/features/provideFileRenameEdits.d.ts +2 -2
- package/lib/features/provideFileRenameEdits.js +1 -4
- package/lib/features/provideFoldingRanges.d.ts +2 -2
- package/lib/features/provideFoldingRanges.js +1 -3
- package/lib/features/provideHover.d.ts +2 -2
- package/lib/features/provideHover.js +1 -3
- package/lib/features/provideInlayHints.d.ts +2 -2
- package/lib/features/provideInlayHints.js +13 -10
- package/lib/features/provideInlineValue.d.ts +4 -0
- package/lib/features/provideInlineValue.js +30 -0
- package/lib/features/provideLinkedEditingRanges.d.ts +2 -2
- package/lib/features/provideLinkedEditingRanges.js +1 -3
- package/lib/features/provideMoniker.d.ts +4 -0
- package/lib/features/provideMoniker.js +17 -0
- package/lib/features/provideReferences.d.ts +2 -2
- package/lib/features/provideReferences.js +1 -2
- package/lib/features/provideRenameEdits.d.ts +2 -2
- package/lib/features/provideRenameEdits.js +1 -2
- package/lib/features/provideRenameRange.d.ts +2 -2
- package/lib/features/provideRenameRange.js +1 -3
- package/lib/features/provideSelectionRanges.d.ts +2 -2
- package/lib/features/provideSelectionRanges.js +1 -3
- package/lib/features/provideSignatureHelp.d.ts +2 -2
- package/lib/features/provideSignatureHelp.js +1 -3
- package/lib/features/provideWorkspaceDiagnostics.js +2 -3
- package/lib/features/provideWorkspaceSymbols.js +11 -6
- package/lib/features/resolveCodeAction.js +2 -0
- package/lib/features/resolveCodeLens.js +3 -1
- package/lib/features/resolveCompletionItem.js +2 -0
- package/lib/features/resolveDocumentLink.js +2 -0
- package/lib/features/resolveInlayHint.js +2 -0
- package/lib/features/resolveWorkspaceSymbol.d.ts +1 -1
- package/lib/features/resolveWorkspaceSymbol.js +8 -6
- package/lib/languageService.d.ts +82 -70
- package/lib/languageService.js +17 -14
- package/lib/types.d.ts +14 -10
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
2
|
import { URI } from 'vscode-uri';
|
|
3
|
-
import type { LanguageServiceContext
|
|
4
|
-
export declare function register(context: LanguageServiceContext): (
|
|
3
|
+
import type { LanguageServiceContext } from '../types';
|
|
4
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = register;
|
|
4
4
|
const language_core_1 = require("@volar/language-core");
|
|
5
|
-
const vscode_uri_1 = require("vscode-uri");
|
|
6
5
|
const cancellation_1 = require("../utils/cancellation");
|
|
7
6
|
const featureWorkers_1 = require("../utils/featureWorkers");
|
|
8
7
|
function register(context) {
|
|
9
|
-
return (
|
|
10
|
-
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri);
|
|
8
|
+
return (uri, position, token = cancellation_1.NoneCancellationToken) => {
|
|
11
9
|
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, function* (docs) {
|
|
12
10
|
for (const pos of (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isLinkedEditingEnabled)) {
|
|
13
11
|
yield pos;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
|
+
import type { LanguageServiceContext } from '../types';
|
|
4
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Moniker[] | undefined>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.register = register;
|
|
4
|
+
const language_core_1 = require("@volar/language-core");
|
|
5
|
+
const cancellation_1 = require("../utils/cancellation");
|
|
6
|
+
const featureWorkers_1 = require("../utils/featureWorkers");
|
|
7
|
+
function register(context) {
|
|
8
|
+
return (uri, position, token = cancellation_1.NoneCancellationToken) => {
|
|
9
|
+
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, docs => (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isMonikerEnabled), (plugin, document, position) => {
|
|
10
|
+
if (token.isCancellationRequested) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
return plugin[1].provideMoniker?.(document, position, token);
|
|
14
|
+
}, result => result, results => results.flat());
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=provideMoniker.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
2
|
import { URI } from 'vscode-uri';
|
|
3
|
-
import type { LanguageServiceContext
|
|
4
|
-
export declare function register(context: LanguageServiceContext): (
|
|
3
|
+
import type { LanguageServiceContext } from '../types';
|
|
4
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, referenceContext: vscode.ReferenceContext, token?: vscode.CancellationToken) => Promise<vscode.Location[] | undefined>;
|
|
@@ -7,8 +7,7 @@ const cancellation_1 = require("../utils/cancellation");
|
|
|
7
7
|
const dedupe = require("../utils/dedupe");
|
|
8
8
|
const featureWorkers_1 = require("../utils/featureWorkers");
|
|
9
9
|
function register(context) {
|
|
10
|
-
return (
|
|
11
|
-
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri);
|
|
10
|
+
return (uri, position, referenceContext, token = cancellation_1.NoneCancellationToken) => {
|
|
12
11
|
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, docs => (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isReferencesEnabled), async (plugin, document, position) => {
|
|
13
12
|
if (token.isCancellationRequested) {
|
|
14
13
|
return;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
2
|
import { URI } from 'vscode-uri';
|
|
3
|
-
import type { LanguageServiceContext
|
|
4
|
-
export declare function register(context: LanguageServiceContext): (
|
|
3
|
+
import type { LanguageServiceContext } from '../types';
|
|
4
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, newName: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
5
5
|
export declare function mergeWorkspaceEdits(original: vscode.WorkspaceEdit, ...others: vscode.WorkspaceEdit[]): void;
|
|
@@ -9,8 +9,7 @@ const dedupe = require("../utils/dedupe");
|
|
|
9
9
|
const featureWorkers_1 = require("../utils/featureWorkers");
|
|
10
10
|
const transform_1 = require("../utils/transform");
|
|
11
11
|
function register(context) {
|
|
12
|
-
return (
|
|
13
|
-
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri);
|
|
12
|
+
return (uri, position, newName, token = cancellation_1.NoneCancellationToken) => {
|
|
14
13
|
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => ({ position, newName }), function* (docs) {
|
|
15
14
|
let _data;
|
|
16
15
|
for (const mappedPosition of (0, featureWorkers_1.getGeneratedPositions)(docs, position, data => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
2
|
import { URI } from 'vscode-uri';
|
|
3
|
-
import type { LanguageServiceContext
|
|
4
|
-
export declare function register(context: LanguageServiceContext): (
|
|
3
|
+
import type { LanguageServiceContext } from '../types';
|
|
4
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Range | {
|
|
5
5
|
range: vscode.Range;
|
|
6
6
|
placeholder: string;
|
|
7
7
|
} | {
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = register;
|
|
4
4
|
const language_core_1 = require("@volar/language-core");
|
|
5
|
-
const vscode_uri_1 = require("vscode-uri");
|
|
6
5
|
const cancellation_1 = require("../utils/cancellation");
|
|
7
6
|
const featureWorkers_1 = require("../utils/featureWorkers");
|
|
8
7
|
function register(context) {
|
|
9
|
-
return (
|
|
10
|
-
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri);
|
|
8
|
+
return (uri, position, token = cancellation_1.NoneCancellationToken) => {
|
|
11
9
|
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, docs => (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isRenameEnabled), (plugin, document, position) => {
|
|
12
10
|
if (token.isCancellationRequested) {
|
|
13
11
|
return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
2
|
import { URI } from 'vscode-uri';
|
|
3
|
-
import type { LanguageServiceContext
|
|
4
|
-
export declare function register(context: LanguageServiceContext): (
|
|
3
|
+
import type { LanguageServiceContext } from '../types';
|
|
4
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, positions: vscode.Position[], token?: vscode.CancellationToken) => Promise<vscode.SelectionRange[] | undefined>;
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = register;
|
|
4
4
|
const language_core_1 = require("@volar/language-core");
|
|
5
|
-
const vscode_uri_1 = require("vscode-uri");
|
|
6
5
|
const cancellation_1 = require("../utils/cancellation");
|
|
7
6
|
const common_1 = require("../utils/common");
|
|
8
7
|
const featureWorkers_1 = require("../utils/featureWorkers");
|
|
9
8
|
const transform_1 = require("../utils/transform");
|
|
10
9
|
function register(context) {
|
|
11
|
-
return (
|
|
12
|
-
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri);
|
|
10
|
+
return (uri, positions, token = cancellation_1.NoneCancellationToken) => {
|
|
13
11
|
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => positions, function* (docs) {
|
|
14
12
|
const result = positions
|
|
15
13
|
.map(position => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
2
|
import { URI } from 'vscode-uri';
|
|
3
|
-
import type { LanguageServiceContext
|
|
4
|
-
export declare function register(context: LanguageServiceContext): (
|
|
3
|
+
import type { LanguageServiceContext } from '../types';
|
|
4
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, signatureHelpContext?: vscode.SignatureHelpContext, token?: vscode.CancellationToken) => Promise<vscode.SignatureHelp | undefined>;
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = register;
|
|
4
4
|
const language_core_1 = require("@volar/language-core");
|
|
5
|
-
const vscode_uri_1 = require("vscode-uri");
|
|
6
5
|
const cancellation_1 = require("../utils/cancellation");
|
|
7
6
|
const featureWorkers_1 = require("../utils/featureWorkers");
|
|
8
7
|
function register(context) {
|
|
9
|
-
return (
|
|
8
|
+
return (uri, position, signatureHelpContext = {
|
|
10
9
|
triggerKind: 1,
|
|
11
10
|
isRetrigger: false,
|
|
12
11
|
}, token = cancellation_1.NoneCancellationToken) => {
|
|
13
|
-
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri);
|
|
14
12
|
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, docs => (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isSignatureHelpEnabled), (plugin, document, position) => {
|
|
15
13
|
if (token.isCancellationRequested) {
|
|
16
14
|
return;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = register;
|
|
4
|
-
const language_core_1 = require("@volar/language-core");
|
|
5
4
|
const vscode_uri_1 = require("vscode-uri");
|
|
6
5
|
const cancellation_1 = require("../utils/cancellation");
|
|
7
6
|
const provideDiagnostics_1 = require("./provideDiagnostics");
|
|
@@ -44,7 +43,7 @@ function register(context) {
|
|
|
44
43
|
return {
|
|
45
44
|
...item,
|
|
46
45
|
items: item.items
|
|
47
|
-
.map(error => (0, provideDiagnostics_1.transformDiagnostic)(context, error, docs
|
|
46
|
+
.map(error => (0, provideDiagnostics_1.transformDiagnostic)(context, error, docs))
|
|
48
47
|
.filter(error => !!error)
|
|
49
48
|
};
|
|
50
49
|
}
|
|
@@ -56,7 +55,7 @@ function register(context) {
|
|
|
56
55
|
return {
|
|
57
56
|
...item,
|
|
58
57
|
items: item.items
|
|
59
|
-
.map(error => (0, provideDiagnostics_1.transformDiagnostic)(context, error, undefined
|
|
58
|
+
.map(error => (0, provideDiagnostics_1.transformDiagnostic)(context, error, undefined))
|
|
60
59
|
.filter(error => !!error)
|
|
61
60
|
};
|
|
62
61
|
}
|
|
@@ -44,12 +44,17 @@ function register(context) {
|
|
|
44
44
|
}))
|
|
45
45
|
.filter(symbol => !!symbol);
|
|
46
46
|
symbols?.forEach(symbol => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
if (plugin[1].resolveWorkspaceSymbol) {
|
|
48
|
+
symbol.data = {
|
|
49
|
+
original: {
|
|
50
|
+
data: symbol.data,
|
|
51
|
+
},
|
|
52
|
+
pluginIndex: context.plugins.indexOf(plugin),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
delete symbol.data;
|
|
57
|
+
}
|
|
53
58
|
});
|
|
54
59
|
symbolsList.push(symbols);
|
|
55
60
|
}
|
|
@@ -9,6 +9,7 @@ function register(context) {
|
|
|
9
9
|
if (data) {
|
|
10
10
|
const plugin = context.plugins[data.pluginIndex];
|
|
11
11
|
if (!plugin[1].resolveCodeAction) {
|
|
12
|
+
delete item.data;
|
|
12
13
|
return item;
|
|
13
14
|
}
|
|
14
15
|
Object.assign(item, data.original);
|
|
@@ -21,6 +22,7 @@ function register(context) {
|
|
|
21
22
|
}
|
|
22
23
|
: item);
|
|
23
24
|
}
|
|
25
|
+
delete item.data;
|
|
24
26
|
return item;
|
|
25
27
|
};
|
|
26
28
|
}
|
|
@@ -11,16 +11,18 @@ function register(context) {
|
|
|
11
11
|
if (data?.kind === 'normal') {
|
|
12
12
|
const plugin = context.plugins[data.pluginIndex];
|
|
13
13
|
if (!plugin[1].resolveCodeLens) {
|
|
14
|
+
delete item.data;
|
|
14
15
|
return item;
|
|
15
16
|
}
|
|
16
17
|
Object.assign(item, data.original);
|
|
17
18
|
item = await plugin[1].resolveCodeLens(item, token);
|
|
18
19
|
// item.range already transformed in codeLens request
|
|
19
20
|
}
|
|
20
|
-
if (data?.kind === 'references') {
|
|
21
|
+
else if (data?.kind === 'references') {
|
|
21
22
|
const references = await findReferences(vscode_uri_1.URI.parse(data.sourceFileUri), item.range.start, { includeDeclaration: false }, token) ?? [];
|
|
22
23
|
item.command = context.commands.showReferences.create(data.sourceFileUri, item.range.start, references);
|
|
23
24
|
}
|
|
25
|
+
delete item.data;
|
|
24
26
|
return item;
|
|
25
27
|
};
|
|
26
28
|
}
|
|
@@ -11,6 +11,7 @@ function register(context) {
|
|
|
11
11
|
if (data) {
|
|
12
12
|
const plugin = context.plugins[data.pluginIndex];
|
|
13
13
|
if (!plugin[1].resolveCompletionItem) {
|
|
14
|
+
delete item.data;
|
|
14
15
|
return item;
|
|
15
16
|
}
|
|
16
17
|
item = Object.assign(item, data.original);
|
|
@@ -36,6 +37,7 @@ function register(context) {
|
|
|
36
37
|
if (item.detail !== item.detail + '.ts') {
|
|
37
38
|
item.detail = item.detail;
|
|
38
39
|
}
|
|
40
|
+
delete item.data;
|
|
39
41
|
return item;
|
|
40
42
|
};
|
|
41
43
|
}
|
|
@@ -9,6 +9,7 @@ function register(context) {
|
|
|
9
9
|
if (data) {
|
|
10
10
|
const plugin = context.plugins[data.pluginIndex];
|
|
11
11
|
if (!plugin[1].resolveDocumentLink) {
|
|
12
|
+
delete item.data;
|
|
12
13
|
return item;
|
|
13
14
|
}
|
|
14
15
|
Object.assign(item, data.original);
|
|
@@ -17,6 +18,7 @@ function register(context) {
|
|
|
17
18
|
item.target = (0, transform_1.transformDocumentLinkTarget)(item.target, context).toString();
|
|
18
19
|
}
|
|
19
20
|
}
|
|
21
|
+
delete item.data;
|
|
20
22
|
return item;
|
|
21
23
|
};
|
|
22
24
|
}
|
|
@@ -8,11 +8,13 @@ function register(context) {
|
|
|
8
8
|
if (data) {
|
|
9
9
|
const plugin = context.plugins[data.pluginIndex];
|
|
10
10
|
if (!plugin[1].resolveInlayHint) {
|
|
11
|
+
delete item.data;
|
|
11
12
|
return item;
|
|
12
13
|
}
|
|
13
14
|
Object.assign(item, data.original);
|
|
14
15
|
item = await plugin[1].resolveInlayHint(item, token);
|
|
15
16
|
}
|
|
17
|
+
delete item.data;
|
|
16
18
|
return item;
|
|
17
19
|
};
|
|
18
20
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
2
|
import type { LanguageServiceContext } from '../types';
|
|
3
|
-
export declare function register(context: LanguageServiceContext): (
|
|
3
|
+
export declare function register(context: LanguageServiceContext): (item: vscode.WorkspaceSymbol, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceSymbol>;
|
|
@@ -3,17 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.register = register;
|
|
4
4
|
const cancellation_1 = require("../utils/cancellation");
|
|
5
5
|
function register(context) {
|
|
6
|
-
return async (
|
|
7
|
-
const data =
|
|
6
|
+
return async (item, token = cancellation_1.NoneCancellationToken) => {
|
|
7
|
+
const data = item.data;
|
|
8
8
|
if (data) {
|
|
9
9
|
const plugin = context.plugins[data.pluginIndex];
|
|
10
10
|
if (!plugin[1].resolveWorkspaceSymbol) {
|
|
11
|
-
|
|
11
|
+
delete item.data;
|
|
12
|
+
return item;
|
|
12
13
|
}
|
|
13
|
-
Object.assign(
|
|
14
|
-
|
|
14
|
+
Object.assign(item, data.original);
|
|
15
|
+
item = await plugin[1].resolveWorkspaceSymbol(item, token);
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
delete item.data;
|
|
18
|
+
return item;
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
21
|
//# sourceMappingURL=resolveWorkspaceSymbol.js.map
|
package/lib/languageService.d.ts
CHANGED
|
@@ -7,66 +7,72 @@ export declare const embeddedContentScheme = "volar-embedded-content";
|
|
|
7
7
|
export declare function createLanguageService(language: Language<URI>, plugins: LanguageServicePlugin[], env: LanguageServiceEnvironment, project: ProjectContext): {
|
|
8
8
|
dispose: () => void;
|
|
9
9
|
context: LanguageServiceContext;
|
|
10
|
-
getCallHierarchyItems(
|
|
10
|
+
getCallHierarchyItems(uri: URI, position: vscode.Position, token?: vscode.CancellationToken): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
11
|
+
getTypeHierarchyItems(uri: URI, position: vscode.Position, token?: vscode.CancellationToken): Promise<vscode.TypeHierarchyItem[] | undefined>;
|
|
11
12
|
getCallHierarchyIncomingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
12
13
|
getCallHierarchyOutgoingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
13
|
-
|
|
14
|
+
getTypeHierarchySupertypes(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.TypeHierarchyItem[] | undefined>;
|
|
15
|
+
getTypeHierarchySubtypes(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.TypeHierarchyItem[] | undefined>;
|
|
16
|
+
semanticTokenLegend: {
|
|
14
17
|
tokenModifiers: string[];
|
|
15
18
|
tokenTypes: string[];
|
|
16
19
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
commands: string[];
|
|
21
|
+
triggerCharacters: string[];
|
|
22
|
+
autoFormatTriggerCharacters: string[];
|
|
23
|
+
signatureHelpTriggerCharacters: string[];
|
|
24
|
+
signatureHelpRetriggerCharacters: string[];
|
|
22
25
|
executeCommand(command: string, args: any[], token?: vscode.CancellationToken): any;
|
|
23
|
-
getDocumentFormattingEdits: (
|
|
26
|
+
getDocumentFormattingEdits: (uri: URI, options: vscode.FormattingOptions, range: vscode.Range | undefined, onTypeParams: {
|
|
24
27
|
ch: string;
|
|
25
28
|
position: vscode.Position;
|
|
26
29
|
} | undefined, token?: vscode.CancellationToken) => Promise<vscode.TextEdit[] | undefined>;
|
|
27
|
-
getFoldingRanges: (
|
|
28
|
-
getSelectionRanges: (
|
|
29
|
-
getLinkedEditingRanges: (
|
|
30
|
-
getDocumentSymbols: (
|
|
31
|
-
getDocumentColors: (
|
|
32
|
-
getColorPresentations: (
|
|
33
|
-
getDiagnostics: (
|
|
30
|
+
getFoldingRanges: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.FoldingRange[] | undefined>;
|
|
31
|
+
getSelectionRanges: (uri: URI, positions: vscode.Position[], token?: vscode.CancellationToken) => Promise<vscode.SelectionRange[] | undefined>;
|
|
32
|
+
getLinkedEditingRanges: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
33
|
+
getDocumentSymbols: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentSymbol[] | undefined>;
|
|
34
|
+
getDocumentColors: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.ColorInformation[] | undefined>;
|
|
35
|
+
getColorPresentations: (uri: URI, color: vscode.Color, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
36
|
+
getDiagnostics: (uri: URI, response?: (result: vscode.Diagnostic[]) => void, token?: vscode.CancellationToken) => Promise<vscode.Diagnostic[]>;
|
|
34
37
|
getWorkspaceDiagnostics: (token?: vscode.CancellationToken) => Promise<vscode.WorkspaceDocumentDiagnosticReport[]>;
|
|
35
|
-
getReferences: (
|
|
36
|
-
getFileReferences: (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
getReferences: (uri: URI, position: vscode.Position, referenceContext: vscode.ReferenceContext, token?: vscode.CancellationToken) => Promise<vscode.Location[] | undefined>;
|
|
39
|
+
getFileReferences: (uri: URI, token?: vscode.CancellationToken) => import("./types").NullableProviderResult<vscode.Location[]>;
|
|
40
|
+
getDeclaration: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>;
|
|
41
|
+
getDefinition: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>;
|
|
42
|
+
getTypeDefinition: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>;
|
|
43
|
+
getImplementations: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>;
|
|
44
|
+
getRenameRange: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Range | {
|
|
41
45
|
range: vscode.Range;
|
|
42
46
|
placeholder: string;
|
|
43
47
|
} | {
|
|
44
48
|
message: string;
|
|
45
49
|
} | undefined>;
|
|
46
|
-
getRenameEdits: (
|
|
47
|
-
getFileRenameEdits: (
|
|
48
|
-
getSemanticTokens: (
|
|
49
|
-
getHover: (
|
|
50
|
-
getCompletionItems: (
|
|
51
|
-
getCodeActions: (
|
|
52
|
-
getSignatureHelp: (
|
|
53
|
-
getCodeLenses: (
|
|
54
|
-
getDocumentHighlights: (
|
|
55
|
-
getDocumentLinks: (
|
|
50
|
+
getRenameEdits: (uri: URI, position: vscode.Position, newName: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
51
|
+
getFileRenameEdits: (oldUri: URI, newUri: URI, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
52
|
+
getSemanticTokens: (uri: URI, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, _reportProgress?: (tokens: vscode.SemanticTokens) => void, token?: vscode.CancellationToken) => Promise<vscode.SemanticTokens | undefined>;
|
|
53
|
+
getHover: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Hover | undefined>;
|
|
54
|
+
getCompletionItems: (uri: URI, position: vscode.Position, completionContext?: vscode.CompletionContext, token?: vscode.CancellationToken) => Promise<vscode.CompletionList>;
|
|
55
|
+
getCodeActions: (uri: URI, range: vscode.Range, codeActionContext: vscode.CodeActionContext, token?: vscode.CancellationToken) => Promise<vscode.CodeAction[] | undefined>;
|
|
56
|
+
getSignatureHelp: (uri: URI, position: vscode.Position, signatureHelpContext?: vscode.SignatureHelpContext, token?: vscode.CancellationToken) => Promise<vscode.SignatureHelp | undefined>;
|
|
57
|
+
getCodeLenses: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.CodeLens[]>;
|
|
58
|
+
getDocumentHighlights: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.DocumentHighlight[] | undefined>;
|
|
59
|
+
getDocumentLinks: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentLink[]>;
|
|
56
60
|
getWorkspaceSymbols: (query: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceSymbol[]>;
|
|
57
|
-
getAutoInsertSnippet: (
|
|
61
|
+
getAutoInsertSnippet: (uri: URI, selection: vscode.Position, change: {
|
|
58
62
|
rangeOffset: number;
|
|
59
63
|
rangeLength: number;
|
|
60
64
|
text: string;
|
|
61
65
|
}, token?: vscode.CancellationToken) => Promise<string | undefined>;
|
|
62
|
-
getDocumentDropEdits: (
|
|
63
|
-
getInlayHints: (
|
|
66
|
+
getDocumentDropEdits: (uri: URI, position: vscode.Position, dataTransfer: Map<string, import("./types").DataTransferItem>, token?: vscode.CancellationToken) => Promise<import("./types").DocumentDropEdit | undefined>;
|
|
67
|
+
getInlayHints: (uri: URI, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.InlayHint[] | undefined>;
|
|
68
|
+
getMoniker: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Moniker[] | undefined>;
|
|
69
|
+
getInlineValue: (uri: URI, range: vscode.Range, ivContext: vscode.InlineValueContext, token?: vscode.CancellationToken) => Promise<vscode.InlineValue[] | undefined>;
|
|
64
70
|
resolveCodeAction: (item: vscode.CodeAction, token?: vscode.CancellationToken) => Promise<vscode.CodeAction>;
|
|
65
71
|
resolveCompletionItem: (item: vscode.CompletionItem, token?: vscode.CancellationToken) => Promise<vscode.CompletionItem>;
|
|
66
72
|
resolveCodeLens: (item: vscode.CodeLens, token?: vscode.CancellationToken) => Promise<vscode.CodeLens>;
|
|
67
73
|
resolveDocumentLink: (item: vscode.DocumentLink, token?: vscode.CancellationToken) => Promise<vscode.DocumentLink>;
|
|
68
74
|
resolveInlayHint: (item: vscode.InlayHint, token?: vscode.CancellationToken) => Promise<vscode.InlayHint>;
|
|
69
|
-
resolveWorkspaceSymbol: (
|
|
75
|
+
resolveWorkspaceSymbol: (item: vscode.WorkspaceSymbol, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceSymbol>;
|
|
70
76
|
};
|
|
71
77
|
export declare function decodeEmbeddedDocumentUri(maybeEmbeddedContentUri: URI): [
|
|
72
78
|
documentUri: URI,
|
|
@@ -76,65 +82,71 @@ export declare function encodeEmbeddedDocumentUri(documentUri: URI, embeddedCont
|
|
|
76
82
|
declare function createLanguageServiceBase(plugins: LanguageServicePlugin[], context: LanguageServiceContext): {
|
|
77
83
|
dispose: () => void;
|
|
78
84
|
context: LanguageServiceContext;
|
|
79
|
-
getCallHierarchyItems(
|
|
85
|
+
getCallHierarchyItems(uri: URI, position: vscode.Position, token?: vscode.CancellationToken): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
86
|
+
getTypeHierarchyItems(uri: URI, position: vscode.Position, token?: vscode.CancellationToken): Promise<vscode.TypeHierarchyItem[] | undefined>;
|
|
80
87
|
getCallHierarchyIncomingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
81
88
|
getCallHierarchyOutgoingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
82
|
-
|
|
89
|
+
getTypeHierarchySupertypes(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.TypeHierarchyItem[] | undefined>;
|
|
90
|
+
getTypeHierarchySubtypes(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.TypeHierarchyItem[] | undefined>;
|
|
91
|
+
semanticTokenLegend: {
|
|
83
92
|
tokenModifiers: string[];
|
|
84
93
|
tokenTypes: string[];
|
|
85
94
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
95
|
+
commands: string[];
|
|
96
|
+
triggerCharacters: string[];
|
|
97
|
+
autoFormatTriggerCharacters: string[];
|
|
98
|
+
signatureHelpTriggerCharacters: string[];
|
|
99
|
+
signatureHelpRetriggerCharacters: string[];
|
|
91
100
|
executeCommand(command: string, args: any[], token?: vscode.CancellationToken): any;
|
|
92
|
-
getDocumentFormattingEdits: (
|
|
101
|
+
getDocumentFormattingEdits: (uri: URI, options: vscode.FormattingOptions, range: vscode.Range | undefined, onTypeParams: {
|
|
93
102
|
ch: string;
|
|
94
103
|
position: vscode.Position;
|
|
95
104
|
} | undefined, token?: vscode.CancellationToken) => Promise<vscode.TextEdit[] | undefined>;
|
|
96
|
-
getFoldingRanges: (
|
|
97
|
-
getSelectionRanges: (
|
|
98
|
-
getLinkedEditingRanges: (
|
|
99
|
-
getDocumentSymbols: (
|
|
100
|
-
getDocumentColors: (
|
|
101
|
-
getColorPresentations: (
|
|
102
|
-
getDiagnostics: (
|
|
105
|
+
getFoldingRanges: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.FoldingRange[] | undefined>;
|
|
106
|
+
getSelectionRanges: (uri: URI, positions: vscode.Position[], token?: vscode.CancellationToken) => Promise<vscode.SelectionRange[] | undefined>;
|
|
107
|
+
getLinkedEditingRanges: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
108
|
+
getDocumentSymbols: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentSymbol[] | undefined>;
|
|
109
|
+
getDocumentColors: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.ColorInformation[] | undefined>;
|
|
110
|
+
getColorPresentations: (uri: URI, color: vscode.Color, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
111
|
+
getDiagnostics: (uri: URI, response?: (result: vscode.Diagnostic[]) => void, token?: vscode.CancellationToken) => Promise<vscode.Diagnostic[]>;
|
|
103
112
|
getWorkspaceDiagnostics: (token?: vscode.CancellationToken) => Promise<vscode.WorkspaceDocumentDiagnosticReport[]>;
|
|
104
|
-
getReferences: (
|
|
105
|
-
getFileReferences: (
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
113
|
+
getReferences: (uri: URI, position: vscode.Position, referenceContext: vscode.ReferenceContext, token?: vscode.CancellationToken) => Promise<vscode.Location[] | undefined>;
|
|
114
|
+
getFileReferences: (uri: URI, token?: vscode.CancellationToken) => import("./types").NullableProviderResult<vscode.Location[]>;
|
|
115
|
+
getDeclaration: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>;
|
|
116
|
+
getDefinition: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>;
|
|
117
|
+
getTypeDefinition: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>;
|
|
118
|
+
getImplementations: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>;
|
|
119
|
+
getRenameRange: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Range | {
|
|
110
120
|
range: vscode.Range;
|
|
111
121
|
placeholder: string;
|
|
112
122
|
} | {
|
|
113
123
|
message: string;
|
|
114
124
|
} | undefined>;
|
|
115
|
-
getRenameEdits: (
|
|
116
|
-
getFileRenameEdits: (
|
|
117
|
-
getSemanticTokens: (
|
|
118
|
-
getHover: (
|
|
119
|
-
getCompletionItems: (
|
|
120
|
-
getCodeActions: (
|
|
121
|
-
getSignatureHelp: (
|
|
122
|
-
getCodeLenses: (
|
|
123
|
-
getDocumentHighlights: (
|
|
124
|
-
getDocumentLinks: (
|
|
125
|
+
getRenameEdits: (uri: URI, position: vscode.Position, newName: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
126
|
+
getFileRenameEdits: (oldUri: URI, newUri: URI, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
127
|
+
getSemanticTokens: (uri: URI, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, _reportProgress?: (tokens: vscode.SemanticTokens) => void, token?: vscode.CancellationToken) => Promise<vscode.SemanticTokens | undefined>;
|
|
128
|
+
getHover: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Hover | undefined>;
|
|
129
|
+
getCompletionItems: (uri: URI, position: vscode.Position, completionContext?: vscode.CompletionContext, token?: vscode.CancellationToken) => Promise<vscode.CompletionList>;
|
|
130
|
+
getCodeActions: (uri: URI, range: vscode.Range, codeActionContext: vscode.CodeActionContext, token?: vscode.CancellationToken) => Promise<vscode.CodeAction[] | undefined>;
|
|
131
|
+
getSignatureHelp: (uri: URI, position: vscode.Position, signatureHelpContext?: vscode.SignatureHelpContext, token?: vscode.CancellationToken) => Promise<vscode.SignatureHelp | undefined>;
|
|
132
|
+
getCodeLenses: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.CodeLens[]>;
|
|
133
|
+
getDocumentHighlights: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.DocumentHighlight[] | undefined>;
|
|
134
|
+
getDocumentLinks: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentLink[]>;
|
|
125
135
|
getWorkspaceSymbols: (query: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceSymbol[]>;
|
|
126
|
-
getAutoInsertSnippet: (
|
|
136
|
+
getAutoInsertSnippet: (uri: URI, selection: vscode.Position, change: {
|
|
127
137
|
rangeOffset: number;
|
|
128
138
|
rangeLength: number;
|
|
129
139
|
text: string;
|
|
130
140
|
}, token?: vscode.CancellationToken) => Promise<string | undefined>;
|
|
131
|
-
getDocumentDropEdits: (
|
|
132
|
-
getInlayHints: (
|
|
141
|
+
getDocumentDropEdits: (uri: URI, position: vscode.Position, dataTransfer: Map<string, import("./types").DataTransferItem>, token?: vscode.CancellationToken) => Promise<import("./types").DocumentDropEdit | undefined>;
|
|
142
|
+
getInlayHints: (uri: URI, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.InlayHint[] | undefined>;
|
|
143
|
+
getMoniker: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Moniker[] | undefined>;
|
|
144
|
+
getInlineValue: (uri: URI, range: vscode.Range, ivContext: vscode.InlineValueContext, token?: vscode.CancellationToken) => Promise<vscode.InlineValue[] | undefined>;
|
|
133
145
|
resolveCodeAction: (item: vscode.CodeAction, token?: vscode.CancellationToken) => Promise<vscode.CodeAction>;
|
|
134
146
|
resolveCompletionItem: (item: vscode.CompletionItem, token?: vscode.CancellationToken) => Promise<vscode.CompletionItem>;
|
|
135
147
|
resolveCodeLens: (item: vscode.CodeLens, token?: vscode.CancellationToken) => Promise<vscode.CodeLens>;
|
|
136
148
|
resolveDocumentLink: (item: vscode.DocumentLink, token?: vscode.CancellationToken) => Promise<vscode.DocumentLink>;
|
|
137
149
|
resolveInlayHint: (item: vscode.InlayHint, token?: vscode.CancellationToken) => Promise<vscode.InlayHint>;
|
|
138
|
-
resolveWorkspaceSymbol: (
|
|
150
|
+
resolveWorkspaceSymbol: (item: vscode.WorkspaceSymbol, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceSymbol>;
|
|
139
151
|
};
|
|
140
152
|
export {};
|