@volar/language-server 1.3.0-alpha.2 → 1.4.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.
@@ -38,7 +38,7 @@ function createConnection() {
38
38
  }
39
39
  exports.createConnection = createConnection;
40
40
  function startLanguageServer(connection, ...plugins) {
41
- (0, server_1.startCommonLanguageServer)(connection, options => {
41
+ (0, server_1.startCommonLanguageServer)(connection, (options) => {
42
42
  return {
43
43
  plugins,
44
44
  connection,
@@ -4,3 +4,4 @@ import type { Workspaces } from '../workspaces';
4
4
  import { RuntimeEnvironment, LanguageServerInitializationOptions } from '../../types';
5
5
  import { createDocuments } from '../documents';
6
6
  export declare function register(connection: vscode.Connection, projects: Workspaces, initParams: vscode.InitializeParams, initOptions: LanguageServerInitializationOptions, cancelHost: CancellationTokenHost, semanticTokensLegend: vscode.SemanticTokensLegend, runtime: RuntimeEnvironment, documents: ReturnType<typeof createDocuments>): void;
7
+ export declare function sleep(ms: number): Promise<unknown>;
@@ -8,11 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.register = void 0;
11
+ exports.sleep = exports.register = void 0;
12
12
  const embedded = require("@volar/language-service");
13
13
  const vscode = require("vscode-languageserver");
14
14
  const protocol_1 = require("../../protocol");
15
- const shared = require("@volar/shared");
15
+ const types_1 = require("../../types");
16
16
  function register(connection, projects, initParams, initOptions, cancelHost, semanticTokensLegend, runtime, documents) {
17
17
  let lastCompleteUri;
18
18
  let lastCompleteLs;
@@ -21,47 +21,47 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
21
21
  let lastCallHierarchyLs;
22
22
  connection.onDocumentFormatting((params, token) => __awaiter(this, void 0, void 0, function* () {
23
23
  return worker(params.textDocument.uri, token, service => {
24
- return service.format(params.textDocument.uri, params.options);
24
+ return service.format(params.textDocument.uri, params.options, undefined, undefined, token);
25
25
  });
26
26
  }));
27
27
  connection.onDocumentRangeFormatting((params, token) => __awaiter(this, void 0, void 0, function* () {
28
28
  return worker(params.textDocument.uri, token, service => {
29
- return service.format(params.textDocument.uri, params.options, params.range);
29
+ return service.format(params.textDocument.uri, params.options, params.range, undefined, token);
30
30
  });
31
31
  }));
32
32
  connection.onDocumentOnTypeFormatting((params, token) => __awaiter(this, void 0, void 0, function* () {
33
33
  return worker(params.textDocument.uri, token, service => {
34
- return service.format(params.textDocument.uri, params.options, undefined, params);
34
+ return service.format(params.textDocument.uri, params.options, undefined, params, token);
35
35
  });
36
36
  }));
37
37
  connection.onSelectionRanges((params, token) => __awaiter(this, void 0, void 0, function* () {
38
38
  return worker(params.textDocument.uri, token, service => {
39
- return service.getSelectionRanges(params.textDocument.uri, params.positions);
39
+ return service.getSelectionRanges(params.textDocument.uri, params.positions, token);
40
40
  });
41
41
  }));
42
42
  connection.onFoldingRanges((params, token) => __awaiter(this, void 0, void 0, function* () {
43
43
  return worker(params.textDocument.uri, token, service => {
44
- return service.getFoldingRanges(params.textDocument.uri);
44
+ return service.getFoldingRanges(params.textDocument.uri, token);
45
45
  });
46
46
  }));
47
47
  connection.languages.onLinkedEditingRange((params, token) => __awaiter(this, void 0, void 0, function* () {
48
48
  return worker(params.textDocument.uri, token, service => {
49
- return service.findLinkedEditingRanges(params.textDocument.uri, params.position);
49
+ return service.findLinkedEditingRanges(params.textDocument.uri, params.position, token);
50
50
  });
51
51
  }));
52
52
  connection.onDocumentSymbol((params, token) => __awaiter(this, void 0, void 0, function* () {
53
53
  return worker(params.textDocument.uri, token, service => {
54
- return service.findDocumentSymbols(params.textDocument.uri);
54
+ return service.findDocumentSymbols(params.textDocument.uri, token);
55
55
  });
56
56
  }));
57
57
  connection.onDocumentColor((params, token) => __awaiter(this, void 0, void 0, function* () {
58
58
  return worker(params.textDocument.uri, token, service => {
59
- return service.findDocumentColors(params.textDocument.uri);
59
+ return service.findDocumentColors(params.textDocument.uri, token);
60
60
  });
61
61
  }));
62
62
  connection.onColorPresentation((params, token) => __awaiter(this, void 0, void 0, function* () {
63
63
  return worker(params.textDocument.uri, token, service => {
64
- return service.getColorPresentations(params.textDocument.uri, params.color, params.range);
64
+ return service.getColorPresentations(params.textDocument.uri, params.color, params.range, token);
65
65
  });
66
66
  }));
67
67
  connection.onCompletion((params, token) => __awaiter(this, void 0, void 0, function* () {
@@ -70,7 +70,7 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
70
70
  lastCompleteUri = params.textDocument.uri;
71
71
  lastCompleteLs = service;
72
72
  const document = (_a = documents.data.uriGet(params.textDocument.uri)) === null || _a === void 0 ? void 0 : _a.getDocument();
73
- const list = yield service.doComplete(params.textDocument.uri, params.position, params.context);
73
+ const list = yield service.doComplete(params.textDocument.uri, params.position, params.context, token);
74
74
  for (const item of list.items) {
75
75
  fixTextEdit(item);
76
76
  }
@@ -101,42 +101,42 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
101
101
  return list;
102
102
  }));
103
103
  }));
104
- connection.onCompletionResolve((item) => __awaiter(this, void 0, void 0, function* () {
104
+ connection.onCompletionResolve((item, token) => __awaiter(this, void 0, void 0, function* () {
105
105
  if (lastCompleteUri && lastCompleteLs) {
106
- item = yield lastCompleteLs.doCompletionResolve(item);
106
+ item = yield lastCompleteLs.doCompletionResolve(item, token);
107
107
  fixTextEdit(item);
108
108
  }
109
109
  return item;
110
110
  }));
111
111
  connection.onHover((params, token) => __awaiter(this, void 0, void 0, function* () {
112
112
  return worker(params.textDocument.uri, token, service => {
113
- return service.doHover(params.textDocument.uri, params.position);
113
+ return service.doHover(params.textDocument.uri, params.position, token);
114
114
  });
115
115
  }));
116
116
  connection.onSignatureHelp((params, token) => __awaiter(this, void 0, void 0, function* () {
117
117
  return worker(params.textDocument.uri, token, service => {
118
- return service.getSignatureHelp(params.textDocument.uri, params.position, params.context);
118
+ return service.getSignatureHelp(params.textDocument.uri, params.position, params.context, token);
119
119
  });
120
120
  }));
121
121
  connection.onPrepareRename((params, token) => __awaiter(this, void 0, void 0, function* () {
122
122
  return worker(params.textDocument.uri, token, service => {
123
- return service.prepareRename(params.textDocument.uri, params.position);
123
+ return service.prepareRename(params.textDocument.uri, params.position, token);
124
124
  });
125
125
  }));
126
126
  connection.onRenameRequest((params, token) => __awaiter(this, void 0, void 0, function* () {
127
127
  return worker(params.textDocument.uri, token, service => {
128
- return service.doRename(params.textDocument.uri, params.position, params.newName);
128
+ return service.doRename(params.textDocument.uri, params.position, params.newName, token);
129
129
  });
130
130
  }));
131
131
  connection.onCodeLens((params, token) => __awaiter(this, void 0, void 0, function* () {
132
132
  return worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
133
133
  lastCodeLensLs = service;
134
- return service.doCodeLens(params.textDocument.uri);
134
+ return service.doCodeLens(params.textDocument.uri, token);
135
135
  }));
136
136
  }));
137
- connection.onCodeLensResolve((codeLens) => __awaiter(this, void 0, void 0, function* () {
137
+ connection.onCodeLensResolve((codeLens, token) => __awaiter(this, void 0, void 0, function* () {
138
138
  var _b;
139
- return (_b = yield (lastCodeLensLs === null || lastCodeLensLs === void 0 ? void 0 : lastCodeLensLs.doCodeLensResolve(codeLens))) !== null && _b !== void 0 ? _b : codeLens;
139
+ return (_b = yield (lastCodeLensLs === null || lastCodeLensLs === void 0 ? void 0 : lastCodeLensLs.doCodeLensResolve(codeLens, token))) !== null && _b !== void 0 ? _b : codeLens;
140
140
  }));
141
141
  connection.onExecuteCommand((params) => __awaiter(this, void 0, void 0, function* () {
142
142
  if (params.command === embedded.showReferencesCommand
@@ -155,7 +155,7 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
155
155
  return worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
156
156
  var _c, _d, _e;
157
157
  lastCodeActionLs = service;
158
- let codeActions = (_c = yield service.doCodeActions(params.textDocument.uri, params.range, params.context)) !== null && _c !== void 0 ? _c : [];
158
+ let codeActions = (_c = yield service.doCodeActions(params.textDocument.uri, params.range, params.context, token)) !== null && _c !== void 0 ? _c : [];
159
159
  for (const codeAction of codeActions) {
160
160
  if (codeAction.data && typeof codeAction.data === 'object') {
161
161
  codeAction.data.uri = params.textDocument.uri;
@@ -170,43 +170,43 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
170
170
  return codeActions;
171
171
  }));
172
172
  }));
173
- connection.onCodeActionResolve((codeAction) => __awaiter(this, void 0, void 0, function* () {
173
+ connection.onCodeActionResolve((codeAction, token) => __awaiter(this, void 0, void 0, function* () {
174
174
  var _f;
175
- return (_f = yield lastCodeActionLs.doCodeActionResolve(codeAction)) !== null && _f !== void 0 ? _f : codeAction;
175
+ return (_f = yield lastCodeActionLs.doCodeActionResolve(codeAction, token)) !== null && _f !== void 0 ? _f : codeAction;
176
176
  }));
177
177
  connection.onReferences((params, token) => __awaiter(this, void 0, void 0, function* () {
178
178
  return worker(params.textDocument.uri, token, service => {
179
- return service.findReferences(params.textDocument.uri, params.position);
179
+ return service.findReferences(params.textDocument.uri, params.position, token);
180
180
  });
181
181
  }));
182
182
  connection.onRequest(protocol_1.FindFileReferenceRequest.type, (params, token) => __awaiter(this, void 0, void 0, function* () {
183
183
  return worker(params.textDocument.uri, token, service => {
184
- return service.findFileReferences(params.textDocument.uri);
184
+ return service.findFileReferences(params.textDocument.uri, token);
185
185
  });
186
186
  }));
187
187
  connection.onImplementation((params, token) => __awaiter(this, void 0, void 0, function* () {
188
188
  return worker(params.textDocument.uri, token, service => {
189
- return service.findImplementations(params.textDocument.uri, params.position);
189
+ return service.findImplementations(params.textDocument.uri, params.position, token);
190
190
  });
191
191
  }));
192
192
  connection.onDefinition((params, token) => __awaiter(this, void 0, void 0, function* () {
193
193
  return worker(params.textDocument.uri, token, service => {
194
- return service.findDefinition(params.textDocument.uri, params.position);
194
+ return service.findDefinition(params.textDocument.uri, params.position, token);
195
195
  });
196
196
  }));
197
197
  connection.onTypeDefinition((params, token) => __awaiter(this, void 0, void 0, function* () {
198
198
  return worker(params.textDocument.uri, token, service => {
199
- return service.findTypeDefinition(params.textDocument.uri, params.position);
199
+ return service.findTypeDefinition(params.textDocument.uri, params.position, token);
200
200
  });
201
201
  }));
202
202
  connection.onDocumentHighlight((params, token) => __awaiter(this, void 0, void 0, function* () {
203
203
  return worker(params.textDocument.uri, token, service => {
204
- return service.findDocumentHighlights(params.textDocument.uri, params.position);
204
+ return service.findDocumentHighlights(params.textDocument.uri, params.position, token);
205
205
  });
206
206
  }));
207
207
  connection.onDocumentLinks((params, token) => __awaiter(this, void 0, void 0, function* () {
208
- return worker(params.textDocument.uri, token, service => {
209
- return service.findDocumentLinks(params.textDocument.uri);
208
+ return yield worker(params.textDocument.uri, token, service => {
209
+ return service.findDocumentLinks(params.textDocument.uri, token);
210
210
  });
211
211
  }));
212
212
  connection.onWorkspaceSymbol((params, token) => __awaiter(this, void 0, void 0, function* () {
@@ -219,7 +219,7 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
219
219
  if (token.isCancellationRequested)
220
220
  return;
221
221
  const service = (yield project).getLanguageService();
222
- results = results.concat(yield service.findWorkspaceSymbols(params.query));
222
+ results = results.concat(yield service.findWorkspaceSymbols(params.query, token));
223
223
  }
224
224
  }
225
225
  return results;
@@ -228,39 +228,38 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
228
228
  var _g;
229
229
  return (_g = yield worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
230
230
  lastCallHierarchyLs = service;
231
- return service.callHierarchy.doPrepare(params.textDocument.uri, params.position);
231
+ return service.callHierarchy.doPrepare(params.textDocument.uri, params.position, token);
232
232
  }))) !== null && _g !== void 0 ? _g : [];
233
233
  }));
234
- connection.languages.callHierarchy.onIncomingCalls((params) => __awaiter(this, void 0, void 0, function* () {
234
+ connection.languages.callHierarchy.onIncomingCalls((params, token) => __awaiter(this, void 0, void 0, function* () {
235
235
  var _h;
236
- return (_h = yield (lastCallHierarchyLs === null || lastCallHierarchyLs === void 0 ? void 0 : lastCallHierarchyLs.callHierarchy.getIncomingCalls(params.item))) !== null && _h !== void 0 ? _h : [];
236
+ return (_h = yield (lastCallHierarchyLs === null || lastCallHierarchyLs === void 0 ? void 0 : lastCallHierarchyLs.callHierarchy.getIncomingCalls(params.item, token))) !== null && _h !== void 0 ? _h : [];
237
237
  }));
238
- connection.languages.callHierarchy.onOutgoingCalls((params) => __awaiter(this, void 0, void 0, function* () {
238
+ connection.languages.callHierarchy.onOutgoingCalls((params, token) => __awaiter(this, void 0, void 0, function* () {
239
239
  var _j;
240
- return (_j = yield (lastCallHierarchyLs === null || lastCallHierarchyLs === void 0 ? void 0 : lastCallHierarchyLs.callHierarchy.getOutgoingCalls(params.item))) !== null && _j !== void 0 ? _j : [];
240
+ return (_j = yield (lastCallHierarchyLs === null || lastCallHierarchyLs === void 0 ? void 0 : lastCallHierarchyLs.callHierarchy.getOutgoingCalls(params.item, token))) !== null && _j !== void 0 ? _j : [];
241
241
  }));
242
242
  connection.languages.semanticTokens.on((params, token, _, resultProgress) => __awaiter(this, void 0, void 0, function* () {
243
243
  var _k;
244
- yield shared.sleep(200);
244
+ yield sleep(200);
245
245
  return (_k = yield worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
246
- var _l;
247
- const result = (_l = yield (service === null || service === void 0 ? void 0 : service.getSemanticTokens(params.textDocument.uri, undefined, semanticTokensLegend, token, tokens => resultProgress === null || resultProgress === void 0 ? void 0 : resultProgress.report(buildTokens(tokens))))) !== null && _l !== void 0 ? _l : [];
248
- return buildTokens(result);
249
- }))) !== null && _k !== void 0 ? _k : buildTokens([]);
246
+ return yield (service === null || service === void 0 ? void 0 : service.getSemanticTokens(params.textDocument.uri, undefined, semanticTokensLegend, token, tokens => resultProgress === null || resultProgress === void 0 ? void 0 : resultProgress.report(tokens)));
247
+ }))) !== null && _k !== void 0 ? _k : { data: [] };
250
248
  }));
251
249
  connection.languages.semanticTokens.onRange((params, token, _, resultProgress) => __awaiter(this, void 0, void 0, function* () {
252
- var _m;
253
- yield shared.sleep(200);
254
- return (_m = yield worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
255
- var _o;
256
- const result = (_o = yield (service === null || service === void 0 ? void 0 : service.getSemanticTokens(params.textDocument.uri, params.range, semanticTokensLegend, token, tokens => resultProgress === null || resultProgress === void 0 ? void 0 : resultProgress.report(buildTokens(tokens))))) !== null && _o !== void 0 ? _o : [];
257
- return buildTokens(result);
258
- }))) !== null && _m !== void 0 ? _m : buildTokens([]);
250
+ var _l;
251
+ yield sleep(200);
252
+ return (_l = yield worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
253
+ return yield (service === null || service === void 0 ? void 0 : service.getSemanticTokens(params.textDocument.uri, params.range, semanticTokensLegend, token, tokens => resultProgress === null || resultProgress === void 0 ? void 0 : resultProgress.report(tokens)));
254
+ }))) !== null && _l !== void 0 ? _l : { data: [] };
259
255
  }));
