volar-service-typescript 0.0.17 → 0.0.19
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/out/configs/getFormatCodeSettings.d.ts +2 -2
- package/out/configs/getUserPreferences.d.ts +1 -1
- package/out/configs/getUserPreferences.js +5 -6
- package/out/features/callHierarchy.d.ts +1 -1
- package/out/features/callHierarchy.js +2 -2
- package/out/features/codeAction.d.ts +1 -1
- package/out/features/codeAction.js +2 -2
- package/out/features/codeActionResolve.d.ts +3 -3
- package/out/features/completions/basic.d.ts +2 -2
- package/out/features/completions/basic.js +1 -1
- package/out/features/completions/directiveComment.d.ts +1 -1
- package/out/features/completions/jsDoc.d.ts +1 -1
- package/out/features/completions/resolve.d.ts +1 -1
- package/out/features/completions/resolve.js +1 -1
- package/out/features/definition.d.ts +1 -1
- package/out/features/definition.js +1 -1
- package/out/features/diagnostics.d.ts +1 -1
- package/out/features/documentHighlight.d.ts +1 -1
- package/out/features/documentSymbol.d.ts +1 -1
- package/out/features/documentSymbol.js +1 -1
- package/out/features/fileReferences.d.ts +1 -1
- package/out/features/fileReferences.js +1 -1
- package/out/features/fileRename.d.ts +1 -1
- package/out/features/fileRename.js +1 -1
- package/out/features/foldingRanges.d.ts +1 -1
- package/out/features/formatting.d.ts +1 -1
- package/out/features/hover.d.ts +1 -1
- package/out/features/hover.js +1 -1
- package/out/features/implementation.d.ts +1 -1
- package/out/features/implementation.js +1 -1
- package/out/features/inlayHints.d.ts +1 -1
- package/out/features/prepareRename.d.ts +1 -1
- package/out/features/references.d.ts +1 -1
- package/out/features/references.js +1 -1
- package/out/features/rename.d.ts +2 -2
- package/out/features/rename.js +1 -1
- package/out/features/selectionRanges.d.ts +1 -1
- package/out/features/semanticTokens.d.ts +1 -1
- package/out/features/signatureHelp.d.ts +1 -1
- package/out/features/typeDefinition.d.ts +1 -1
- package/out/features/typeDefinition.js +1 -1
- package/out/features/workspaceSymbol.d.ts +1 -1
- package/out/features/workspaceSymbol.js +1 -1
- package/out/index.d.ts +4 -8
- package/out/index.js +425 -430
- package/out/types.d.ts +2 -0
- package/out/utils/previewer.d.ts +1 -1
- package/out/utils/transforms.d.ts +2 -2
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SharedContext } from '../types';
|
|
2
|
-
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
3
1
|
import type { FormattingOptions } from '@volar/language-service';
|
|
2
|
+
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
4
3
|
import type { TextDocument } from 'vscode-languageserver-textdocument';
|
|
4
|
+
import type { SharedContext } from '../types';
|
|
5
5
|
export declare function getFormatCodeSettings(ctx: SharedContext, document: TextDocument, options?: FormattingOptions): Promise<ts.FormatCodeSettings>;
|
|
6
6
|
//# sourceMappingURL=getFormatCodeSettings.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
3
2
|
import type { TextDocument } from 'vscode-languageserver-textdocument';
|
|
3
|
+
import type { SharedContext } from '../types';
|
|
4
4
|
export declare function getUserPreferences(ctx: SharedContext, document: TextDocument): Promise<ts.UserPreferences>;
|
|
5
5
|
//# sourceMappingURL=getUserPreferences.d.ts.map
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getUserPreferences = void 0;
|
|
4
|
-
const shared_1 = require("../shared");
|
|
5
4
|
const path = require("path-browserify");
|
|
6
|
-
const
|
|
5
|
+
const shared_1 = require("../shared");
|
|
7
6
|
async function getUserPreferences(ctx, document) {
|
|
8
7
|
const config = await ctx.env.getConfiguration?.((0, shared_1.getConfigTitle)(document)) ?? {};
|
|
9
8
|
const preferencesConfig = config?.preferences ?? {};
|
|
@@ -23,7 +22,7 @@ async function getUserPreferences(ctx, document) {
|
|
|
23
22
|
includeCompletionsWithSnippetText: config.suggest?.includeCompletionsWithSnippetText ?? true,
|
|
24
23
|
includeCompletionsWithClassMemberSnippets: config.suggest?.classMemberSnippets?.enabled ?? true,
|
|
25
24
|
includeCompletionsWithObjectLiteralMethodSnippets: config.suggest?.objectLiteralMethodSnippets?.enabled ?? true,
|
|
26
|
-
autoImportFileExcludePatterns: getAutoImportFileExcludePatternsPreference(preferencesConfig, ctx.
|
|
25
|
+
autoImportFileExcludePatterns: getAutoImportFileExcludePatternsPreference(preferencesConfig, ctx.typescript.languageServiceHost.getCurrentDirectory()),
|
|
27
26
|
useLabelDetailsInCompletionEntries: true,
|
|
28
27
|
allowIncompleteCompletions: true,
|
|
29
28
|
displayPartsForJSDoc: true,
|
|
@@ -51,14 +50,14 @@ function getQuoteStylePreference(config) {
|
|
|
51
50
|
default: return 'auto';
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
|
-
function getAutoImportFileExcludePatternsPreference(config,
|
|
55
|
-
return
|
|
53
|
+
function getAutoImportFileExcludePatternsPreference(config, workspacePath) {
|
|
54
|
+
return workspacePath && config.autoImportFileExcludePatterns?.map(p => {
|
|
56
55
|
// Normalization rules: https://github.com/microsoft/TypeScript/pull/49578
|
|
57
56
|
const slashNormalized = p.replace(/\\/g, '/');
|
|
58
57
|
const isRelative = /^\.\.?($|\/)/.test(slashNormalized);
|
|
59
58
|
return path.isAbsolute(p) ? p :
|
|
60
59
|
p.startsWith('*') ? '/' + slashNormalized :
|
|
61
|
-
isRelative ?
|
|
60
|
+
isRelative ? path.join(workspacePath, p) :
|
|
62
61
|
'/**/' + slashNormalized;
|
|
63
62
|
});
|
|
64
63
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): {
|
|
4
4
|
doPrepare: (uri: string, position: vscode.Position) => vscode.CallHierarchyItem[];
|
|
5
5
|
getIncomingCalls: (item: vscode.CallHierarchyItem) => vscode.CallHierarchyIncomingCall[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = void 0;
|
|
4
|
+
const path = require("path-browserify");
|
|
4
5
|
const PConst = require("../protocol.const");
|
|
6
|
+
const shared_1 = require("../shared");
|
|
5
7
|
const modifiers_1 = require("../utils/modifiers");
|
|
6
8
|
const typeConverters = require("../utils/typeConverters");
|
|
7
|
-
const path = require("path-browserify");
|
|
8
|
-
const shared_1 = require("../shared");
|
|
9
9
|
function register(ctx) {
|
|
10
10
|
function doPrepare(uri, position) {
|
|
11
11
|
const document = ctx.getTextDocument(uri);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = void 0;
|
|
4
|
-
const rename_1 = require("./rename");
|
|
5
|
-
const fixNames = require("../utils/fixNames");
|
|
6
4
|
const getFormatCodeSettings_1 = require("../configs/getFormatCodeSettings");
|
|
7
5
|
const getUserPreferences_1 = require("../configs/getUserPreferences");
|
|
8
6
|
const shared_1 = require("../shared");
|
|
7
|
+
const fixNames = require("../utils/fixNames");
|
|
9
8
|
const codeActionResolve_1 = require("./codeActionResolve");
|
|
9
|
+
const rename_1 = require("./rename");
|
|
10
10
|
function register(ctx) {
|
|
11
11
|
let resolveCommandSupport = ctx.env.clientCapabilities?.textDocument?.codeAction?.resolveSupport?.properties?.includes('command');
|
|
12
12
|
let resolveEditSupport = ctx.env.clientCapabilities?.textDocument?.codeAction?.resolveSupport?.properties?.includes('edit');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
2
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
+
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
3
3
|
import type { TextDocument } from 'vscode-languageserver-textdocument';
|
|
4
|
-
import { SharedContext } from '../types';
|
|
5
|
-
import { Data, FixAllData, RefactorData } from './codeAction';
|
|
4
|
+
import type { SharedContext } from '../types';
|
|
5
|
+
import type { Data, FixAllData, RefactorData } from './codeAction';
|
|
6
6
|
export declare function register(ctx: SharedContext): (codeAction: vscode.CodeAction) => Promise<vscode.CodeAction>;
|
|
7
7
|
export declare function resolveFixAllCodeAction(ctx: SharedContext, codeAction: vscode.CodeAction, data: FixAllData, formatOptions: ts.FormatCodeSettings, preferences: ts.UserPreferences): void;
|
|
8
8
|
export declare function resolveRefactorCodeAction(ctx: SharedContext, codeAction: vscode.CodeAction, data: RefactorData, document: TextDocument, formatOptions: ts.FormatCodeSettings, preferences: ts.UserPreferences): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SharedContext } from '../../types';
|
|
2
|
-
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
3
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
+
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
3
|
+
import type { SharedContext } from '../../types';
|
|
4
4
|
export interface Data {
|
|
5
5
|
uri: string;
|
|
6
6
|
fileName: string;
|
|
@@ -4,8 +4,8 @@ exports.handleKindModifiers = exports.register = void 0;
|
|
|
4
4
|
const semver = require("semver");
|
|
5
5
|
const getUserPreferences_1 = require("../../configs/getUserPreferences");
|
|
6
6
|
const PConst = require("../../protocol.const");
|
|
7
|
-
const modifiers_1 = require("../../utils/modifiers");
|
|
8
7
|
const shared_1 = require("../../shared");
|
|
8
|
+
const modifiers_1 = require("../../utils/modifiers");
|
|
9
9
|
function register(ctx) {
|
|
10
10
|
const { ts } = ctx;
|
|
11
11
|
const lt_320 = semver.lt(ts.version, '3.2.0');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
-
import { SharedContext } from '../../types';
|
|
2
|
+
import type { SharedContext } from '../../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.CompletionItem[] | undefined;
|
|
4
4
|
//# sourceMappingURL=directiveComment.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SharedContext } from '../../types';
|
|
2
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
+
import type { SharedContext } from '../../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.CompletionItem | undefined;
|
|
4
4
|
//# sourceMappingURL=jsDoc.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SharedContext } from '../../types';
|
|
2
1
|
import type * as vscode from '@volar/language-service';
|
|
3
2
|
import type { TextDocument } from 'vscode-languageserver-textdocument';
|
|
3
|
+
import type { SharedContext } from '../../types';
|
|
4
4
|
export declare function register(ctx: SharedContext): (item: vscode.CompletionItem, newPosition?: vscode.Position) => Promise<vscode.CompletionItem>;
|
|
5
5
|
export declare function getLineText(document: TextDocument, line: number): string;
|
|
6
6
|
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -79,7 +79,7 @@ function register(ctx) {
|
|
|
79
79
|
const shouldCompleteFunction = isValidFunctionCompletionContext(ctx.typescript.languageService, fileName, offset, document);
|
|
80
80
|
if (shouldCompleteFunction) {
|
|
81
81
|
const { snippet, parameterCount } = (0, snippetForFunctionCall_1.snippetForFunctionCall)({
|
|
82
|
-
insertText: item.insertText ?? item.textEdit?.newText,
|
|
82
|
+
insertText: item.insertText ?? item.textEdit?.newText, // insertText is dropped by LSP in some case: https://github.com/microsoft/vscode-languageserver-node/blob/9b742021fb04ad081aa3676a9eecf4fa612084b4/client/src/common/codeConverter.ts#L659-L664
|
|
83
83
|
label: item.label,
|
|
84
84
|
}, details.displayParts);
|
|
85
85
|
if (item.textEdit) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.LocationLink[];
|
|
4
4
|
//# sourceMappingURL=definition.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = void 0;
|
|
4
|
-
const transforms_1 = require("../utils/transforms");
|
|
5
4
|
const shared_1 = require("../shared");
|
|
5
|
+
const transforms_1 = require("../utils/transforms");
|
|
6
6
|
function register(ctx) {
|
|
7
7
|
return (uri, position) => {
|
|
8
8
|
const document = ctx.getTextDocument(uri);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as vscode from '@volar/language-service';
|
|
2
2
|
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
3
|
-
import { SharedContext } from '../types';
|
|
3
|
+
import type { SharedContext } from '../types';
|
|
4
4
|
export declare function register(ctx: SharedContext): (uri: string, options: {
|
|
5
5
|
semantic?: boolean;
|
|
6
6
|
syntactic?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SharedContext } from '../types';
|
|
2
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.DocumentHighlight[];
|
|
4
4
|
//# sourceMappingURL=documentHighlight.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string) => vscode.DocumentSymbol[];
|
|
4
4
|
//# sourceMappingURL=documentSymbol.d.ts.map
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = void 0;
|
|
4
4
|
const PConst = require("../protocol.const");
|
|
5
|
-
const modifiers_1 = require("../utils/modifiers");
|
|
6
5
|
const shared_1 = require("../shared");
|
|
6
|
+
const modifiers_1 = require("../utils/modifiers");
|
|
7
7
|
const getSymbolKind = (kind) => {
|
|
8
8
|
switch (kind) {
|
|
9
9
|
case PConst.Kind.module: return 2;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string) => vscode.Location[];
|
|
4
4
|
//# sourceMappingURL=fileReferences.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = void 0;
|
|
4
|
-
const transforms_1 = require("../utils/transforms");
|
|
5
4
|
const shared_1 = require("../shared");
|
|
5
|
+
const transforms_1 = require("../utils/transforms");
|
|
6
6
|
function register(ctx) {
|
|
7
7
|
return (uri) => {
|
|
8
8
|
const document = ctx.getTextDocument(uri);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (oldUri: string, newUri: string) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
4
4
|
//# sourceMappingURL=fileRename.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = void 0;
|
|
4
|
-
const rename_1 = require("./rename");
|
|
5
4
|
const getFormatCodeSettings_1 = require("../configs/getFormatCodeSettings");
|
|
6
5
|
const getUserPreferences_1 = require("../configs/getUserPreferences");
|
|
7
6
|
const shared_1 = require("../shared");
|
|
7
|
+
const rename_1 = require("./rename");
|
|
8
8
|
function register(ctx) {
|
|
9
9
|
return async (oldUri, newUri) => {
|
|
10
10
|
const document = ctx.getTextDocument(oldUri);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string) => vscode.FoldingRange[];
|
|
4
4
|
//# sourceMappingURL=foldingRanges.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
3
2
|
import type { TextDocument } from 'vscode-languageserver-textdocument';
|
|
3
|
+
import type { SharedContext } from '../types';
|
|
4
4
|
export declare function register(ctx: SharedContext): {
|
|
5
5
|
onRange: (document: TextDocument, range: vscode.Range | undefined, options: vscode.FormattingOptions) => Promise<vscode.TextEdit[]>;
|
|
6
6
|
onType: (document: TextDocument, options: vscode.FormattingOptions, position: vscode.Position, key: string) => Promise<vscode.TextEdit[]>;
|
package/out/features/hover.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position, documentOnly?: boolean) => vscode.Hover | undefined;
|
|
4
4
|
//# sourceMappingURL=hover.d.ts.map
|
package/out/features/hover.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = void 0;
|
|
4
|
-
const previewer = require("../utils/previewer");
|
|
5
4
|
const shared_1 = require("../shared");
|
|
5
|
+
const previewer = require("../utils/previewer");
|
|
6
6
|
function register(ctx) {
|
|
7
7
|
const { ts } = ctx;
|
|
8
8
|
return (uri, position, documentOnly = false) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.LocationLink[];
|
|
4
4
|
//# sourceMappingURL=implementation.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = void 0;
|
|
4
|
-
const transforms_1 = require("../utils/transforms");
|
|
5
4
|
const shared_1 = require("../shared");
|
|
5
|
+
const transforms_1 = require("../utils/transforms");
|
|
6
6
|
function register(ctx) {
|
|
7
7
|
return (uri, position) => {
|
|
8
8
|
const document = ctx.getTextDocument(uri);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SharedContext } from '../types';
|
|
2
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
4
4
|
//# sourceMappingURL=inlayHints.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.Location[];
|
|
4
4
|
//# sourceMappingURL=references.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = void 0;
|
|
4
|
-
const transforms_1 = require("../utils/transforms");
|
|
5
4
|
const shared_1 = require("../shared");
|
|
5
|
+
const transforms_1 = require("../utils/transforms");
|
|
6
6
|
function register(ctx) {
|
|
7
7
|
return (uri, position) => {
|
|
8
8
|
const document = ctx.getTextDocument(uri);
|
package/out/features/rename.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
2
1
|
import type * as vscode from '@volar/language-service';
|
|
3
|
-
import
|
|
2
|
+
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
3
|
+
import type { SharedContext } from '../types';
|
|
4
4
|
export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position, newName: string) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
5
5
|
export declare function fileTextChangesToWorkspaceEdit(changes: readonly ts.FileTextChanges[], ctx: SharedContext): vscode.WorkspaceEdit;
|
|
6
6
|
//# sourceMappingURL=rename.d.ts.map
|
package/out/features/rename.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fileTextChangesToWorkspaceEdit = exports.register = void 0;
|
|
4
4
|
const path = require("path-browserify");
|
|
5
|
-
const prepareRename_1 = require("./prepareRename");
|
|
6
5
|
const getFormatCodeSettings_1 = require("../configs/getFormatCodeSettings");
|
|
7
6
|
const getUserPreferences_1 = require("../configs/getUserPreferences");
|
|
8
7
|
const shared_1 = require("../shared");
|
|
8
|
+
const prepareRename_1 = require("./prepareRename");
|
|
9
9
|
function register(ctx) {
|
|
10
10
|
return async (uri, position, newName) => {
|
|
11
11
|
const document = ctx.getTextDocument(uri);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SharedContext } from '../types';
|
|
2
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string, positions: vscode.Position[]) => vscode.SelectionRange[];
|
|
4
4
|
//# sourceMappingURL=selectionRanges.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string, range: vscode.Range, legend: vscode.SemanticTokensLegend) => [number, number, number, number, number][] | undefined;
|
|
4
4
|
//# sourceMappingURL=semanticTokens.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SharedContext } from '../types';
|
|
2
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position, context?: vscode.SignatureHelpContext) => vscode.SignatureHelp | undefined;
|
|
4
4
|
//# sourceMappingURL=signatureHelp.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from 'vscode-languageserver-protocol';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (uri: string, position: vscode.Position) => vscode.LocationLink[];
|
|
4
4
|
//# sourceMappingURL=typeDefinition.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = void 0;
|
|
4
|
-
const transforms_1 = require("../utils/transforms");
|
|
5
4
|
const shared_1 = require("../shared");
|
|
5
|
+
const transforms_1 = require("../utils/transforms");
|
|
6
6
|
function register(ctx) {
|
|
7
7
|
return (uri, position) => {
|
|
8
8
|
const document = ctx.getTextDocument(uri);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as vscode from '@volar/language-service';
|
|
2
|
-
import { SharedContext } from '../types';
|
|
2
|
+
import type { SharedContext } from '../types';
|
|
3
3
|
export declare function register(ctx: SharedContext): (query: string) => vscode.WorkspaceSymbol[];
|
|
4
4
|
//# sourceMappingURL=workspaceSymbol.d.ts.map
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.register = void 0;
|
|
4
4
|
const PConst = require("../protocol.const");
|
|
5
|
-
const modifiers_1 = require("../utils/modifiers");
|
|
6
5
|
const shared_1 = require("../shared");
|
|
6
|
+
const modifiers_1 = require("../utils/modifiers");
|
|
7
7
|
function getSymbolKind(item) {
|
|
8
8
|
switch (item.kind) {
|
|
9
9
|
case PConst.Kind.method: return 6;
|
package/out/index.d.ts
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ServicePlugin } from '@volar/language-service';
|
|
2
2
|
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
3
|
-
import { TextDocument } from 'vscode-languageserver-textdocument';
|
|
4
3
|
export * from '@volar/typescript';
|
|
5
4
|
export interface Provide {
|
|
6
5
|
'typescript/typescript': () => typeof import('typescript/lib/tsserverlibrary');
|
|
7
6
|
'typescript/sys': () => ts.System;
|
|
8
|
-
'typescript/
|
|
9
|
-
'typescript/
|
|
10
|
-
'typescript/languageService': (document?: TextDocument) => ts.LanguageService;
|
|
11
|
-
'typescript/languageServiceHost': (document?: TextDocument) => ts.LanguageServiceHost;
|
|
7
|
+
'typescript/languageService': () => ts.LanguageService;
|
|
8
|
+
'typescript/languageServiceHost': () => ts.LanguageServiceHost;
|
|
12
9
|
'typescript/syntacticLanguageService': () => ts.LanguageService;
|
|
13
10
|
'typescript/syntacticLanguageServiceHost': () => ts.LanguageServiceHost;
|
|
14
11
|
}
|
|
15
|
-
export declare function create():
|
|
16
|
-
export default create;
|
|
12
|
+
export declare function create(ts: typeof import('typescript/lib/tsserverlibrary')): ServicePlugin;
|
|
17
13
|
//# sourceMappingURL=index.d.ts.map
|