@volar/language-service 2.4.0-alpha.9 → 2.4.0
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 +1 -3
- package/lib/features/provideCodeLenses.d.ts +2 -2
- package/lib/features/provideCodeLenses.js +1 -3
- 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 +1 -2
- package/lib/features/provideDefinition.d.ts +2 -2
- package/lib/features/provideDefinition.js +1 -2
- package/lib/features/provideDiagnostics.d.ts +6 -6
- package/lib/features/provideDiagnostics.js +84 -81
- 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 +1 -3
- 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 +1 -3
- 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/languageService.d.ts +80 -68
- package/lib/languageService.js +17 -14
- package/lib/types.d.ts +14 -10
- package/package.json +3 -3
|
@@ -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, token = cancellation_1.NoneCancellationToken) => {
|
|
12
11
|
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, docs => (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isHighlightEnabled), async (plugin, document, position) => {
|
|
13
12
|
if (token.isCancellationRequested) {
|
|
14
13
|
return;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
2
|
import { URI } from 'vscode-uri';
|
|
3
|
-
import type { LanguageServiceContext
|
|
3
|
+
import type { LanguageServiceContext } from '../types';
|
|
4
4
|
export interface DocumentLinkData {
|
|
5
5
|
uri: string;
|
|
6
6
|
original: Pick<vscode.DocumentLink, 'data'>;
|
|
7
7
|
pluginIndex: number;
|
|
8
8
|
}
|
|
9
|
-
export declare function register(context: LanguageServiceContext): (
|
|
9
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentLink[]>;
|
|
@@ -2,13 +2,11 @@
|
|
|
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
|
const transform_1 = require("../utils/transform");
|
|
9
8
|
function register(context) {
|
|
10
|
-
return async (
|
|
11
|
-
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri);
|
|
9
|
+
return async (uri, token = cancellation_1.NoneCancellationToken) => {
|
|
12
10
|
return await (0, featureWorkers_1.documentFeatureWorker)(context, uri, docs => docs[2].mappings.some(mapping => (0, language_core_1.isDocumentLinkEnabled)(mapping.data)), async (plugin, document) => {
|
|
13
11
|
if (token.isCancellationRequested) {
|
|
14
12
|
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, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, _reportProgress?: (tokens: vscode.SemanticTokens) => void, token?: vscode.CancellationToken) => Promise<vscode.SemanticTokens | 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 SemanticTokensBuilder_1 = require("../utils/SemanticTokensBuilder");
|
|
7
6
|
const cancellation_1 = require("../utils/cancellation");
|
|
8
7
|
const common_1 = require("../utils/common");
|
|
9
8
|
const featureWorkers_1 = require("../utils/featureWorkers");
|
|
10
9
|
function register(context) {
|
|
11
|
-
return async (
|
|
12
|
-
) => {
|
|
13
|
-
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri);
|
|
10
|
+
return async (uri, range, legend, _reportProgress, // TODO
|
|
11
|
+
token = cancellation_1.NoneCancellationToken) => {
|
|
14
12
|
const sourceScript = context.language.scripts.get(uri);
|
|
15
13
|
if (!sourceScript) {
|
|
16
14
|
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, token?: vscode.CancellationToken) => Promise<vscode.DocumentSymbol[] | 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, token = cancellation_1.NoneCancellationToken) => {
|
|
13
11
|
return (0, featureWorkers_1.documentFeatureWorker)(context, uri, docs => docs[2].mappings.some(mapping => (0, language_core_1.isSymbolsEnabled)(mapping.data)), (plugin, document) => {
|
|
14
12
|
if (token.isCancellationRequested) {
|
|
15
13
|
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, NullableProviderResult
|
|
4
|
-
export declare function register(context: LanguageServiceContext): (
|
|
3
|
+
import type { LanguageServiceContext, NullableProviderResult } from '../types';
|
|
4
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, token?: vscode.CancellationToken) => NullableProviderResult<vscode.Location[]>;
|
|
@@ -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, token = cancellation_1.NoneCancellationToken) => {
|
|
12
11
|
return (0, featureWorkers_1.documentFeatureWorker)(context, uri, () => true, async (plugin, document) => {
|
|
13
12
|
if (token.isCancellationRequested) {
|
|
14
13
|
return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { URI } from 'vscode-uri';
|
|
2
|
-
import type { LanguageServiceContext
|
|
2
|
+
import type { LanguageServiceContext } from '../types';
|
|
3
3
|
import type * as _ from 'vscode-languageserver-protocol';
|
|
4
|
-
export declare function register(context: LanguageServiceContext): (
|
|
4
|
+
export declare function register(context: LanguageServiceContext): (oldUri: URI, newUri: URI, token?: _.CancellationToken) => Promise<_.WorkspaceEdit | undefined>;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = register;
|
|
4
|
-
const vscode_uri_1 = require("vscode-uri");
|
|
5
4
|
const cancellation_1 = require("../utils/cancellation");
|
|
6
5
|
const dedupe = require("../utils/dedupe");
|
|
7
6
|
const transform_1 = require("../utils/transform");
|
|
8
7
|
function register(context) {
|
|
9
|
-
return async (
|
|
10
|
-
const oldUri = _oldUri instanceof vscode_uri_1.URI ? _oldUri : vscode_uri_1.URI.from(_oldUri);
|
|
11
|
-
const newUri = _newUri instanceof vscode_uri_1.URI ? _newUri : vscode_uri_1.URI.from(_newUri);
|
|
8
|
+
return async (oldUri, newUri, token = cancellation_1.NoneCancellationToken) => {
|
|
12
9
|
for (const plugin of context.plugins) {
|
|
13
10
|
if (context.disabledServicePlugins.has(plugin[1])) {
|
|
14
11
|
continue;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { URI } from 'vscode-uri';
|
|
2
|
-
import type { LanguageServiceContext
|
|
2
|
+
import type { LanguageServiceContext } from '../types';
|
|
3
3
|
import type * as _ from 'vscode-languageserver-protocol';
|
|
4
|
-
export declare function register(context: LanguageServiceContext): (
|
|
4
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, token?: _.CancellationToken) => Promise<_.FoldingRange[] | undefined>;
|
|
@@ -2,13 +2,11 @@
|
|
|
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
|
const transform_1 = require("../utils/transform");
|
|
9
8
|
function register(context) {
|
|
10
|
-
return (
|
|
11
|
-
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri);
|
|
9
|
+
return (uri, token = cancellation_1.NoneCancellationToken) => {
|
|
12
10
|
return (0, featureWorkers_1.documentFeatureWorker)(context, uri, docs => docs[2].mappings.some(mapping => (0, language_core_1.isFoldingRangesEnabled)(mapping.data)), (plugin, document) => {
|
|
13
11
|
if (token.isCancellationRequested) {
|
|
14
12
|
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, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Hover | 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 common_1 = require("../utils/common");
|
|
8
7
|
const featureWorkers_1 = require("../utils/featureWorkers");
|
|
9
8
|
const transform_1 = require("../utils/transform");
|
|
10
9
|
const provideDiagnostics_1 = require("./provideDiagnostics");
|
|
11
10
|
function register(context) {
|
|
12
|
-
return async (
|
|
13
|
-
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri);
|
|
11
|
+
return async (uri, position, token = cancellation_1.NoneCancellationToken) => {
|
|
14
12
|
let hover = await (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, docs => (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isHoverEnabled), (plugin, document, position) => {
|
|
15
13
|
if (token.isCancellationRequested) {
|
|
16
14
|
return;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
2
|
import { URI } from 'vscode-uri';
|
|
3
|
-
import type { LanguageServiceContext
|
|
3
|
+
import type { LanguageServiceContext } from '../types';
|
|
4
4
|
export interface InlayHintData {
|
|
5
5
|
uri: string;
|
|
6
6
|
original: Pick<vscode.CodeAction, 'data' | 'edit'>;
|
|
7
7
|
pluginIndex: number;
|
|
8
8
|
}
|
|
9
|
-
export declare function register(context: LanguageServiceContext): (
|
|
9
|
+
export declare function register(context: LanguageServiceContext): (uri: URI, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.InlayHint[] | 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 async (
|
|
12
|
-
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri);
|
|
10
|
+
return async (uri, range, token = cancellation_1.NoneCancellationToken) => {
|
|
13
11
|
const sourceScript = context.language.scripts.get(uri);
|
|
14
12
|
if (!sourceScript) {
|
|
15
13
|
return;
|
|
@@ -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
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;
|