260
256
  connection.languages.diagnostics.on((params, token, _workDoneProgressReporter, resultProgressReporter) => __awaiter(this, void 0, void 0, function* () {
261
257
  const result = yield worker(params.textDocument.uri, token, service => {
262
258
  const tsToken = cancelHost.createCancellationToken(token);
263
- return service.doValidation(params.textDocument.uri, tsToken, errors => {
259
+ const mode = initOptions.serverMode === types_1.ServerMode.PartialSemantic ? 'semantic'
260
+ : initOptions.serverMode === types_1.ServerMode.Syntactic ? 'syntactic'
261
+ : 'all';
262
+ return service.doValidation(params.textDocument.uri, tsToken, mode, errors => {
264
263
  // resultProgressReporter is undefined in vscode
265
264
  resultProgressReporter === null || resultProgressReporter === void 0 ? void 0 : resultProgressReporter.report({
266
265
  relatedDocuments: {
@@ -279,7 +278,7 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
279
278
  }));
280
279
  connection.languages.inlayHint.on((params, token) => __awaiter(this, void 0, void 0, function* () {
281
280
  return worker(params.textDocument.uri, token, (service) => __awaiter(this, void 0, void 0, function* () {
282
- return service.getInlayHints(params.textDocument.uri, params.range);
281
+ return service.getInlayHints(params.textDocument.uri, params.range, token);
283
282
  }));
284
283
  }));
285
284
  // TODO: connection.languages.inlayHint.resolve
@@ -289,13 +288,13 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
289
288
  return null;
290
289
  }
291
290
  const _edits = yield Promise.all(params.files.map((file) => __awaiter(this, void 0, void 0, function* () {
292
- var _p;
293
- return (_p = yield worker(file.oldUri, token, service => {
291
+ var _m;
292
+ return (_m = yield worker(file.oldUri, token, service => {
294
293
  var _a;
295
- return (_a = service.getEditsForFileRename(file.oldUri, file.newUri)) !== null && _a !== void 0 ? _a : null;
296
- })) !== null && _p !== void 0 ? _p : null;
294
+ return (_a = service.getEditsForFileRename(file.oldUri, file.newUri, token)) !== null && _a !== void 0 ? _a : null;
295
+ })) !== null && _m !== void 0 ? _m : null;
297
296
  })));
298
- const edits = _edits.filter(shared.notEmpty);
297
+ const edits = _edits.filter((edit) => !!edit);
299
298
  if (edits.length) {
300
299
  embedded.mergeWorkspaceEdits(edits[0], ...edits.slice(1));
301
300
  return edits[0];
@@ -304,7 +303,7 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
304
303
  }));
305
304
  connection.onRequest(protocol_1.AutoInsertRequest.type, (params, token) => __awaiter(this, void 0, void 0, function* () {
306
305
  return worker(params.textDocument.uri, token, service => {
307
- return service.doAutoInsert(params.textDocument.uri, params.position, params.options);
306
+ return service.doAutoInsert(params.textDocument.uri, params.position, params.options, token);
308
307
  });
309
308
  }));
310
309
  function worker(uri, token, cb) {
@@ -335,14 +334,6 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
335
334
  }));
336
335
  });
337
336
  }
338
- function buildTokens(tokens) {
339
- const builder = new vscode.SemanticTokensBuilder();
340
- const sortedTokens = tokens.sort((a, b) => a[0] - b[0] === 0 ? a[1] - b[1] : a[0] - b[0]);
341
- for (const token of sortedTokens) {
342
- builder.push(...token);
343
- }
344
- return builder.build();
345
- }
346
337
  function getLanguageService(uri) {
347
338
  var _a;
348
339
  return __awaiter(this, void 0, void 0, function* () {
@@ -361,4 +352,8 @@ function register(connection, projects, initParams, initOptions, cancelHost, sem
361
352
  }
362
353
  }
363
354
  exports.register = register;
355
+ function sleep(ms) {
356
+ return new Promise(resolve => setTimeout(resolve, ms));
357
+ }
358
+ exports.sleep = sleep;
364
359
  //# sourceMappingURL=languageFeatures.js.map
@@ -1,6 +1,5 @@
1
1
  import * as embedded from '@volar/language-core';
2
2
  import * as embeddedLS from '@volar/language-service';
3
- import { Config } from '@volar/language-service';
4
3
  import * as path from 'typesafe-path';
5
4
  import type * as ts from 'typescript/lib/tsserverlibrary';
6
5
  import { URI } from 'vscode-uri';
@@ -10,11 +9,10 @@ export interface ProjectContext {
10
9
  rootUri: URI;
11
10
  tsConfig: path.PosixPath | ts.CompilerOptions;
12
11
  documentRegistry: ts.DocumentRegistry | undefined;
13
- serverConfig: Config | undefined;
14
12
  }
15
13
  export type Project = ReturnType<typeof createProject>;
16
14
  export declare function createProject(context: ProjectContext): Promise<{
17
- tsConfig: path.PosixPath | ts.CompilerOptions;
15
+ tsConfig: ts.CompilerOptions | path.PosixPath;
18
16
  scripts: {
19
17
  clear: () => void;
20
18
  values: () => IterableIterator<{
@@ -60,100 +58,92 @@ export declare function createProject(context: ProjectContext): Promise<{
60
58
  languageServiceHost: embedded.LanguageServiceHost;
61
59
  getLanguageService: () => {
62
60
  triggerCharacters: string[];
63
- format: (uri: string, options: embeddedLS.FormattingOptions, range?: embeddedLS.Range | undefined, onTypeParams?: {
61
+ autoFormatTriggerCharacters: string[];
62
+ signatureHelpTriggerCharacters: string[];
63
+ signatureHelpRetriggerCharacters: string[];
64
+ format: (uri: string, options: embeddedLS.FormattingOptions, range: embeddedLS.Range | undefined, onTypeParams: {
64
65
  ch: string;
65
66
  position: embeddedLS.Position;
66
- } | undefined) => Promise<embeddedLS.TextEdit[] | undefined>;
67
- getFoldingRanges: (uri: string) => Promise<embeddedLS.FoldingRange[] | undefined>;
68
- getSelectionRanges: (uri: string, positions: embeddedLS.Position[]) => Promise<embeddedLS.SelectionRange[] | undefined>;
69
- findLinkedEditingRanges: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.LinkedEditingRanges | undefined>;
70
- findDocumentSymbols: (uri: string) => Promise<embeddedLS.DocumentSymbol[] | undefined>;
71
- findDocumentColors: (uri: string) => Promise<embeddedLS.ColorInformation[] | undefined>;
72
- getColorPresentations: (uri: string, color: embeddedLS.Color, range: embeddedLS.Range) => Promise<embeddedLS.ColorPresentation[] | undefined>;
73
- doValidation: (uri: string, token?: embeddedLS.CancellationToken | undefined, response?: ((result: embeddedLS.Diagnostic[]) => void) | undefined) => Promise<embeddedLS.Diagnostic[]>;
74
- findReferences: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.Location[] | undefined>;
75
- findFileReferences: (uri: string) => embeddedLS.NullableResult<embeddedLS.Location[]>;
76
- findDefinition: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.LocationLink[] | undefined>;
77
- findTypeDefinition: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.LocationLink[] | undefined>;
78
- findImplementations: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.LocationLink[] | undefined>;
79
- prepareRename: (uri: string, position: embeddedLS.Position) => Promise<NonNullable<embeddedLS.Range | embeddedLS.ResponseError<void> | null | undefined> | undefined>;
80
- doRename: (uri: string, position: embeddedLS.Position, newName: string) => Promise<embeddedLS.WorkspaceEdit | undefined>;
81
- getEditsForFileRename: (oldUri: string, newUri: string) => Promise<embeddedLS.WorkspaceEdit | undefined>;
82
- getSemanticTokens: (uri: string, range: embeddedLS.Range | undefined, legend: embeddedLS.SemanticTokensLegend, cancelToken: embeddedLS.CancellationToken, reportProgress?: ((tokens: embeddedLS.SemanticToken[]) => void) | undefined) => Promise<embeddedLS.SemanticToken[] | undefined> | undefined;
83
- doHover: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.Hover | undefined>;
84
- doComplete: (uri: string, position: embeddedLS.Position, completionContext?: embeddedLS.CompletionContext | undefined) => Promise<embeddedLS.CompletionList>;
85
- doCodeActions: (uri: string, range: embeddedLS.Range, codeActionContext: embeddedLS.CodeActionContext) => Promise<embeddedLS.CodeAction[] | undefined>;
86
- doCodeActionResolve: (item: embeddedLS.CodeAction) => Promise<embeddedLS.CodeAction>;
87
- doCompletionResolve: (item: embeddedLS.CompletionItem) => Promise<embeddedLS.CompletionItem>;
88
- getSignatureHelp: (uri: string, position: embeddedLS.Position, signatureHelpContext?: embeddedLS.SignatureHelpContext | undefined) => Promise<embeddedLS.SignatureHelp | undefined>;
89
- doCodeLens: (uri: string) => Promise<embeddedLS.CodeLens[]>;
90
- doCodeLensResolve: (item: embeddedLS.CodeLens) => Promise<embeddedLS.CodeLens>;
91
- findDocumentHighlights: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.DocumentHighlight[] | undefined>;
92
- findDocumentLinks: (uri: string) => Promise<embeddedLS.DocumentLink[]>;
93
- findWorkspaceSymbols: (query: string) => Promise<embeddedLS.WorkspaceSymbol[]>;
94
- doAutoInsert: (uri: string, position: embeddedLS.Position, autoInsertContext: {
95
- lastChange: {
96
- range: embeddedLS.Range;
97
- rangeOffset: number;
98
- rangeLength: number;
99
- text: string;
100
- };
101
- }) => Promise<NonNullable<string | embeddedLS.TextEdit | null | undefined> | undefined>;
102
- getInlayHints: (uri: string, range: embeddedLS.Range) => Promise<embeddedLS.InlayHint[] | undefined>;
67
+ } | undefined, token: embeddedLS.CancellationToken) => Promise<embeddedLS.TextEdit[] | undefined>;
68
+ getFoldingRanges: (uri: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.FoldingRange[] | undefined>;
69
+ getSelectionRanges: (uri: string, positions: embeddedLS.Position[], token: embeddedLS.CancellationToken) => Promise<embeddedLS.SelectionRange[] | undefined>;
70
+ findLinkedEditingRanges: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.LinkedEditingRanges | undefined>;
71
+ findDocumentSymbols: (uri: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.DocumentSymbol[] | undefined>;
72
+ findDocumentColors: (uri: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.ColorInformation[] | undefined>;
73
+ getColorPresentations: (uri: string, color: embeddedLS.Color, range: embeddedLS.Range, token: embeddedLS.CancellationToken) => Promise<embeddedLS.ColorPresentation[] | undefined>;
74
+ doValidation: (uri: string, token: embeddedLS.CancellationToken, mode: "all" | "semantic" | "syntactic", response?: ((result: embeddedLS.Diagnostic[]) => void) | undefined) => Promise<embeddedLS.Diagnostic[]>;
75
+ findReferences: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.Location[] | undefined>;
76
+ findFileReferences: (uri: string, token: embeddedLS.CancellationToken) => embeddedLS.NullableResult<embeddedLS.Location[]>;
77
+ findDefinition: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.LocationLink[] | undefined>;
78
+ findTypeDefinition: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.LocationLink[] | undefined>;
79
+ findImplementations: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.LocationLink[] | undefined>;
80
+ prepareRename: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<NonNullable<embeddedLS.Range | embeddedLS.ResponseError<void> | null | undefined> | undefined>;
81
+ doRename: (uri: string, position: embeddedLS.Position, newName: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.WorkspaceEdit | undefined>;
82
+ getEditsForFileRename: (oldUri: string, newUri: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.WorkspaceEdit | undefined>;
83
+ getSemanticTokens: (uri: string, range: embeddedLS.Range | undefined, legend: embeddedLS.SemanticTokensLegend, token: embeddedLS.CancellationToken, reportProgress?: ((tokens: embeddedLS.SemanticTokens) => void) | undefined) => Promise<embeddedLS.SemanticTokens | undefined>;
84
+ doHover: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.Hover | undefined>;
85
+ doComplete: (uri: string, position: embeddedLS.Position, completionContext: embeddedLS.CompletionContext | undefined, token: embeddedLS.CancellationToken) => Promise<embeddedLS.CompletionList>;
86
+ doCodeActions: (uri: string, range: embeddedLS.Range, codeActionContext: embeddedLS.CodeActionContext, token: embeddedLS.CancellationToken) => Promise<embeddedLS.CodeAction[] | undefined>;
87
+ doCodeActionResolve: (item: embeddedLS.CodeAction, token: embeddedLS.CancellationToken) => Promise<embeddedLS.CodeAction>;
88
+ doCompletionResolve: (item: embeddedLS.CompletionItem, token: embeddedLS.CancellationToken) => Promise<embeddedLS.CompletionItem>;
89
+ getSignatureHelp: (uri: string, position: embeddedLS.Position, signatureHelpContext: embeddedLS.SignatureHelpContext | undefined, token: embeddedLS.CancellationToken) => Promise<embeddedLS.SignatureHelp | undefined>;
90
+ doCodeLens: (uri: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.CodeLens[]>;
91
+ doCodeLensResolve: (item: embeddedLS.CodeLens, token: embeddedLS.CancellationToken) => Promise<embeddedLS.CodeLens>;
92
+ findDocumentHighlights: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.DocumentHighlight[] | undefined>;
93
+ findDocumentLinks: (uri: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.DocumentLink[]>;
94
+ findWorkspaceSymbols: (query: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.WorkspaceSymbol[]>;
95
+ doAutoInsert: (uri: string, position: embeddedLS.Position, autoInsertContext: embeddedLS.AutoInsertionContext, token: embeddedLS.CancellationToken) => Promise<NonNullable<string | embeddedLS.TextEdit | null | undefined> | undefined>;
96
+ getInlayHints: (uri: string, range: embeddedLS.Range, token: embeddedLS.CancellationToken) => Promise<embeddedLS.InlayHint[] | undefined>;
103
97
  callHierarchy: {
104
- doPrepare(uri: string, position: embeddedLS.Position): Promise<embeddedLS.CallHierarchyItem[] | undefined>;
105
- getIncomingCalls(item: embeddedLS.CallHierarchyItem): Promise<embeddedLS.CallHierarchyIncomingCall[]>;
106
- getOutgoingCalls(item: embeddedLS.CallHierarchyItem): Promise<embeddedLS.CallHierarchyOutgoingCall[]>;
98
+ doPrepare(uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken): Promise<embeddedLS.CallHierarchyItem[] | undefined>;
99
+ getIncomingCalls(item: embeddedLS.CallHierarchyItem, token: embeddedLS.CancellationToken): Promise<embeddedLS.CallHierarchyIncomingCall[]>;
100
+ getOutgoingCalls(item: embeddedLS.CallHierarchyItem, token: embeddedLS.CancellationToken): Promise<embeddedLS.CallHierarchyOutgoingCall[]>;
107
101
  };
108
102
  dispose: () => void | undefined;
109
103
  context: embeddedLS.LanguageServicePluginContext;
110
104
  };
111
105
  getLanguageServiceDontCreate: () => {
112
106
  triggerCharacters: string[];
113
- format: (uri: string, options: embeddedLS.FormattingOptions, range?: embeddedLS.Range | undefined, onTypeParams?: {
107
+ autoFormatTriggerCharacters: string[];
108
+ signatureHelpTriggerCharacters: string[];
109
+ signatureHelpRetriggerCharacters: string[];
110
+ format: (uri: string, options: embeddedLS.FormattingOptions, range: embeddedLS.Range | undefined, onTypeParams: {
114
111
  ch: string;
115
112
  position: embeddedLS.Position;
116
- } | undefined) => Promise<embeddedLS.TextEdit[] | undefined>;
117
- getFoldingRanges: (uri: string) => Promise<embeddedLS.FoldingRange[] | undefined>;
118
- getSelectionRanges: (uri: string, positions: embeddedLS.Position[]) => Promise<embeddedLS.SelectionRange[] | undefined>;
119
- findLinkedEditingRanges: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.LinkedEditingRanges | undefined>;
120
- findDocumentSymbols: (uri: string) => Promise<embeddedLS.DocumentSymbol[] | undefined>;
121
- findDocumentColors: (uri: string) => Promise<embeddedLS.ColorInformation[] | undefined>;
122
- getColorPresentations: (uri: string, color: embeddedLS.Color, range: embeddedLS.Range) => Promise<embeddedLS.ColorPresentation[] | undefined>;
123
- doValidation: (uri: string, token?: embeddedLS.CancellationToken | undefined, response?: ((result: embeddedLS.Diagnostic[]) => void) | undefined) => Promise<embeddedLS.Diagnostic[]>;
124
- findReferences: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.Location[] | undefined>;
125
- findFileReferences: (uri: string) => embeddedLS.NullableResult<embeddedLS.Location[]>;
126
- findDefinition: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.LocationLink[] | undefined>;
127
- findTypeDefinition: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.LocationLink[] | undefined>;
128
- findImplementations: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.LocationLink[] | undefined>;
129
- prepareRename: (uri: string, position: embeddedLS.Position) => Promise<NonNullable<embeddedLS.Range | embeddedLS.ResponseError<void> | null | undefined> | undefined>;
130
- doRename: (uri: string, position: embeddedLS.Position, newName: string) => Promise<embeddedLS.WorkspaceEdit | undefined>;
131
- getEditsForFileRename: (oldUri: string, newUri: string) => Promise<embeddedLS.WorkspaceEdit | undefined>;
132
- getSemanticTokens: (uri: string, range: embeddedLS.Range | undefined, legend: embeddedLS.SemanticTokensLegend, cancelToken: embeddedLS.CancellationToken, reportProgress?: ((tokens: embeddedLS.SemanticToken[]) => void) | undefined) => Promise<embeddedLS.SemanticToken[] | undefined> | undefined;
133
- doHover: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.Hover | undefined>;
134
- doComplete: (uri: string, position: embeddedLS.Position, completionContext?: embeddedLS.CompletionContext | undefined) => Promise<embeddedLS.CompletionList>;
135
- doCodeActions: (uri: string, range: embeddedLS.Range, codeActionContext: embeddedLS.CodeActionContext) => Promise<embeddedLS.CodeAction[] | undefined>;
136
- doCodeActionResolve: (item: embeddedLS.CodeAction) => Promise<embeddedLS.CodeAction>;
137
- doCompletionResolve: (item: embeddedLS.CompletionItem) => Promise<embeddedLS.CompletionItem>;
138
- getSignatureHelp: (uri: string, position: embeddedLS.Position, signatureHelpContext?: embeddedLS.SignatureHelpContext | undefined) => Promise<embeddedLS.SignatureHelp | undefined>;
139
- doCodeLens: (uri: string) => Promise<embeddedLS.CodeLens[]>;
140
- doCodeLensResolve: (item: embeddedLS.CodeLens) => Promise<embeddedLS.CodeLens>;
141
- findDocumentHighlights: (uri: string, position: embeddedLS.Position) => Promise<embeddedLS.DocumentHighlight[] | undefined>;
142
- findDocumentLinks: (uri: string) => Promise<embeddedLS.DocumentLink[]>;
143
- findWorkspaceSymbols: (query: string) => Promise<embeddedLS.WorkspaceSymbol[]>;
144
- doAutoInsert: (uri: string, position: embeddedLS.Position, autoInsertContext: {
145
- lastChange: {
146
- range: embeddedLS.Range;
147
- rangeOffset: number;
148
- rangeLength: number;
149
- text: string;
150
- };
151
- }) => Promise<NonNullable<string | embeddedLS.TextEdit | null | undefined> | undefined>;
152
- getInlayHints: (uri: string, range: embeddedLS.Range) => Promise<embeddedLS.InlayHint[] | undefined>;
113
+ } | undefined, token: embeddedLS.CancellationToken) => Promise<embeddedLS.TextEdit[] | undefined>;
114
+ getFoldingRanges: (uri: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.FoldingRange[] | undefined>;
115
+ getSelectionRanges: (uri: string, positions: embeddedLS.Position[], token: embeddedLS.CancellationToken) => Promise<embeddedLS.SelectionRange[] | undefined>;
116
+ findLinkedEditingRanges: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.LinkedEditingRanges | undefined>;
117
+ findDocumentSymbols: (uri: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.DocumentSymbol[] | undefined>;
118
+ findDocumentColors: (uri: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.ColorInformation[] | undefined>;
119
+ getColorPresentations: (uri: string, color: embeddedLS.Color, range: embeddedLS.Range, token: embeddedLS.CancellationToken) => Promise<embeddedLS.ColorPresentation[] | undefined>;
120
+ doValidation: (uri: string, token: embeddedLS.CancellationToken, mode: "all" | "semantic" | "syntactic", response?: ((result: embeddedLS.Diagnostic[]) => void) | undefined) => Promise<embeddedLS.Diagnostic[]>;
121
+ findReferences: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.Location[] | undefined>;
122
+ findFileReferences: (uri: string, token: embeddedLS.CancellationToken) => embeddedLS.NullableResult<embeddedLS.Location[]>;
123
+ findDefinition: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.LocationLink[] | undefined>;
124
+ findTypeDefinition: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.LocationLink[] | undefined>;
125
+ findImplementations: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.LocationLink[] | undefined>;
126
+ prepareRename: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<NonNullable<embeddedLS.Range | embeddedLS.ResponseError<void> | null | undefined> | undefined>;
127
+ doRename: (uri: string, position: embeddedLS.Position, newName: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.WorkspaceEdit | undefined>;
128
+ getEditsForFileRename: (oldUri: string, newUri: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.WorkspaceEdit | undefined>;
129
+ getSemanticTokens: (uri: string, range: embeddedLS.Range | undefined, legend: embeddedLS.SemanticTokensLegend, token: embeddedLS.CancellationToken, reportProgress?: ((tokens: embeddedLS.SemanticTokens) => void) | undefined) => Promise<embeddedLS.SemanticTokens | undefined>;
130
+ doHover: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.Hover | undefined>;
131
+ doComplete: (uri: string, position: embeddedLS.Position, completionContext: embeddedLS.CompletionContext | undefined, token: embeddedLS.CancellationToken) => Promise<embeddedLS.CompletionList>;
132
+ doCodeActions: (uri: string, range: embeddedLS.Range, codeActionContext: embeddedLS.CodeActionContext, token: embeddedLS.CancellationToken) => Promise<embeddedLS.CodeAction[] | undefined>;
133
+ doCodeActionResolve: (item: embeddedLS.CodeAction, token: embeddedLS.CancellationToken) => Promise<embeddedLS.CodeAction>;
134
+ doCompletionResolve: (item: embeddedLS.CompletionItem, token: embeddedLS.CancellationToken) => Promise<embeddedLS.CompletionItem>;
135
+ getSignatureHelp: (uri: string, position: embeddedLS.Position, signatureHelpContext: embeddedLS.SignatureHelpContext | undefined, token: embeddedLS.CancellationToken) => Promise<embeddedLS.SignatureHelp | undefined>;
136
+ doCodeLens: (uri: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.CodeLens[]>;
137
+ doCodeLensResolve: (item: embeddedLS.CodeLens, token: embeddedLS.CancellationToken) => Promise<embeddedLS.CodeLens>;
138
+ findDocumentHighlights: (uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken) => Promise<embeddedLS.DocumentHighlight[] | undefined>;
139
+ findDocumentLinks: (uri: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.DocumentLink[]>;
140
+ findWorkspaceSymbols: (query: string, token: embeddedLS.CancellationToken) => Promise<embeddedLS.WorkspaceSymbol[]>;
141
+ doAutoInsert: (uri: string, position: embeddedLS.Position, autoInsertContext: embeddedLS.AutoInsertionContext, token: embeddedLS.CancellationToken) => Promise<NonNullable<string | embeddedLS.TextEdit | null | undefined> | undefined>;
142
+ getInlayHints: (uri: string, range: embeddedLS.Range, token: embeddedLS.CancellationToken) => Promise<embeddedLS.InlayHint[] | undefined>;
153
143
  callHierarchy: {
154
- doPrepare(uri: string, position: embeddedLS.Position): Promise<embeddedLS.CallHierarchyItem[] | undefined>;
155
- getIncomingCalls(item: embeddedLS.CallHierarchyItem): Promise<embeddedLS.CallHierarchyIncomingCall[]>;
156
- getOutgoingCalls(item: embeddedLS.CallHierarchyItem): Promise<embeddedLS.CallHierarchyOutgoingCall[]>;
144
+ doPrepare(uri: string, position: embeddedLS.Position, token: embeddedLS.CancellationToken): Promise<embeddedLS.CallHierarchyItem[] | undefined>;
145
+ getIncomingCalls(item: embeddedLS.CallHierarchyItem, token: embeddedLS.CancellationToken): Promise<embeddedLS.CallHierarchyIncomingCall[]>;
146
+ getOutgoingCalls(item: embeddedLS.CallHierarchyItem, token: embeddedLS.CancellationToken): Promise<embeddedLS.CallHierarchyOutgoingCall[]>;
157
147
  };
158
148
  dispose: () => void | undefined;
159
149
  context: embeddedLS.LanguageServicePluginContext;
@@ -14,6 +14,7 @@ const path = require("typesafe-path");
14
14
  const vscode = require("vscode-languageserver");
15
15
  const vscode_uri_1 = require("vscode-uri");
16
16
  const types_1 = require("../types");
17
+ const serverConfig_1 = require("./utils/serverConfig");
17
18
  const uriMap_1 = require("./utils/uriMap");
18
19
  function createProject(context) {
19
20
  var _a;
@@ -63,29 +64,27 @@ function createProject(context) {
63
64
  dispose,
64
65
  };
65
66
  function getLanguageService() {
66
- var _a, _b, _c, _d, _e, _f;
67
+ var _a;
67
68
  if (!languageService) {
68
- const config = {
69
- languages: Object.assign({}, (_a = context.serverConfig) === null || _a === void 0 ? void 0 : _a.languages),
70
- plugins: Object.assign({}, (_b = context.serverConfig) === null || _b === void 0 ? void 0 : _b.plugins),
71
- lint: Object.assign(Object.assign({}, (_c = context.serverConfig) === null || _c === void 0 ? void 0 : _c.lint), { rules: Object.assign({}, (_e = (_d = context.serverConfig) === null || _d === void 0 ? void 0 : _d.lint) === null || _e === void 0 ? void 0 : _e.rules) }),
72
- };
69
+ let config = (_a = (context.workspace.rootUri.scheme === 'file' ? (0, serverConfig_1.loadConfig)(context.workspace.rootUri.path, context.workspace.workspaces.initOptions.configFilePath) : {})) !== null && _a !== void 0 ? _a : {};
73
70
  const options = {
74
71
  uriToFileName,
75
72
  fileNameToUri,
76
73
  rootUri: context.rootUri,
77
74
  host: languageServiceHost,
78
- config,
75
+ get config() {
76
+ return config;
77
+ },
79
78
  locale: context.workspace.workspaces.initParams.locale,
80
79
  configurationHost: context.workspace.workspaces.configurationHost,
81
80
  fileSystemProvider: context.workspace.workspaces.server.runtimeEnv.fileSystemProvide,
82
81
  documentContext: getDocumentContext(fileNameToUri, uriToFileName, context.workspace.workspaces.ts, languageServiceHost, context.rootUri.toString()),
83
82
  schemaRequestService: (uri) => __awaiter(this, void 0, void 0, function* () {
84
- var _g;
83
+ var _b;
85
84
  const protocol = uri.substring(0, uri.indexOf(':'));
86
85
  const builtInHandler = context.workspace.workspaces.server.runtimeEnv.schemaRequestHandlers[protocol];
87
86
  if (builtInHandler) {
88
- return (_g = yield builtInHandler(uri)) !== null && _g !== void 0 ? _g : '';
87
+ return (_b = yield builtInHandler(uri)) !== null && _b !== void 0 ? _b : '';
89
88
  }
90
89
  return '';
91
90
  }),
@@ -97,7 +96,9 @@ function createProject(context) {
97
96
  host: languageServiceHost,
98
97
  };
99
98
  for (const plugin of context.workspace.workspaces.plugins) {
100
- (_f = plugin.resolveConfig) === null || _f === void 0 ? void 0 : _f.call(plugin, config, lsCtx);
99
+ if (plugin.resolveConfig) {
100
+ config = plugin.resolveConfig(config, { typescript: lsCtx.project.workspace.workspaces.ts }, lsCtx);
101
+ }
101
102
  }
102
103
  languageService = embeddedLS.createLanguageService(options, context.documentRegistry);
103
104
  }
@@ -250,7 +251,7 @@ function createProject(context) {
250
251
  }
251
252
  exports.createProject = createProject;
252
253
  function createParsedCommandLine(ts, sys, rootPath, tsConfig, plugins) {
253
- const extraFileExtensions = plugins.map(plugin => { var _a; return (_a = plugin.tsconfigExtraFileExtensions) !== null && _a !== void 0 ? _a : []; }).flat();
254
+ const extraFileExtensions = plugins.map(plugin => { var _a; return (_a = plugin.extraFileExtensions) !== null && _a !== void 0 ? _a : []; }).flat();
254
255
  if (ts) {
255
256
  try {
256
257
  let content;