@volar/language-service 2.4.0-alpha.2 → 2.4.0-alpha.20
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 +1 -1
- package/lib/features/provideCodeActions.d.ts +1 -1
- package/lib/features/provideCodeLenses.d.ts +1 -1
- package/lib/features/provideColorPresentations.d.ts +1 -1
- package/lib/features/provideDiagnostics.d.ts +1 -1
- package/lib/features/provideDiagnostics.js +1 -1
- package/lib/features/provideDocumentColors.d.ts +1 -1
- package/lib/features/provideDocumentDropEdits.d.ts +1 -1
- package/lib/features/provideDocumentLinks.d.ts +1 -1
- package/lib/features/provideDocumentSemanticTokens.d.ts +2 -2
- package/lib/features/provideDocumentSemanticTokens.js +2 -2
- package/lib/features/provideDocumentSymbols.d.ts +1 -1
- package/lib/features/provideFileRenameEdits.d.ts +1 -1
- package/lib/features/provideFoldingRanges.d.ts +1 -1
- package/lib/features/provideHover.d.ts +1 -1
- package/lib/features/provideInlayHints.d.ts +1 -1
- package/lib/features/provideInlineValue.d.ts +4 -0
- package/lib/features/provideInlineValue.js +30 -0
- package/lib/features/provideLinkedEditingRanges.d.ts +1 -1
- package/lib/features/provideMoniker.d.ts +4 -0
- package/lib/features/provideMoniker.js +17 -0
- package/lib/features/provideRenameRange.d.ts +1 -1
- package/lib/features/provideSelectionRanges.d.ts +1 -1
- package/lib/features/provideSignatureHelp.d.ts +1 -1
- package/lib/languageService.d.ts +16 -16
- package/lib/languageService.js +10 -12
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
3
|
import type { LanguageServiceContext } from '../types';
|
|
4
4
|
export declare function register(context: LanguageServiceContext): (uri: URI, selection: vscode.Position, change: {
|
|
5
5
|
rangeOffset: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
3
|
import type { LanguageServiceContext } from '../types';
|
|
4
4
|
export declare function register(context: LanguageServiceContext): (uri: URI, color: vscode.Color, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
@@ -19,5 +19,5 @@ export declare const errorMarkups: Map<URI, {
|
|
|
19
19
|
error: vscode.Diagnostic;
|
|
20
20
|
markup: vscode.MarkupContent;
|
|
21
21
|
}[]>;
|
|
22
|
-
export declare function register(context: LanguageServiceContext): (uri: URI,
|
|
22
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, response?: (result: vscode.Diagnostic[]) => void, token?: vscode.CancellationToken) => Promise<vscode.Diagnostic[]>;
|
|
23
23
|
export declare function transformDiagnostic(context: LanguageServiceContext, error: vscode.Diagnostic, docs: DocumentsAndMap | undefined, filter: (data: CodeInformation) => boolean): vscode.Diagnostic | undefined;
|
|
@@ -94,7 +94,7 @@ function register(context) {
|
|
|
94
94
|
cacheMaps.semantic.clear();
|
|
95
95
|
cacheMaps.syntactic.clear();
|
|
96
96
|
});
|
|
97
|
-
return async (uri, token = cancellation_1.NoneCancellationToken
|
|
97
|
+
return async (uri, response, token = cancellation_1.NoneCancellationToken) => {
|
|
98
98
|
let langaugeIdAndSnapshot;
|
|
99
99
|
const decoded = context.decodeEmbeddedDocumentUri(uri);
|
|
100
100
|
if (decoded) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
3
|
import type { LanguageServiceContext } from '../types';
|
|
4
4
|
export declare function register(context: LanguageServiceContext): (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.ColorInformation[] | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
3
|
import type { DataTransferItem, LanguageServiceContext } from '../types';
|
|
4
4
|
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, dataTransfer: Map<string, DataTransferItem>, token?: vscode.CancellationToken) => Promise<import("../types").DocumentDropEdit | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
3
|
import type { LanguageServiceContext } from '../types';
|
|
4
|
-
export declare function register(context: LanguageServiceContext): (uri: URI, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend,
|
|
4
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, _reportProgress?: (tokens: vscode.SemanticTokens) => void, token?: vscode.CancellationToken) => Promise<vscode.SemanticTokens | undefined>;
|
|
@@ -7,8 +7,8 @@ const cancellation_1 = require("../utils/cancellation");
|
|
|
7
7
|
const common_1 = require("../utils/common");
|
|
8
8
|
const featureWorkers_1 = require("../utils/featureWorkers");
|
|
9
9
|
function register(context) {
|
|
10
|
-
return async (uri, range, legend,
|
|
11
|
-
) => {
|
|
10
|
+
return async (uri, range, legend, _reportProgress, // TODO
|
|
11
|
+
token = cancellation_1.NoneCancellationToken) => {
|
|
12
12
|
const sourceScript = context.language.scripts.get(uri);
|
|
13
13
|
if (!sourceScript) {
|
|
14
14
|
return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
3
|
import type { LanguageServiceContext } from '../types';
|
|
4
4
|
export declare function register(context: LanguageServiceContext): (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentSymbol[] | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { URI } from 'vscode-uri';
|
|
2
2
|
import type { LanguageServiceContext } from '../types';
|
|
3
3
|
import type * as _ from 'vscode-languageserver-protocol';
|
|
4
4
|
export declare function register(context: LanguageServiceContext): (oldUri: URI, newUri: URI, token?: _.CancellationToken) => Promise<_.WorkspaceEdit | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { URI } from 'vscode-uri';
|
|
2
2
|
import type { LanguageServiceContext } from '../types';
|
|
3
3
|
import type * as _ from 'vscode-languageserver-protocol';
|
|
4
4
|
export declare function register(context: LanguageServiceContext): (uri: URI, token?: _.CancellationToken) => Promise<_.FoldingRange[] | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
3
|
import type { LanguageServiceContext } from '../types';
|
|
4
4
|
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Hover | undefined>;
|
|
@@ -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, range: vscode.Range, ivContext: vscode.InlineValueContext, token?: vscode.CancellationToken) => Promise<vscode.InlineValue[] | undefined>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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, range, ivContext, token = cancellation_1.NoneCancellationToken) => {
|
|
9
|
+
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => range, docs => (0, featureWorkers_1.getGeneratedRanges)(docs, range, language_core_1.isInlineValueEnabled), (plugin, document, range) => {
|
|
10
|
+
if (token.isCancellationRequested) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
return plugin[1].provideInlineValues?.(document, range, ivContext, token);
|
|
14
|
+
}, (items, docs) => {
|
|
15
|
+
if (!docs) {
|
|
16
|
+
return items;
|
|
17
|
+
}
|
|
18
|
+
return items
|
|
19
|
+
.map(item => {
|
|
20
|
+
const mappedRange = (0, featureWorkers_1.getSourceRange)(docs, item.range, language_core_1.isInlineValueEnabled);
|
|
21
|
+
if (mappedRange) {
|
|
22
|
+
item.range = mappedRange;
|
|
23
|
+
return item;
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
.filter(item => !!item);
|
|
27
|
+
}, results => results.flat());
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=provideInlineValue.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
3
|
import type { LanguageServiceContext } from '../types';
|
|
4
4
|
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LinkedEditingRanges | undefined>;
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
3
|
import type { LanguageServiceContext } from '../types';
|
|
4
4
|
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Range | {
|
|
5
5
|
range: vscode.Range;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
3
|
import type { LanguageServiceContext } from '../types';
|
|
4
4
|
export declare function register(context: LanguageServiceContext): (uri: URI, positions: vscode.Position[], token?: vscode.CancellationToken) => Promise<vscode.SelectionRange[] | undefined>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
3
|
import type { LanguageServiceContext } from '../types';
|
|
4
4
|
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, signatureHelpContext?: vscode.SignatureHelpContext, token?: vscode.CancellationToken) => Promise<vscode.SignatureHelp | undefined>;
|
package/lib/languageService.d.ts
CHANGED
|
@@ -10,15 +10,15 @@ export declare function createLanguageService(language: Language<URI>, plugins:
|
|
|
10
10
|
getCallHierarchyItems(uri: URI, position: vscode.Position, token?: vscode.CancellationToken): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
11
11
|
getCallHierarchyIncomingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
12
12
|
getCallHierarchyOutgoingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
13
|
-
|
|
13
|
+
semanticTokenLegend: {
|
|
14
14
|
tokenModifiers: string[];
|
|
15
15
|
tokenTypes: string[];
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
commands: string[];
|
|
18
|
+
triggerCharacters: string[];
|
|
19
|
+
autoFormatTriggerCharacters: string[];
|
|
20
|
+
signatureHelpTriggerCharacters: string[];
|
|
21
|
+
signatureHelpRetriggerCharacters: string[];
|
|
22
22
|
executeCommand(command: string, args: any[], token?: vscode.CancellationToken): any;
|
|
23
23
|
getDocumentFormattingEdits: (uri: URI, options: vscode.FormattingOptions, range: vscode.Range | undefined, onTypeParams: {
|
|
24
24
|
ch: string;
|
|
@@ -30,7 +30,7 @@ export declare function createLanguageService(language: Language<URI>, plugins:
|
|
|
30
30
|
getDocumentSymbols: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentSymbol[] | undefined>;
|
|
31
31
|
getDocumentColors: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.ColorInformation[] | undefined>;
|
|
32
32
|
getColorPresentations: (uri: URI, color: vscode.Color, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
33
|
-
getDiagnostics: (uri: URI,
|
|
33
|
+
getDiagnostics: (uri: URI, response?: (result: vscode.Diagnostic[]) => void, token?: vscode.CancellationToken) => Promise<vscode.Diagnostic[]>;
|
|
34
34
|
getWorkspaceDiagnostics: (token?: vscode.CancellationToken) => Promise<vscode.WorkspaceDocumentDiagnosticReport[]>;
|
|
35
35
|
getReferences: (uri: URI, position: vscode.Position, referenceContext: vscode.ReferenceContext, token?: vscode.CancellationToken) => Promise<vscode.Location[] | undefined>;
|
|
36
36
|
getFileReferences: (uri: URI, token?: vscode.CancellationToken) => import("./types").NullableProviderResult<vscode.Location[]>;
|
|
@@ -45,7 +45,7 @@ export declare function createLanguageService(language: Language<URI>, plugins:
|
|
|
45
45
|
} | undefined>;
|
|
46
46
|
getRenameEdits: (uri: URI, position: vscode.Position, newName: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
47
47
|
getFileRenameEdits: (oldUri: URI, newUri: URI, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
48
|
-
getSemanticTokens: (uri: URI, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend,
|
|
48
|
+
getSemanticTokens: (uri: URI, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, _reportProgress?: (tokens: vscode.SemanticTokens) => void, token?: vscode.CancellationToken) => Promise<vscode.SemanticTokens | undefined>;
|
|
49
49
|
getHover: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Hover | undefined>;
|
|
50
50
|
getCompletionItems: (uri: URI, position: vscode.Position, completionContext?: vscode.CompletionContext, token?: vscode.CancellationToken) => Promise<vscode.CompletionList>;
|
|
51
51
|
getCodeActions: (uri: URI, range: vscode.Range, codeActionContext: vscode.CodeActionContext, token?: vscode.CancellationToken) => Promise<vscode.CodeAction[] | undefined>;
|
|
@@ -79,15 +79,15 @@ declare function createLanguageServiceBase(plugins: LanguageServicePlugin[], con
|
|
|
79
79
|
getCallHierarchyItems(uri: URI, position: vscode.Position, token?: vscode.CancellationToken): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
80
80
|
getCallHierarchyIncomingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
81
81
|
getCallHierarchyOutgoingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
82
|
-
|
|
82
|
+
semanticTokenLegend: {
|
|
83
83
|
tokenModifiers: string[];
|
|
84
84
|
tokenTypes: string[];
|
|
85
85
|
};
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
commands: string[];
|
|
87
|
+
triggerCharacters: string[];
|
|
88
|
+
autoFormatTriggerCharacters: string[];
|
|
89
|
+
signatureHelpTriggerCharacters: string[];
|
|
90
|
+
signatureHelpRetriggerCharacters: string[];
|
|
91
91
|
executeCommand(command: string, args: any[], token?: vscode.CancellationToken): any;
|
|
92
92
|
getDocumentFormattingEdits: (uri: URI, options: vscode.FormattingOptions, range: vscode.Range | undefined, onTypeParams: {
|
|
93
93
|
ch: string;
|
|
@@ -99,7 +99,7 @@ declare function createLanguageServiceBase(plugins: LanguageServicePlugin[], con
|
|
|
99
99
|
getDocumentSymbols: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentSymbol[] | undefined>;
|
|
100
100
|
getDocumentColors: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.ColorInformation[] | undefined>;
|
|
101
101
|
getColorPresentations: (uri: URI, color: vscode.Color, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.ColorPresentation[] | undefined>;
|
|
102
|
-
getDiagnostics: (uri: URI,
|
|
102
|
+
getDiagnostics: (uri: URI, response?: (result: vscode.Diagnostic[]) => void, token?: vscode.CancellationToken) => Promise<vscode.Diagnostic[]>;
|
|
103
103
|
getWorkspaceDiagnostics: (token?: vscode.CancellationToken) => Promise<vscode.WorkspaceDocumentDiagnosticReport[]>;
|
|
104
104
|
getReferences: (uri: URI, position: vscode.Position, referenceContext: vscode.ReferenceContext, token?: vscode.CancellationToken) => Promise<vscode.Location[] | undefined>;
|
|
105
105
|
getFileReferences: (uri: URI, token?: vscode.CancellationToken) => import("./types").NullableProviderResult<vscode.Location[]>;
|
|
@@ -114,7 +114,7 @@ declare function createLanguageServiceBase(plugins: LanguageServicePlugin[], con
|
|
|
114
114
|
} | undefined>;
|
|
115
115
|
getRenameEdits: (uri: URI, position: vscode.Position, newName: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
116
116
|
getFileRenameEdits: (oldUri: URI, newUri: URI, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
117
|
-
getSemanticTokens: (uri: URI, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend,
|
|
117
|
+
getSemanticTokens: (uri: URI, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, _reportProgress?: (tokens: vscode.SemanticTokens) => void, token?: vscode.CancellationToken) => Promise<vscode.SemanticTokens | undefined>;
|
|
118
118
|
getHover: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Hover | undefined>;
|
|
119
119
|
getCompletionItems: (uri: URI, position: vscode.Position, completionContext?: vscode.CompletionContext, token?: vscode.CancellationToken) => Promise<vscode.CompletionList>;
|
|
120
120
|
getCodeActions: (uri: URI, range: vscode.Range, codeActionContext: vscode.CodeActionContext, token?: vscode.CancellationToken) => Promise<vscode.CodeAction[] | undefined>;
|
package/lib/languageService.js
CHANGED
|
@@ -162,20 +162,18 @@ function encodeEmbeddedDocumentUri(documentUri, embeddedContentId) {
|
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
function createLanguageServiceBase(plugins, context) {
|
|
165
|
+
const tokenModifiers = plugins.map(plugin => plugin.capabilities.semanticTokensProvider?.legend?.tokenModifiers ?? []).flat();
|
|
166
|
+
const tokenTypes = plugins.map(plugin => plugin.capabilities.semanticTokensProvider?.legend?.tokenTypes ?? []).flat();
|
|
165
167
|
return {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
return {
|
|
170
|
-
tokenModifiers: [...new Set(tokenModifiers)],
|
|
171
|
-
tokenTypes: [...new Set(tokenTypes)],
|
|
172
|
-
};
|
|
168
|
+
semanticTokenLegend: {
|
|
169
|
+
tokenModifiers: [...new Set(tokenModifiers)],
|
|
170
|
+
tokenTypes: [...new Set(tokenTypes)],
|
|
173
171
|
},
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
172
|
+
commands: plugins.map(plugin => plugin.capabilities.executeCommandProvider?.commands ?? []).flat(),
|
|
173
|
+
triggerCharacters: plugins.map(plugin => plugin.capabilities.completionProvider?.triggerCharacters ?? []).flat(),
|
|
174
|
+
autoFormatTriggerCharacters: plugins.map(plugin => plugin.capabilities.documentOnTypeFormattingProvider?.triggerCharacters ?? []).flat(),
|
|
175
|
+
signatureHelpTriggerCharacters: plugins.map(plugin => plugin.capabilities.signatureHelpProvider?.triggerCharacters ?? []).flat(),
|
|
176
|
+
signatureHelpRetriggerCharacters: plugins.map(plugin => plugin.capabilities.signatureHelpProvider?.retriggerCharacters ?? []).flat(),
|
|
179
177
|
executeCommand(command, args, token = cancellation_1.NoneCancellationToken) {
|
|
180
178
|
for (const plugin of context.plugins) {
|
|
181
179
|
if (context.disabledServicePlugins.has(plugin[1])) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-service",
|
|
3
|
-
"version": "2.4.0-alpha.
|
|
3
|
+
"version": "2.4.0-alpha.20",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
"directory": "packages/language-service"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@volar/language-core": "2.4.0-alpha.
|
|
15
|
+
"@volar/language-core": "2.4.0-alpha.20",
|
|
16
16
|
"vscode-languageserver-protocol": "^3.17.5",
|
|
17
17
|
"vscode-languageserver-textdocument": "^1.0.11",
|
|
18
18
|
"vscode-uri": "^3.0.8"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "63ec0dfd91333c91a7c6443cedc1ae074b317867"
|
|
21
21
|
}
|