@volar/language-service
Advanced tools
Comparing version 2.4.0-alpha.2 to 2.4.0-alpha.3
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, selection: vscode.Position, change: { | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, selection: vscode.Position, change: { | ||
rangeOffset: number; | ||
@@ -6,0 +6,0 @@ rangeLength: number; |
@@ -5,6 +5,8 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
const featureWorkers_1 = require("../utils/featureWorkers"); | ||
function register(context) { | ||
return (uri, selection, change, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, selection, change, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => ({ selection, change }), function* (docs) { | ||
@@ -11,0 +13,0 @@ for (const mappedPosition of (0, featureWorkers_1.getGeneratedPositions)(docs, selection, language_core_1.isAutoInsertEnabled)) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export interface PluginCallHierarchyData { | ||
@@ -11,5 +11,5 @@ uri: string; | ||
export declare function register(context: LanguageServiceContext): { | ||
getCallHierarchyItems(uri: URI, position: vscode.Position, token?: vscode.CancellationToken): Promise<vscode.CallHierarchyItem[] | undefined>; | ||
getCallHierarchyItems(_uri: URI | UriComponents, position: vscode.Position, token?: vscode.CancellationToken): Promise<vscode.CallHierarchyItem[] | undefined>; | ||
getCallHierarchyIncomingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyIncomingCall[]>; | ||
getCallHierarchyOutgoingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyOutgoingCall[]>; | ||
}; |
@@ -11,3 +11,4 @@ "use strict"; | ||
return { | ||
getCallHierarchyItems(uri, position, token = cancellation_1.NoneCancellationToken) { | ||
getCallHierarchyItems(_uri, position, token = cancellation_1.NoneCancellationToken) { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, docs => (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isCallHierarchyEnabled), async (plugin, document, position, map) => { | ||
@@ -14,0 +15,0 @@ if (token.isCancellationRequested) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export interface ServiceCodeActionData { | ||
@@ -10,2 +10,2 @@ uri: string; | ||
} | ||
export declare function register(context: LanguageServiceContext): (uri: URI, range: vscode.Range, codeActionContext: vscode.CodeActionContext, token?: vscode.CancellationToken) => Promise<vscode.CodeAction[] | undefined>; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, range: vscode.Range, codeActionContext: vscode.CodeActionContext, token?: vscode.CancellationToken) => Promise<vscode.CodeAction[] | undefined>; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
@@ -12,3 +13,4 @@ const common_1 = require("../utils/common"); | ||
function register(context) { | ||
return async (uri, range, codeActionContext, token = cancellation_1.NoneCancellationToken) => { | ||
return async (_uri, range, codeActionContext, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
const sourceScript = context.language.scripts.get(uri); | ||
@@ -15,0 +17,0 @@ if (!sourceScript) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export interface ServiceCodeLensData { | ||
@@ -17,2 +17,2 @@ kind: 'normal'; | ||
} | ||
export declare function register(context: LanguageServiceContext): (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.CodeLens[]>; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, token?: vscode.CancellationToken) => Promise<vscode.CodeLens[]>; |
@@ -5,6 +5,8 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
const featureWorkers_1 = require("../utils/featureWorkers"); | ||
function register(context) { | ||
return async (uri, token = cancellation_1.NoneCancellationToken) => { | ||
return async (_uri, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return await (0, featureWorkers_1.documentFeatureWorker)(context, uri, docs => docs[2].mappings.some(mapping => (0, language_core_1.isCodeLensEnabled)(mapping.data)), async (plugin, document) => { | ||
@@ -11,0 +13,0 @@ if (token.isCancellationRequested) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, color: vscode.Color, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.ColorPresentation[] | undefined>; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, color: vscode.Color, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.ColorPresentation[] | undefined>; |
@@ -5,6 +5,8 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
const featureWorkers_1 = require("../utils/featureWorkers"); | ||
function register(context) { | ||
return (uri, color, range, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, color, range, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => range, function* (docs) { | ||
@@ -11,0 +13,0 @@ for (const mappedRange of (0, featureWorkers_1.getGeneratedRanges)(docs, range, language_core_1.isColorEnabled)) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export interface ServiceCompletionData { | ||
@@ -10,2 +10,2 @@ uri: string; | ||
} | ||
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, completionContext?: vscode.CompletionContext, token?: vscode.CancellationToken) => Promise<vscode.CompletionList>; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, position: vscode.Position, completionContext?: vscode.CompletionContext, token?: vscode.CancellationToken) => Promise<vscode.CompletionList>; |
@@ -11,3 +11,4 @@ "use strict"; | ||
let lastResult; | ||
return async (uri, position, completionContext = { triggerKind: 1, }, token = cancellation_1.NoneCancellationToken) => { | ||
return async (_uri, position, completionContext = { triggerKind: 1, }, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
let langaugeIdAndSnapshot; | ||
@@ -14,0 +15,0 @@ let sourceScript; |
import type { CodeInformation } from '@volar/language-core'; | ||
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext, apiName: 'provideDefinition' | 'provideTypeDefinition' | 'provideImplementation', isValidPosition: (data: CodeInformation) => boolean): (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext, apiName: 'provideDefinition' | 'provideTypeDefinition' | 'provideImplementation', isValidPosition: (data: CodeInformation) => boolean): (_uri: URI | UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; |
@@ -9,3 +9,4 @@ "use strict"; | ||
function register(context, apiName, isValidPosition) { | ||
return (uri, position, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, position, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, docs => (0, featureWorkers_1.getGeneratedPositions)(docs, position, isValidPosition), async (plugin, document, position) => { | ||
@@ -12,0 +13,0 @@ if (token.isCancellationRequested) { |
import { type CodeInformation } from '@volar/language-core'; | ||
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
import { DocumentsAndMap } from '../utils/featureWorkers'; | ||
@@ -22,3 +22,3 @@ export declare function updateRange(range: vscode.Range, change: { | ||
}[]>; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, token?: vscode.CancellationToken, response?: (result: vscode.Diagnostic[]) => void) => Promise<vscode.Diagnostic[]>; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, token?: vscode.CancellationToken, response?: (result: vscode.Diagnostic[]) => void) => Promise<vscode.Diagnostic[]>; | ||
export declare function transformDiagnostic(context: LanguageServiceContext, error: vscode.Diagnostic, docs: DocumentsAndMap | undefined, filter: (data: CodeInformation) => boolean): vscode.Diagnostic | undefined; |
@@ -97,3 +97,4 @@ "use strict"; | ||
}); | ||
return async (uri, token = cancellation_1.NoneCancellationToken, response) => { | ||
return async (_uri, token = cancellation_1.NoneCancellationToken, response) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
let langaugeIdAndSnapshot; | ||
@@ -100,0 +101,0 @@ const decoded = context.decodeEmbeddedDocumentUri(uri); |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.ColorInformation[] | undefined>; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, token?: vscode.CancellationToken) => Promise<vscode.ColorInformation[] | undefined>; |
@@ -5,6 +5,8 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
const featureWorkers_1 = require("../utils/featureWorkers"); | ||
function register(context) { | ||
return (uri, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.documentFeatureWorker)(context, uri, docs => docs[2].mappings.some(mapping => (0, language_core_1.isColorEnabled)(mapping.data)), (plugin, document) => { | ||
@@ -11,0 +13,0 @@ if (token.isCancellationRequested) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { DataTransferItem, LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, dataTransfer: Map<string, DataTransferItem>, token?: vscode.CancellationToken) => Promise<import("../types").DocumentDropEdit | undefined>; | ||
import { URI } from 'vscode-uri'; | ||
import type { DataTransferItem, LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, position: vscode.Position, dataTransfer: Map<string, DataTransferItem>, token?: vscode.CancellationToken) => Promise<import("../types").DocumentDropEdit | undefined>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.register = register; | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
@@ -8,3 +9,4 @@ const featureWorkers_1 = require("../utils/featureWorkers"); | ||
function register(context) { | ||
return (uri, position, dataTransfer, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, position, dataTransfer, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, function* (docs) { | ||
@@ -11,0 +13,0 @@ for (const mappedPosition of (0, featureWorkers_1.getGeneratedPositions)(docs, position)) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, options: vscode.FormattingOptions, range: vscode.Range | undefined, onTypeParams: { | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, options: vscode.FormattingOptions, range: vscode.Range | undefined, onTypeParams: { | ||
ch: string; | ||
position: vscode.Position; | ||
} | undefined, token?: vscode.CancellationToken) => Promise<vscode.TextEdit[] | undefined>; |
@@ -11,3 +11,4 @@ "use strict"; | ||
function register(context) { | ||
return async (uri, options, range, onTypeParams, token = cancellation_1.NoneCancellationToken) => { | ||
return async (_uri, options, range, onTypeParams, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
const sourceScript = context.language.scripts.get(uri); | ||
@@ -14,0 +15,0 @@ if (!sourceScript) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.DocumentHighlight[] | undefined>; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.DocumentHighlight[] | undefined>; |
@@ -10,3 +10,4 @@ "use strict"; | ||
function register(context) { | ||
return (uri, position, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, position, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, docs => (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isHighlightEnabled), async (plugin, document, position) => { | ||
@@ -13,0 +14,0 @@ if (token.isCancellationRequested) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export interface DocumentLinkData { | ||
@@ -9,2 +9,2 @@ uri: string; | ||
} | ||
export declare function register(context: LanguageServiceContext): (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentLink[]>; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, token?: vscode.CancellationToken) => Promise<vscode.DocumentLink[]>; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
@@ -10,3 +11,4 @@ const featureWorkers_1 = require("../utils/featureWorkers"); | ||
function register(context) { | ||
return async (uri, token = cancellation_1.NoneCancellationToken) => { | ||
return async (_uri, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
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,0 +15,0 @@ if (token.isCancellationRequested) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, token?: vscode.CancellationToken, _reportProgress?: (tokens: vscode.SemanticTokens) => void) => Promise<vscode.SemanticTokens | undefined>; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, token?: vscode.CancellationToken, _reportProgress?: (tokens: vscode.SemanticTokens) => void) => Promise<vscode.SemanticTokens | undefined>; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const SemanticTokensBuilder_1 = require("../utils/SemanticTokensBuilder"); | ||
@@ -11,4 +12,5 @@ const cancellation_1 = require("../utils/cancellation"); | ||
function register(context) { | ||
return async (uri, range, legend, token = cancellation_1.NoneCancellationToken, _reportProgress // TODO | ||
return async (_uri, range, legend, token = cancellation_1.NoneCancellationToken, _reportProgress // TODO | ||
) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
const sourceScript = context.language.scripts.get(uri); | ||
@@ -15,0 +17,0 @@ if (!sourceScript) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentSymbol[] | undefined>; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, token?: vscode.CancellationToken) => Promise<vscode.DocumentSymbol[] | undefined>; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
@@ -11,3 +12,4 @@ const common_1 = require("../utils/common"); | ||
function register(context) { | ||
return (uri, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.documentFeatureWorker)(context, uri, docs => docs[2].mappings.some(mapping => (0, language_core_1.isSymbolsEnabled)(mapping.data)), (plugin, document) => { | ||
@@ -14,0 +16,0 @@ if (token.isCancellationRequested) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, NullableProviderResult } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, token?: vscode.CancellationToken) => NullableProviderResult<vscode.Location[]>; | ||
import type { LanguageServiceContext, NullableProviderResult, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, token?: vscode.CancellationToken) => NullableProviderResult<vscode.Location[]>; |
@@ -10,3 +10,4 @@ "use strict"; | ||
function register(context) { | ||
return (uri, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.documentFeatureWorker)(context, uri, () => true, async (plugin, document) => { | ||
@@ -13,0 +14,0 @@ if (token.isCancellationRequested) { |
@@ -1,4 +0,4 @@ | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
import type * as _ from 'vscode-languageserver-protocol'; | ||
export declare function register(context: LanguageServiceContext): (oldUri: URI, newUri: URI, token?: _.CancellationToken) => Promise<_.WorkspaceEdit | undefined>; | ||
export declare function register(context: LanguageServiceContext): (_oldUri: URI | UriComponents, _newUri: URI | UriComponents, token?: _.CancellationToken) => Promise<_.WorkspaceEdit | undefined>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.register = register; | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
@@ -8,3 +9,5 @@ const dedupe = require("../utils/dedupe"); | ||
function register(context) { | ||
return async (oldUri, newUri, token = cancellation_1.NoneCancellationToken) => { | ||
return async (_oldUri, _newUri, token = cancellation_1.NoneCancellationToken) => { | ||
const oldUri = _oldUri instanceof vscode_uri_1.URI ? _oldUri : vscode_uri_1.URI.from(_oldUri); | ||
const newUri = _newUri instanceof vscode_uri_1.URI ? _newUri : vscode_uri_1.URI.from(_newUri); | ||
for (const plugin of context.plugins) { | ||
@@ -11,0 +14,0 @@ if (context.disabledServicePlugins.has(plugin[1])) { |
@@ -1,4 +0,4 @@ | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
import type * as _ from 'vscode-languageserver-protocol'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, token?: _.CancellationToken) => Promise<_.FoldingRange[] | undefined>; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, token?: _.CancellationToken) => Promise<_.FoldingRange[] | undefined>; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
@@ -10,3 +11,4 @@ const featureWorkers_1 = require("../utils/featureWorkers"); | ||
function register(context) { | ||
return (uri, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.documentFeatureWorker)(context, uri, docs => docs[2].mappings.some(mapping => (0, language_core_1.isFoldingRangesEnabled)(mapping.data)), (plugin, document) => { | ||
@@ -13,0 +15,0 @@ if (token.isCancellationRequested) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Hover | undefined>; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Hover | undefined>; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
@@ -12,3 +13,4 @@ const common_1 = require("../utils/common"); | ||
function register(context) { | ||
return async (uri, position, token = cancellation_1.NoneCancellationToken) => { | ||
return async (_uri, position, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
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,0 +17,0 @@ if (token.isCancellationRequested) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export interface InlayHintData { | ||
@@ -9,2 +9,2 @@ uri: string; | ||
} | ||
export declare function register(context: LanguageServiceContext): (uri: URI, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.InlayHint[] | undefined>; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.InlayHint[] | undefined>; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
@@ -11,3 +12,4 @@ const common_1 = require("../utils/common"); | ||
function register(context) { | ||
return async (uri, range, token = cancellation_1.NoneCancellationToken) => { | ||
return async (_uri, range, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
const sourceScript = context.language.scripts.get(uri); | ||
@@ -14,0 +16,0 @@ if (!sourceScript) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LinkedEditingRanges | undefined>; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LinkedEditingRanges | undefined>; |
@@ -5,6 +5,8 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
const featureWorkers_1 = require("../utils/featureWorkers"); | ||
function register(context) { | ||
return (uri, position, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, position, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, function* (docs) { | ||
@@ -11,0 +13,0 @@ for (const pos of (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isLinkedEditingEnabled)) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, referenceContext: vscode.ReferenceContext, token?: vscode.CancellationToken) => Promise<vscode.Location[] | undefined>; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, position: vscode.Position, referenceContext: vscode.ReferenceContext, token?: vscode.CancellationToken) => Promise<vscode.Location[] | undefined>; |
@@ -10,3 +10,4 @@ "use strict"; | ||
function register(context) { | ||
return (uri, position, referenceContext, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, position, referenceContext, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, docs => (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isReferencesEnabled), async (plugin, document, position) => { | ||
@@ -13,0 +14,0 @@ if (token.isCancellationRequested) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, newName: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, position: vscode.Position, newName: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>; | ||
export declare function mergeWorkspaceEdits(original: vscode.WorkspaceEdit, ...others: vscode.WorkspaceEdit[]): void; |
@@ -12,3 +12,4 @@ "use strict"; | ||
function register(context) { | ||
return (uri, position, newName, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, position, newName, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => ({ position, newName }), function* (docs) { | ||
@@ -15,0 +16,0 @@ let _data; |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Range | { | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Range | { | ||
range: vscode.Range; | ||
@@ -6,0 +6,0 @@ placeholder: string; |
@@ -5,6 +5,8 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
const featureWorkers_1 = require("../utils/featureWorkers"); | ||
function register(context) { | ||
return (uri, position, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, position, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, docs => (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isRenameEnabled), (plugin, document, position) => { | ||
@@ -11,0 +13,0 @@ if (token.isCancellationRequested) { |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, positions: vscode.Position[], token?: vscode.CancellationToken) => Promise<vscode.SelectionRange[] | undefined>; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, positions: vscode.Position[], token?: vscode.CancellationToken) => Promise<vscode.SelectionRange[] | undefined>; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
@@ -11,3 +12,4 @@ const common_1 = require("../utils/common"); | ||
function register(context) { | ||
return (uri, positions, token = cancellation_1.NoneCancellationToken) => { | ||
return (_uri, positions, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => positions, function* (docs) { | ||
@@ -14,0 +16,0 @@ const result = positions |
import type * as vscode from 'vscode-languageserver-protocol'; | ||
import type { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (uri: URI, position: vscode.Position, signatureHelpContext?: vscode.SignatureHelpContext, token?: vscode.CancellationToken) => Promise<vscode.SignatureHelp | undefined>; | ||
import { URI } from 'vscode-uri'; | ||
import type { LanguageServiceContext, UriComponents } from '../types'; | ||
export declare function register(context: LanguageServiceContext): (_uri: URI | UriComponents, position: vscode.Position, signatureHelpContext?: vscode.SignatureHelpContext, token?: vscode.CancellationToken) => Promise<vscode.SignatureHelp | undefined>; |
@@ -5,9 +5,11 @@ "use strict"; | ||
const language_core_1 = require("@volar/language-core"); | ||
const vscode_uri_1 = require("vscode-uri"); | ||
const cancellation_1 = require("../utils/cancellation"); | ||
const featureWorkers_1 = require("../utils/featureWorkers"); | ||
function register(context) { | ||
return (uri, position, signatureHelpContext = { | ||
return (_uri, position, signatureHelpContext = { | ||
triggerKind: 1, | ||
isRetrigger: false, | ||
}, token = cancellation_1.NoneCancellationToken) => { | ||
const uri = _uri instanceof vscode_uri_1.URI ? _uri : vscode_uri_1.URI.from(_uri); | ||
return (0, featureWorkers_1.languageFeatureWorker)(context, uri, () => position, docs => (0, featureWorkers_1.getGeneratedPositions)(docs, position, language_core_1.isSignatureHelpEnabled), (plugin, document, position) => { | ||
@@ -14,0 +16,0 @@ if (token.isCancellationRequested) { |
@@ -10,3 +10,3 @@ import { type Language } from '@volar/language-core'; | ||
context: LanguageServiceContext; | ||
getCallHierarchyItems(uri: URI, position: vscode.Position, token?: vscode.CancellationToken): Promise<vscode.CallHierarchyItem[] | undefined>; | ||
getCallHierarchyItems(_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken): Promise<vscode.CallHierarchyItem[] | undefined>; | ||
getCallHierarchyIncomingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyIncomingCall[]>; | ||
@@ -24,20 +24,20 @@ getCallHierarchyOutgoingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyOutgoingCall[]>; | ||
executeCommand(command: string, args: any[], token?: vscode.CancellationToken): any; | ||
getDocumentFormattingEdits: (uri: URI, options: vscode.FormattingOptions, range: vscode.Range | undefined, onTypeParams: { | ||
getDocumentFormattingEdits: (_uri: URI | import("./types").UriComponents, options: vscode.FormattingOptions, range: vscode.Range | undefined, onTypeParams: { | ||
ch: string; | ||
position: vscode.Position; | ||
} | undefined, token?: vscode.CancellationToken) => Promise<vscode.TextEdit[] | undefined>; | ||
getFoldingRanges: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.FoldingRange[] | undefined>; | ||
getSelectionRanges: (uri: URI, positions: vscode.Position[], token?: vscode.CancellationToken) => Promise<vscode.SelectionRange[] | undefined>; | ||
getLinkedEditingRanges: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LinkedEditingRanges | undefined>; | ||
getDocumentSymbols: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentSymbol[] | undefined>; | ||
getDocumentColors: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.ColorInformation[] | undefined>; | ||
getColorPresentations: (uri: URI, color: vscode.Color, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.ColorPresentation[] | undefined>; | ||
getDiagnostics: (uri: URI, token?: vscode.CancellationToken, response?: (result: vscode.Diagnostic[]) => void) => Promise<vscode.Diagnostic[]>; | ||
getFoldingRanges: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => Promise<vscode.FoldingRange[] | undefined>; | ||
getSelectionRanges: (_uri: URI | import("./types").UriComponents, positions: vscode.Position[], token?: vscode.CancellationToken) => Promise<vscode.SelectionRange[] | undefined>; | ||
getLinkedEditingRanges: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LinkedEditingRanges | undefined>; | ||
getDocumentSymbols: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => Promise<vscode.DocumentSymbol[] | undefined>; | ||
getDocumentColors: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => Promise<vscode.ColorInformation[] | undefined>; | ||
getColorPresentations: (_uri: URI | import("./types").UriComponents, color: vscode.Color, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.ColorPresentation[] | undefined>; | ||
getDiagnostics: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken, response?: (result: vscode.Diagnostic[]) => void) => Promise<vscode.Diagnostic[]>; | ||
getWorkspaceDiagnostics: (token?: vscode.CancellationToken) => Promise<vscode.WorkspaceDocumentDiagnosticReport[]>; | ||
getReferences: (uri: URI, position: vscode.Position, referenceContext: vscode.ReferenceContext, token?: vscode.CancellationToken) => Promise<vscode.Location[] | undefined>; | ||
getFileReferences: (uri: URI, token?: vscode.CancellationToken) => import("./types").NullableProviderResult<vscode.Location[]>; | ||
getDefinition: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
getTypeDefinition: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
getImplementations: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
getRenameRange: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Range | { | ||
getReferences: (_uri: URI | import("./types").UriComponents, position: vscode.Position, referenceContext: vscode.ReferenceContext, token?: vscode.CancellationToken) => Promise<vscode.Location[] | undefined>; | ||
getFileReferences: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => import("./types").NullableProviderResult<vscode.Location[]>; | ||
getDefinition: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
getTypeDefinition: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
getImplementations: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
getRenameRange: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Range | { | ||
range: vscode.Range; | ||
@@ -48,14 +48,14 @@ placeholder: string; | ||
} | undefined>; | ||
getRenameEdits: (uri: URI, position: vscode.Position, newName: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>; | ||
getFileRenameEdits: (oldUri: URI, newUri: URI, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>; | ||
getSemanticTokens: (uri: URI, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, token?: vscode.CancellationToken, _reportProgress?: (tokens: vscode.SemanticTokens) => void) => Promise<vscode.SemanticTokens | undefined>; | ||
getHover: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Hover | undefined>; | ||
getCompletionItems: (uri: URI, position: vscode.Position, completionContext?: vscode.CompletionContext, token?: vscode.CancellationToken) => Promise<vscode.CompletionList>; | ||
getCodeActions: (uri: URI, range: vscode.Range, codeActionContext: vscode.CodeActionContext, token?: vscode.CancellationToken) => Promise<vscode.CodeAction[] | undefined>; | ||
getSignatureHelp: (uri: URI, position: vscode.Position, signatureHelpContext?: vscode.SignatureHelpContext, token?: vscode.CancellationToken) => Promise<vscode.SignatureHelp | undefined>; | ||
getCodeLenses: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.CodeLens[]>; | ||
getDocumentHighlights: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.DocumentHighlight[] | undefined>; | ||
getDocumentLinks: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentLink[]>; | ||
getRenameEdits: (_uri: URI | import("./types").UriComponents, position: vscode.Position, newName: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>; | ||
getFileRenameEdits: (_oldUri: URI | import("./types").UriComponents, _newUri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>; | ||
getSemanticTokens: (_uri: URI | import("./types").UriComponents, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, token?: vscode.CancellationToken, _reportProgress?: (tokens: vscode.SemanticTokens) => void) => Promise<vscode.SemanticTokens | undefined>; | ||
getHover: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Hover | undefined>; | ||
getCompletionItems: (_uri: URI | import("./types").UriComponents, position: vscode.Position, completionContext?: vscode.CompletionContext, token?: vscode.CancellationToken) => Promise<vscode.CompletionList>; | ||
getCodeActions: (_uri: URI | import("./types").UriComponents, range: vscode.Range, codeActionContext: vscode.CodeActionContext, token?: vscode.CancellationToken) => Promise<vscode.CodeAction[] | undefined>; | ||
getSignatureHelp: (_uri: URI | import("./types").UriComponents, position: vscode.Position, signatureHelpContext?: vscode.SignatureHelpContext, token?: vscode.CancellationToken) => Promise<vscode.SignatureHelp | undefined>; | ||
getCodeLenses: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => Promise<vscode.CodeLens[]>; | ||
getDocumentHighlights: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.DocumentHighlight[] | undefined>; | ||
getDocumentLinks: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => Promise<vscode.DocumentLink[]>; | ||
getWorkspaceSymbols: (query: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceSymbol[]>; | ||
getAutoInsertSnippet: (uri: URI, selection: vscode.Position, change: { | ||
getAutoInsertSnippet: (_uri: URI | import("./types").UriComponents, selection: vscode.Position, change: { | ||
rangeOffset: number; | ||
@@ -65,4 +65,4 @@ rangeLength: number; | ||
}, token?: vscode.CancellationToken) => Promise<string | undefined>; | ||
getDocumentDropEdits: (uri: URI, position: vscode.Position, dataTransfer: Map<string, import("./types").DataTransferItem>, token?: vscode.CancellationToken) => Promise<import("./types").DocumentDropEdit | undefined>; | ||
getInlayHints: (uri: URI, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.InlayHint[] | undefined>; | ||
getDocumentDropEdits: (_uri: URI | import("./types").UriComponents, position: vscode.Position, dataTransfer: Map<string, import("./types").DataTransferItem>, token?: vscode.CancellationToken) => Promise<import("./types").DocumentDropEdit | undefined>; | ||
getInlayHints: (_uri: URI | import("./types").UriComponents, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.InlayHint[] | undefined>; | ||
resolveCodeAction: (item: vscode.CodeAction, token?: vscode.CancellationToken) => Promise<vscode.CodeAction>; | ||
@@ -83,3 +83,3 @@ resolveCompletionItem: (item: vscode.CompletionItem, token?: vscode.CancellationToken) => Promise<vscode.CompletionItem>; | ||
context: LanguageServiceContext; | ||
getCallHierarchyItems(uri: URI, position: vscode.Position, token?: vscode.CancellationToken): Promise<vscode.CallHierarchyItem[] | undefined>; | ||
getCallHierarchyItems(_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken): Promise<vscode.CallHierarchyItem[] | undefined>; | ||
getCallHierarchyIncomingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyIncomingCall[]>; | ||
@@ -97,20 +97,20 @@ getCallHierarchyOutgoingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyOutgoingCall[]>; | ||
executeCommand(command: string, args: any[], token?: vscode.CancellationToken): any; | ||
getDocumentFormattingEdits: (uri: URI, options: vscode.FormattingOptions, range: vscode.Range | undefined, onTypeParams: { | ||
getDocumentFormattingEdits: (_uri: URI | import("./types").UriComponents, options: vscode.FormattingOptions, range: vscode.Range | undefined, onTypeParams: { | ||
ch: string; | ||
position: vscode.Position; | ||
} | undefined, token?: vscode.CancellationToken) => Promise<vscode.TextEdit[] | undefined>; | ||
getFoldingRanges: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.FoldingRange[] | undefined>; | ||
getSelectionRanges: (uri: URI, positions: vscode.Position[], token?: vscode.CancellationToken) => Promise<vscode.SelectionRange[] | undefined>; | ||
getLinkedEditingRanges: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LinkedEditingRanges | undefined>; | ||
getDocumentSymbols: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentSymbol[] | undefined>; | ||
getDocumentColors: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.ColorInformation[] | undefined>; | ||
getColorPresentations: (uri: URI, color: vscode.Color, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.ColorPresentation[] | undefined>; | ||
getDiagnostics: (uri: URI, token?: vscode.CancellationToken, response?: (result: vscode.Diagnostic[]) => void) => Promise<vscode.Diagnostic[]>; | ||
getFoldingRanges: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => Promise<vscode.FoldingRange[] | undefined>; | ||
getSelectionRanges: (_uri: URI | import("./types").UriComponents, positions: vscode.Position[], token?: vscode.CancellationToken) => Promise<vscode.SelectionRange[] | undefined>; | ||
getLinkedEditingRanges: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LinkedEditingRanges | undefined>; | ||
getDocumentSymbols: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => Promise<vscode.DocumentSymbol[] | undefined>; | ||
getDocumentColors: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => Promise<vscode.ColorInformation[] | undefined>; | ||
getColorPresentations: (_uri: URI | import("./types").UriComponents, color: vscode.Color, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.ColorPresentation[] | undefined>; | ||
getDiagnostics: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken, response?: (result: vscode.Diagnostic[]) => void) => Promise<vscode.Diagnostic[]>; | ||
getWorkspaceDiagnostics: (token?: vscode.CancellationToken) => Promise<vscode.WorkspaceDocumentDiagnosticReport[]>; | ||
getReferences: (uri: URI, position: vscode.Position, referenceContext: vscode.ReferenceContext, token?: vscode.CancellationToken) => Promise<vscode.Location[] | undefined>; | ||
getFileReferences: (uri: URI, token?: vscode.CancellationToken) => import("./types").NullableProviderResult<vscode.Location[]>; | ||
getDefinition: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
getTypeDefinition: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
getImplementations: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
getRenameRange: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Range | { | ||
getReferences: (_uri: URI | import("./types").UriComponents, position: vscode.Position, referenceContext: vscode.ReferenceContext, token?: vscode.CancellationToken) => Promise<vscode.Location[] | undefined>; | ||
getFileReferences: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => import("./types").NullableProviderResult<vscode.Location[]>; | ||
getDefinition: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
getTypeDefinition: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
getImplementations: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.LocationLink[] | undefined>; | ||
getRenameRange: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Range | { | ||
range: vscode.Range; | ||
@@ -121,14 +121,14 @@ placeholder: string; | ||
} | undefined>; | ||
getRenameEdits: (uri: URI, position: vscode.Position, newName: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>; | ||
getFileRenameEdits: (oldUri: URI, newUri: URI, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>; | ||
getSemanticTokens: (uri: URI, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, token?: vscode.CancellationToken, _reportProgress?: (tokens: vscode.SemanticTokens) => void) => Promise<vscode.SemanticTokens | undefined>; | ||
getHover: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Hover | undefined>; | ||
getCompletionItems: (uri: URI, position: vscode.Position, completionContext?: vscode.CompletionContext, token?: vscode.CancellationToken) => Promise<vscode.CompletionList>; | ||
getCodeActions: (uri: URI, range: vscode.Range, codeActionContext: vscode.CodeActionContext, token?: vscode.CancellationToken) => Promise<vscode.CodeAction[] | undefined>; | ||
getSignatureHelp: (uri: URI, position: vscode.Position, signatureHelpContext?: vscode.SignatureHelpContext, token?: vscode.CancellationToken) => Promise<vscode.SignatureHelp | undefined>; | ||
getCodeLenses: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.CodeLens[]>; | ||
getDocumentHighlights: (uri: URI, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.DocumentHighlight[] | undefined>; | ||
getDocumentLinks: (uri: URI, token?: vscode.CancellationToken) => Promise<vscode.DocumentLink[]>; | ||
getRenameEdits: (_uri: URI | import("./types").UriComponents, position: vscode.Position, newName: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>; | ||
getFileRenameEdits: (_oldUri: URI | import("./types").UriComponents, _newUri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceEdit | undefined>; | ||
getSemanticTokens: (_uri: URI | import("./types").UriComponents, range: vscode.Range | undefined, legend: vscode.SemanticTokensLegend, token?: vscode.CancellationToken, _reportProgress?: (tokens: vscode.SemanticTokens) => void) => Promise<vscode.SemanticTokens | undefined>; | ||
getHover: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.Hover | undefined>; | ||
getCompletionItems: (_uri: URI | import("./types").UriComponents, position: vscode.Position, completionContext?: vscode.CompletionContext, token?: vscode.CancellationToken) => Promise<vscode.CompletionList>; | ||
getCodeActions: (_uri: URI | import("./types").UriComponents, range: vscode.Range, codeActionContext: vscode.CodeActionContext, token?: vscode.CancellationToken) => Promise<vscode.CodeAction[] | undefined>; | ||
getSignatureHelp: (_uri: URI | import("./types").UriComponents, position: vscode.Position, signatureHelpContext?: vscode.SignatureHelpContext, token?: vscode.CancellationToken) => Promise<vscode.SignatureHelp | undefined>; | ||
getCodeLenses: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => Promise<vscode.CodeLens[]>; | ||
getDocumentHighlights: (_uri: URI | import("./types").UriComponents, position: vscode.Position, token?: vscode.CancellationToken) => Promise<vscode.DocumentHighlight[] | undefined>; | ||
getDocumentLinks: (_uri: URI | import("./types").UriComponents, token?: vscode.CancellationToken) => Promise<vscode.DocumentLink[]>; | ||
getWorkspaceSymbols: (query: string, token?: vscode.CancellationToken) => Promise<vscode.WorkspaceSymbol[]>; | ||
getAutoInsertSnippet: (uri: URI, selection: vscode.Position, change: { | ||
getAutoInsertSnippet: (_uri: URI | import("./types").UriComponents, selection: vscode.Position, change: { | ||
rangeOffset: number; | ||
@@ -138,4 +138,4 @@ rangeLength: number; | ||
}, token?: vscode.CancellationToken) => Promise<string | undefined>; | ||
getDocumentDropEdits: (uri: URI, position: vscode.Position, dataTransfer: Map<string, import("./types").DataTransferItem>, token?: vscode.CancellationToken) => Promise<import("./types").DocumentDropEdit | undefined>; | ||
getInlayHints: (uri: URI, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.InlayHint[] | undefined>; | ||
getDocumentDropEdits: (_uri: URI | import("./types").UriComponents, position: vscode.Position, dataTransfer: Map<string, import("./types").DataTransferItem>, token?: vscode.CancellationToken) => Promise<import("./types").DocumentDropEdit | undefined>; | ||
getInlayHints: (_uri: URI | import("./types").UriComponents, range: vscode.Range, token?: vscode.CancellationToken) => Promise<vscode.InlayHint[] | undefined>; | ||
resolveCodeAction: (item: vscode.CodeAction, token?: vscode.CancellationToken) => Promise<vscode.CodeAction>; | ||
@@ -142,0 +142,0 @@ resolveCompletionItem: (item: vscode.CompletionItem, token?: vscode.CancellationToken) => Promise<vscode.CompletionItem>; |
@@ -9,2 +9,9 @@ import type { Language, SourceScript, VirtualCode } from '@volar/language-core'; | ||
export type * from 'vscode-languageserver-protocol'; | ||
export interface UriComponents { | ||
scheme: string; | ||
authority: string; | ||
path: string; | ||
query: string; | ||
fragment: string; | ||
} | ||
export interface LanguageServiceEnvironment { | ||
@@ -11,0 +18,0 @@ workspaceFolders: URI[]; |
{ | ||
"name": "@volar/language-service", | ||
"version": "2.4.0-alpha.2", | ||
"version": "2.4.0-alpha.3", | ||
"license": "MIT", | ||
@@ -15,3 +15,3 @@ "files": [ | ||
"dependencies": { | ||
"@volar/language-core": "2.4.0-alpha.2", | ||
"@volar/language-core": "2.4.0-alpha.3", | ||
"vscode-languageserver-protocol": "^3.17.5", | ||
@@ -21,3 +21,3 @@ "vscode-languageserver-textdocument": "^1.0.11", | ||
}, | ||
"gitHead": "62914047f925b79391fee6e4f697705b77641baf" | ||
"gitHead": "cb556d64b389cf2ab637f0cb97fee35f3579cfad" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
222053
4276
+ Added@volar/language-core@2.4.0-alpha.3(transitive)
+ Added@volar/source-map@2.4.0-alpha.3(transitive)
- Removed@volar/language-core@2.4.0-alpha.2(transitive)
- Removed@volar/source-map@2.4.0-alpha.2(transitive)