@volar/language-server 1.0.0-alpha.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/LICENSE +21 -0
- package/out/browser.d.ts +3 -0
- package/out/browser.js +47 -0
- package/out/features/customFeatures.d.ts +4 -0
- package/out/features/customFeatures.js +83 -0
- package/out/features/documentFeatures.d.ts +4 -0
- package/out/features/documentFeatures.js +73 -0
- package/out/features/languageFeatures.d.ts +4 -0
- package/out/features/languageFeatures.js +274 -0
- package/out/index.d.ts +3 -0
- package/out/index.js +19 -0
- package/out/node.d.ts +3 -0
- package/out/node.js +88 -0
- package/out/registers/registerDocumentFeatures.d.ts +3 -0
- package/out/registers/registerDocumentFeatures.js +30 -0
- package/out/registers/registerlanguageFeatures.d.ts +3 -0
- package/out/registers/registerlanguageFeatures.js +144 -0
- package/out/requests.d.ts +81 -0
- package/out/requests.js +65 -0
- package/out/schemaRequestHandlers/file.d.ts +2 -0
- package/out/schemaRequestHandlers/file.js +12 -0
- package/out/schemaRequestHandlers/http.d.ts +1 -0
- package/out/schemaRequestHandlers/http.js +12 -0
- package/out/server.d.ts +3 -0
- package/out/server.js +99 -0
- package/out/types.d.ts +112 -0
- package/out/types.js +2 -0
- package/out/utils/config.d.ts +2 -0
- package/out/utils/config.js +17 -0
- package/out/utils/configurationHost.d.ts +5 -0
- package/out/utils/configurationHost.js +38 -0
- package/out/utils/documentServiceHost.d.ts +30 -0
- package/out/utils/documentServiceHost.js +51 -0
- package/out/utils/inferredCompilerOptions.d.ts +3 -0
- package/out/utils/inferredCompilerOptions.js +71 -0
- package/out/utils/iterableWeakSet.d.ts +7 -0
- package/out/utils/iterableWeakSet.js +40 -0
- package/out/utils/nodeFileSystemHost.d.ts +3 -0
- package/out/utils/nodeFileSystemHost.js +95 -0
- package/out/utils/project.d.ts +99 -0
- package/out/utils/project.js +273 -0
- package/out/utils/snapshots.d.ts +45 -0
- package/out/utils/snapshots.js +201 -0
- package/out/utils/ts/core.d.ts +83 -0
- package/out/utils/ts/core.js +319 -0
- package/out/utils/ts/corePublic.d.ts +91 -0
- package/out/utils/ts/corePublic.js +50 -0
- package/out/utils/ts/path.d.ts +112 -0
- package/out/utils/ts/path.js +416 -0
- package/out/utils/ts/types.d.ts +129 -0
- package/out/utils/ts/types.js +2 -0
- package/out/utils/ts/utilities.d.ts +7 -0
- package/out/utils/ts/utilities.js +249 -0
- package/out/utils/webFileSystemHost.d.ts +2 -0
- package/out/utils/webFileSystemHost.js +265 -0
- package/out/utils/workspaceProjects.d.ts +120 -0
- package/out/utils/workspaceProjects.js +226 -0
- package/out/utils/workspaces.d.ts +309 -0
- package/out/utils/workspaces.js +154 -0
- package/package.json +27 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LanguageServerPlugin, RuntimeEnvironment } from '../types';
|
|
2
|
+
import * as embedded from '@volar/language-service';
|
|
3
|
+
import { ConfigurationHost } from '@volar/vue-language-service';
|
|
4
|
+
import { URI } from 'vscode-uri';
|
|
5
|
+
import type * as _ from 'vscode-languageserver-textdocument';
|
|
6
|
+
export declare function createDocumentServiceHost(runtimeEnv: RuntimeEnvironment, plugins: ReturnType<LanguageServerPlugin>[], ts: typeof import('typescript/lib/tsserverlibrary'), configHost: ConfigurationHost | undefined): {
|
|
7
|
+
add: (rootUri: URI) => void;
|
|
8
|
+
remove: (rootUri: URI) => void;
|
|
9
|
+
get: (documentUri: string) => {
|
|
10
|
+
format: (document: _.TextDocument, options: import("vscode-languageserver").FormattingOptions, range?: import("vscode-languageserver").Range | undefined, onTypeParams?: {
|
|
11
|
+
ch: string;
|
|
12
|
+
position: import("vscode-languageserver").Position;
|
|
13
|
+
} | undefined) => Promise<import("vscode-languageserver").TextEdit[] | undefined>;
|
|
14
|
+
getFoldingRanges: (document: _.TextDocument) => Promise<import("vscode-languageserver").FoldingRange[] | undefined>;
|
|
15
|
+
getSelectionRanges: (document: _.TextDocument, positions: import("vscode-languageserver").Position[]) => Promise<import("vscode-languageserver").SelectionRange[] | undefined>;
|
|
16
|
+
findLinkedEditingRanges: (document: _.TextDocument, position: import("vscode-languageserver").Position) => Promise<import("vscode-languageserver").LinkedEditingRanges | undefined>;
|
|
17
|
+
findDocumentSymbols: (document: _.TextDocument) => Promise<import("vscode-languageserver").SymbolInformation[] | undefined>;
|
|
18
|
+
findDocumentColors: (document: _.TextDocument) => Promise<import("vscode-languageserver").ColorInformation[] | undefined>;
|
|
19
|
+
getColorPresentations: (document: _.TextDocument, color: import("vscode-languageserver").Color, range: import("vscode-languageserver").Range) => Promise<import("vscode-languageserver").ColorPresentation[] | undefined>;
|
|
20
|
+
doAutoInsert: (document: _.TextDocument, position: import("vscode-languageserver").Position, options: {
|
|
21
|
+
lastChange: {
|
|
22
|
+
range: import("vscode-languageserver").Range;
|
|
23
|
+
rangeOffset: number;
|
|
24
|
+
rangeLength: number;
|
|
25
|
+
text: string;
|
|
26
|
+
};
|
|
27
|
+
}) => Promise<NonNullable<string | import("vscode-languageserver").TextEdit | null | undefined> | undefined>;
|
|
28
|
+
context: embedded.DocumentServiceRuntimeContext;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.createDocumentServiceHost = void 0;
|
|
3
|
+
const embedded = require("@volar/language-service");
|
|
4
|
+
const vscode_uri_1 = require("vscode-uri");
|
|
5
|
+
const config_1 = require("./config");
|
|
6
|
+
function createDocumentServiceHost(runtimeEnv, plugins, ts, configHost) {
|
|
7
|
+
const workspaceServices = new Map();
|
|
8
|
+
const untitledService = create(vscode_uri_1.URI.from({ scheme: 'untitled' }));
|
|
9
|
+
return {
|
|
10
|
+
add,
|
|
11
|
+
remove,
|
|
12
|
+
get,
|
|
13
|
+
};
|
|
14
|
+
function add(rootUri) {
|
|
15
|
+
workspaceServices.set(rootUri.toString(), create(rootUri));
|
|
16
|
+
}
|
|
17
|
+
function remove(rootUri) {
|
|
18
|
+
workspaceServices.delete(rootUri.toString());
|
|
19
|
+
}
|
|
20
|
+
function get(documentUri) {
|
|
21
|
+
for (const [rootUri, service] of workspaceServices) {
|
|
22
|
+
if (documentUri.startsWith(rootUri)) {
|
|
23
|
+
return service;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return untitledService;
|
|
27
|
+
}
|
|
28
|
+
function create(rootUri) {
|
|
29
|
+
const env = {
|
|
30
|
+
rootUri,
|
|
31
|
+
configurationHost: configHost,
|
|
32
|
+
fileSystemProvider: runtimeEnv.fileSystemProvide,
|
|
33
|
+
};
|
|
34
|
+
const serviceContext = embedded.createDocumentServiceContext({
|
|
35
|
+
ts,
|
|
36
|
+
env,
|
|
37
|
+
getLanguageModules() {
|
|
38
|
+
return plugins.map(plugin => { var _a, _b, _c; return (_c = (_b = (_a = plugin.documentService) === null || _a === void 0 ? void 0 : _a.getLanguageModules) === null || _b === void 0 ? void 0 : _b.call(_a, ts, env)) !== null && _c !== void 0 ? _c : []; }).flat();
|
|
39
|
+
},
|
|
40
|
+
getPlugins() {
|
|
41
|
+
return [
|
|
42
|
+
...(0, config_1.loadCustomPlugins)(rootUri.fsPath),
|
|
43
|
+
...plugins.map(plugin => { var _a, _b, _c; return (_c = (_b = (_a = plugin.documentService) === null || _a === void 0 ? void 0 : _a.getServicePlugins) === null || _b === void 0 ? void 0 : _b.call(_a, serviceContext)) !== null && _c !== void 0 ? _c : []; }).flat(),
|
|
44
|
+
];
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
return embedded.createDocumentService(serviceContext);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.createDocumentServiceHost = createDocumentServiceHost;
|
|
51
|
+
//# sourceMappingURL=documentServiceHost.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ConfigurationHost } from '@volar/vue-language-service';
|
|
2
|
+
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
3
|
+
export declare function getInferredCompilerOptions(ts: typeof import('typescript/lib/tsserverlibrary'), configurationHost: ConfigurationHost | undefined): Promise<ts.CompilerOptions>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.getInferredCompilerOptions = void 0;
|
|
12
|
+
function getInferredCompilerOptions(ts, configurationHost) {
|
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
let [implicitProjectConfig_1, implicitProjectConfig_2] = yield Promise.all([
|
|
15
|
+
configurationHost === null || configurationHost === void 0 ? void 0 : configurationHost.getConfiguration('js/ts.implicitProjectConfig'),
|
|
16
|
+
configurationHost === null || configurationHost === void 0 ? void 0 : configurationHost.getConfiguration('javascript.implicitProjectConfig'),
|
|
17
|
+
]);
|
|
18
|
+
implicitProjectConfig_1 = implicitProjectConfig_1 !== null && implicitProjectConfig_1 !== void 0 ? implicitProjectConfig_1 : {};
|
|
19
|
+
implicitProjectConfig_2 = implicitProjectConfig_2 !== null && implicitProjectConfig_2 !== void 0 ? implicitProjectConfig_2 : {};
|
|
20
|
+
const checkJs = readCheckJs();
|
|
21
|
+
const experimentalDecorators = readExperimentalDecorators();
|
|
22
|
+
const strictNullChecks = readImplicitStrictNullChecks();
|
|
23
|
+
const strictFunctionTypes = readImplicitStrictFunctionTypes();
|
|
24
|
+
const options = Object.assign(Object.assign({}, inferredProjectCompilerOptions('typescript')), { allowJs: true, allowSyntheticDefaultImports: true, allowNonTsExtensions: true, resolveJsonModule: true, jsx: ts.JsxEmit.Preserve });
|
|
25
|
+
return options;
|
|
26
|
+
function readCheckJs() {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
return (_b = (_a = implicitProjectConfig_1['checkJs']) !== null && _a !== void 0 ? _a : implicitProjectConfig_2['checkJs']) !== null && _b !== void 0 ? _b : false;
|
|
29
|
+
}
|
|
30
|
+
function readExperimentalDecorators() {
|
|
31
|
+
var _a, _b;
|
|
32
|
+
return (_b = (_a = implicitProjectConfig_1['experimentalDecorators']) !== null && _a !== void 0 ? _a : implicitProjectConfig_2['experimentalDecorators']) !== null && _b !== void 0 ? _b : false;
|
|
33
|
+
}
|
|
34
|
+
function readImplicitStrictNullChecks() {
|
|
35
|
+
var _a;
|
|
36
|
+
return (_a = implicitProjectConfig_1['strictNullChecks']) !== null && _a !== void 0 ? _a : false;
|
|
37
|
+
}
|
|
38
|
+
function readImplicitStrictFunctionTypes() {
|
|
39
|
+
var _a;
|
|
40
|
+
return (_a = implicitProjectConfig_1['strictFunctionTypes']) !== null && _a !== void 0 ? _a : true;
|
|
41
|
+
}
|
|
42
|
+
function inferredProjectCompilerOptions(projectType) {
|
|
43
|
+
const projectConfig = {
|
|
44
|
+
module: ts.ModuleKind.CommonJS,
|
|
45
|
+
target: ts.ScriptTarget.ES2020,
|
|
46
|
+
jsx: ts.JsxEmit.Preserve,
|
|
47
|
+
};
|
|
48
|
+
if (checkJs) {
|
|
49
|
+
projectConfig.checkJs = true;
|
|
50
|
+
if (projectType === 'typescript') {
|
|
51
|
+
projectConfig.allowJs = true;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (experimentalDecorators) {
|
|
55
|
+
projectConfig.experimentalDecorators = true;
|
|
56
|
+
}
|
|
57
|
+
if (strictNullChecks) {
|
|
58
|
+
projectConfig.strictNullChecks = true;
|
|
59
|
+
}
|
|
60
|
+
if (strictFunctionTypes) {
|
|
61
|
+
projectConfig.strictFunctionTypes = true;
|
|
62
|
+
}
|
|
63
|
+
if (projectType === 'typescript') {
|
|
64
|
+
projectConfig.sourceMap = true;
|
|
65
|
+
}
|
|
66
|
+
return projectConfig;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
exports.getInferredCompilerOptions = getInferredCompilerOptions;
|
|
71
|
+
//# sourceMappingURL=inferredCompilerOptions.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.IterableWeakSet = void 0;
|
|
3
|
+
class IterableWeakSet extends Set {
|
|
4
|
+
constructor() {
|
|
5
|
+
super(...arguments);
|
|
6
|
+
this.adds = new WeakSet();
|
|
7
|
+
}
|
|
8
|
+
add(el) {
|
|
9
|
+
if (!this.adds.has(el)) {
|
|
10
|
+
this.adds.add(el);
|
|
11
|
+
super.add(new WeakRef(el));
|
|
12
|
+
}
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
forEach(fn) {
|
|
16
|
+
super.forEach(ref => {
|
|
17
|
+
const value = ref.deref();
|
|
18
|
+
if (value)
|
|
19
|
+
fn(value, value, this);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
get size() {
|
|
23
|
+
let _size = 0;
|
|
24
|
+
super.forEach(ref => {
|
|
25
|
+
const value = ref.deref();
|
|
26
|
+
if (value)
|
|
27
|
+
_size++;
|
|
28
|
+
});
|
|
29
|
+
return _size;
|
|
30
|
+
}
|
|
31
|
+
*[Symbol.iterator]() {
|
|
32
|
+
for (const ref of super.values()) {
|
|
33
|
+
const value = ref.deref();
|
|
34
|
+
if (value)
|
|
35
|
+
yield value;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.IterableWeakSet = IterableWeakSet;
|
|
40
|
+
//# sourceMappingURL=iterableWeakSet.js.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.createNodeFileSystemHost = void 0;
|
|
12
|
+
const vscode = require("vscode-languageserver");
|
|
13
|
+
const iterableWeakSet_1 = require("./iterableWeakSet");
|
|
14
|
+
let currentCwd = '';
|
|
15
|
+
function createNodeFileSystemHost(ts, capabilities) {
|
|
16
|
+
const onDidChangeWatchedFilesCb = new Set();
|
|
17
|
+
const caches = new iterableWeakSet_1.IterableWeakSet();
|
|
18
|
+
return {
|
|
19
|
+
ready(connection) {
|
|
20
|
+
connection.onDidChangeWatchedFiles((params) => __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
if (params.changes.some(change => change.type === vscode.FileChangeType.Created || change.type === vscode.FileChangeType.Deleted)) {
|
|
22
|
+
caches.forEach(cache => {
|
|
23
|
+
cache.clear();
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
for (const cb of [...onDidChangeWatchedFilesCb]) {
|
|
27
|
+
if (onDidChangeWatchedFilesCb.has(cb)) {
|
|
28
|
+
yield cb(params, 'lsp');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}));
|
|
32
|
+
},
|
|
33
|
+
clearCache() {
|
|
34
|
+
caches.forEach(cache => {
|
|
35
|
+
cache.clear();
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
getWorkspaceFileSystem(rootUri) {
|
|
39
|
+
var _a;
|
|
40
|
+
const workspaceSys = new Proxy(ts.sys, {
|
|
41
|
+
get(target, prop) {
|
|
42
|
+
const fn = target[prop];
|
|
43
|
+
if (typeof fn === 'function') {
|
|
44
|
+
return new Proxy(fn, {
|
|
45
|
+
apply(target, thisArg, args) {
|
|
46
|
+
if (currentCwd !== rootUri.fsPath) {
|
|
47
|
+
process.chdir(rootUri.fsPath);
|
|
48
|
+
currentCwd = rootUri.fsPath;
|
|
49
|
+
}
|
|
50
|
+
return target.apply(thisArg, args);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return fn;
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
const fileExistsCache = new Map();
|
|
58
|
+
const directoryExistsCache = new Map();
|
|
59
|
+
const sysWithCache = {
|
|
60
|
+
fileExists(path) {
|
|
61
|
+
if (!fileExistsCache.has(path)) {
|
|
62
|
+
fileExistsCache.set(path, ts.sys.fileExists(path));
|
|
63
|
+
}
|
|
64
|
+
return fileExistsCache.get(path);
|
|
65
|
+
},
|
|
66
|
+
directoryExists(path) {
|
|
67
|
+
if (!directoryExistsCache.has(path)) {
|
|
68
|
+
directoryExistsCache.set(path, ts.sys.directoryExists(path));
|
|
69
|
+
}
|
|
70
|
+
return directoryExistsCache.get(path);
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
// don't cache fs result if client did not supports file watcher
|
|
74
|
+
const sys = ((_a = capabilities.workspace) === null || _a === void 0 ? void 0 : _a.didChangeWatchedFiles)
|
|
75
|
+
? new Proxy(workspaceSys, {
|
|
76
|
+
get(target, prop) {
|
|
77
|
+
if (prop in sysWithCache) {
|
|
78
|
+
return sysWithCache[prop];
|
|
79
|
+
}
|
|
80
|
+
return target[prop];
|
|
81
|
+
},
|
|
82
|
+
})
|
|
83
|
+
: workspaceSys;
|
|
84
|
+
caches.add(fileExistsCache);
|
|
85
|
+
caches.add(directoryExistsCache);
|
|
86
|
+
return sys;
|
|
87
|
+
},
|
|
88
|
+
onDidChangeWatchedFiles: cb => {
|
|
89
|
+
onDidChangeWatchedFilesCb.add(cb);
|
|
90
|
+
return () => onDidChangeWatchedFilesCb.delete(cb);
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
exports.createNodeFileSystemHost = createNodeFileSystemHost;
|
|
95
|
+
//# sourceMappingURL=nodeFileSystemHost.js.map
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as embeddedLS from '@volar/language-service';
|
|
2
|
+
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
3
|
+
import * as vscode from 'vscode-languageserver';
|
|
4
|
+
import { URI } from 'vscode-uri';
|
|
5
|
+
import { FileSystem, FileSystemHost, LanguageServerPlugin, RuntimeEnvironment, ServerInitializationOptions } from '../types';
|
|
6
|
+
import { createSnapshots } from './snapshots';
|
|
7
|
+
import { ConfigurationHost } from '@volar/vue-language-service';
|
|
8
|
+
export interface Project extends ReturnType<typeof createProject> {
|
|
9
|
+
}
|
|
10
|
+
export declare function createProject(runtimeEnv: RuntimeEnvironment, plugins: ReturnType<LanguageServerPlugin>[], fsHost: FileSystemHost, sys: FileSystem, ts: typeof import('typescript/lib/tsserverlibrary'), options: ServerInitializationOptions, rootUri: URI, rootPath: string, tsConfig: string | ts.CompilerOptions, tsLocalized: ts.MapLike<string> | undefined, documents: ReturnType<typeof createSnapshots>, connection: vscode.Connection, configHost: ConfigurationHost | undefined): Promise<{
|
|
11
|
+
getLanguageService: () => {
|
|
12
|
+
doValidation: (uri: string, response?: ((result: vscode.Diagnostic[]) => void) | undefined, cancellationToken?: vscode.CancellationToken | undefined) => Promise<vscode.Diagnostic[]>;
|
|
13
|
+
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
14
|
+
findFileReferences: (uri: string) => embeddedLS.NullableResult<vscode.Location[]>;
|
|
15
|
+
findDefinition: (uri: string, position: vscode.Position) => Promise<vscode.LocationLink[] | undefined>;
|
|
16
|
+
findTypeDefinition: (uri: string, position: vscode.Position) => Promise<vscode.LocationLink[] | undefined>;
|
|
17
|
+
findImplementations: (uri: string, position: vscode.Position) => Promise<vscode.LocationLink[] | undefined>;
|
|
18
|
+
prepareRename: (uri: string, position: vscode.Position) => Promise<NonNullable<vscode.Range | vscode.ResponseError<void> | null | undefined> | undefined>;
|
|
19
|
+
doRename: (uri: string, position: vscode.Position, newName: string) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
20
|
+
getEditsForFileRename: (oldUri: string, newUri: string) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
21
|
+
getSemanticTokens: (uri: string, range?: vscode.Range | undefined, cancleToken?: vscode.CancellationToken | undefined, reportProgress?: ((tokens: embeddedLS.SemanticToken[]) => void) | undefined) => Promise<embeddedLS.SemanticToken[] | undefined> | undefined;
|
|
22
|
+
doHover: (uri: string, position: vscode.Position) => Promise<vscode.Hover | undefined>;
|
|
23
|
+
doComplete: (uri: string, position: vscode.Position, completionContext?: vscode.CompletionContext | undefined) => Promise<{
|
|
24
|
+
isIncomplete: boolean;
|
|
25
|
+
items: vscode.CompletionItem[];
|
|
26
|
+
}>;
|
|
27
|
+
doCodeActions: (uri: string, range: vscode.Range, codeActionContext: vscode.CodeActionContext) => Promise<vscode.CodeAction[] | undefined>;
|
|
28
|
+
doCodeActionResolve: (item: vscode.CodeAction) => Promise<vscode.CodeAction>;
|
|
29
|
+
doCompletionResolve: (item: vscode.CompletionItem, newPosition?: vscode.Position | undefined) => Promise<vscode.CompletionItem>;
|
|
30
|
+
getSignatureHelp: (uri: string, position: vscode.Position, signatureHelpContext?: vscode.SignatureHelpContext | undefined) => Promise<vscode.SignatureHelp | undefined>;
|
|
31
|
+
doCodeLens: (uri: string) => Promise<vscode.CodeLens[]>;
|
|
32
|
+
doCodeLensResolve: (item: vscode.CodeLens) => Promise<vscode.CodeLens>;
|
|
33
|
+
findDocumentHighlights: (uri: string, position: vscode.Position) => Promise<vscode.DocumentHighlight[] | undefined>;
|
|
34
|
+
findDocumentLinks: (uri: string) => Promise<vscode.DocumentLink[]>;
|
|
35
|
+
findWorkspaceSymbols: (query: string) => Promise<vscode.SymbolInformation[]>;
|
|
36
|
+
doAutoInsert: (uri: string, position: vscode.Position, autoInsertContext: {
|
|
37
|
+
lastChange: {
|
|
38
|
+
range: vscode.Range;
|
|
39
|
+
rangeOffset: number;
|
|
40
|
+
rangeLength: number;
|
|
41
|
+
text: string;
|
|
42
|
+
};
|
|
43
|
+
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
44
|
+
doExecuteCommand: (command: string, args: embeddedLS.ExecutePluginCommandArgs, executeCommandContext: embeddedLS.ExecuteCommandContext) => Promise<void>;
|
|
45
|
+
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
46
|
+
callHierarchy: {
|
|
47
|
+
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
48
|
+
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
49
|
+
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
50
|
+
};
|
|
51
|
+
dispose: () => void;
|
|
52
|
+
context: embeddedLS.LanguageServiceRuntimeContext;
|
|
53
|
+
};
|
|
54
|
+
getLanguageServiceDontCreate: () => {
|
|
55
|
+
doValidation: (uri: string, response?: ((result: vscode.Diagnostic[]) => void) | undefined, cancellationToken?: vscode.CancellationToken | undefined) => Promise<vscode.Diagnostic[]>;
|
|
56
|
+
findReferences: (uri: string, position: vscode.Position) => Promise<vscode.Location[] | undefined>;
|
|
57
|
+
findFileReferences: (uri: string) => embeddedLS.NullableResult<vscode.Location[]>;
|
|
58
|
+
findDefinition: (uri: string, position: vscode.Position) => Promise<vscode.LocationLink[] | undefined>;
|
|
59
|
+
findTypeDefinition: (uri: string, position: vscode.Position) => Promise<vscode.LocationLink[] | undefined>;
|
|
60
|
+
findImplementations: (uri: string, position: vscode.Position) => Promise<vscode.LocationLink[] | undefined>;
|
|
61
|
+
prepareRename: (uri: string, position: vscode.Position) => Promise<NonNullable<vscode.Range | vscode.ResponseError<void> | null | undefined> | undefined>;
|
|
62
|
+
doRename: (uri: string, position: vscode.Position, newName: string) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
63
|
+
getEditsForFileRename: (oldUri: string, newUri: string) => Promise<vscode.WorkspaceEdit | undefined>;
|
|
64
|
+
getSemanticTokens: (uri: string, range?: vscode.Range | undefined, cancleToken?: vscode.CancellationToken | undefined, reportProgress?: ((tokens: embeddedLS.SemanticToken[]) => void) | undefined) => Promise<embeddedLS.SemanticToken[] | undefined> | undefined;
|
|
65
|
+
doHover: (uri: string, position: vscode.Position) => Promise<vscode.Hover | undefined>;
|
|
66
|
+
doComplete: (uri: string, position: vscode.Position, completionContext?: vscode.CompletionContext | undefined) => Promise<{
|
|
67
|
+
isIncomplete: boolean;
|
|
68
|
+
items: vscode.CompletionItem[];
|
|
69
|
+
}>;
|
|
70
|
+
doCodeActions: (uri: string, range: vscode.Range, codeActionContext: vscode.CodeActionContext) => Promise<vscode.CodeAction[] | undefined>;
|
|
71
|
+
doCodeActionResolve: (item: vscode.CodeAction) => Promise<vscode.CodeAction>;
|
|
72
|
+
doCompletionResolve: (item: vscode.CompletionItem, newPosition?: vscode.Position | undefined) => Promise<vscode.CompletionItem>;
|
|
73
|
+
getSignatureHelp: (uri: string, position: vscode.Position, signatureHelpContext?: vscode.SignatureHelpContext | undefined) => Promise<vscode.SignatureHelp | undefined>;
|
|
74
|
+
doCodeLens: (uri: string) => Promise<vscode.CodeLens[]>;
|
|
75
|
+
doCodeLensResolve: (item: vscode.CodeLens) => Promise<vscode.CodeLens>;
|
|
76
|
+
findDocumentHighlights: (uri: string, position: vscode.Position) => Promise<vscode.DocumentHighlight[] | undefined>;
|
|
77
|
+
findDocumentLinks: (uri: string) => Promise<vscode.DocumentLink[]>;
|
|
78
|
+
findWorkspaceSymbols: (query: string) => Promise<vscode.SymbolInformation[]>;
|
|
79
|
+
doAutoInsert: (uri: string, position: vscode.Position, autoInsertContext: {
|
|
80
|
+
lastChange: {
|
|
81
|
+
range: vscode.Range;
|
|
82
|
+
rangeOffset: number;
|
|
83
|
+
rangeLength: number;
|
|
84
|
+
text: string;
|
|
85
|
+
};
|
|
86
|
+
}) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
|
|
87
|
+
doExecuteCommand: (command: string, args: embeddedLS.ExecutePluginCommandArgs, executeCommandContext: embeddedLS.ExecuteCommandContext) => Promise<void>;
|
|
88
|
+
getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
|
|
89
|
+
callHierarchy: {
|
|
90
|
+
doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
|
|
91
|
+
getIncomingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyIncomingCall[]>;
|
|
92
|
+
getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
|
|
93
|
+
};
|
|
94
|
+
dispose: () => void;
|
|
95
|
+
context: embeddedLS.LanguageServiceRuntimeContext;
|
|
96
|
+
} | undefined;
|
|
97
|
+
getParsedCommandLine: () => ts.ParsedCommandLine;
|
|
98
|
+
dispose: () => void;
|
|
99
|
+
}>;
|