@volar/language-server 1.2.0-alpha.8 → 1.2.0-alpha.9

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.
@@ -78,7 +78,7 @@ function register(connection, projects) {
78
78
  const rootVirtualFile = (_q = (_p = project.project) === null || _p === void 0 ? void 0 : _p.getLanguageService().context.core.virtualFiles.getSource(shared.uriToFileName(document.uri))) === null || _q === void 0 ? void 0 : _q.root;
79
79
  if (rootVirtualFile) {
80
80
  (0, language_core_1.forEachEmbeddedFile)(rootVirtualFile, e => {
81
- if (e.snapshot.getLength() && e.kind === language_core_1.FileKind.TypeScriptHostFile) {
81
+ if (e.snapshot.getLength() && e.kind === language_core_1.FileKind.TypeScriptHostFile && e.capabilities.diagnostic) {
82
82
  fileNames.push(e.fileName);
83
83
  }
84
84
  });
@@ -114,19 +114,16 @@ function register(connection, projects, initParams, cancelHost, semanticTokensLe
114
114
  var _a;
115
115
  return (_a = yield (lastCodeLensLs === null || lastCodeLensLs === void 0 ? void 0 : lastCodeLensLs.doCodeLensResolve(codeLens))) !== null && _a !== void 0 ? _a : codeLens;
116
116
  }));
117
- connection.onExecuteCommand((params, token, workDoneProgress) => __awaiter(this, void 0, void 0, function* () {
118
- if (params.command === embedded.executePluginCommand) {
117
+ connection.onExecuteCommand((params) => __awaiter(this, void 0, void 0, function* () {
118
+ if (params.command === embedded.showReferencesCommand
119
+ && params.arguments) {
119
120
  const args = params.arguments;
120
- if (!args) {
121
- return;
122
- }
123
- return worker(args[0], token, service => {
124
- return service.doExecuteCommand(params.command, args, {
125
- token,
126
- workDoneProgress,
127
- applyEdit: (paramOrEdit) => connection.workspace.applyEdit(paramOrEdit),
128
- showReferences: (params) => connection.sendNotification(protocol_1.ShowReferencesNotification.type, params),
129
- });
121
+ yield connection.sendNotification(protocol_1.ShowReferencesNotification.type, {
122
+ textDocument: {
123
+ uri: args[0],
124
+ },
125
+ position: args[1],
126
+ references: args[2],
130
127
  });
131
128
  }
132
129
  }));
@@ -98,7 +98,6 @@ export declare function createProject(context: ProjectContext): Promise<{
98
98
  text: string;
99
99
  };
100
100
  }) => Promise<NonNullable<string | embeddedLS.TextEdit | null | undefined> | undefined>;
101
- doExecuteCommand: (command: string, args: embeddedLS.ExecutePluginCommandArgs, executeCommandContext: embeddedLS.ExecuteCommandContext) => Promise<void>;
102
101
  getInlayHints: (uri: string, range: embeddedLS.Range) => Promise<embeddedLS.InlayHint[] | undefined>;
103
102
  callHierarchy: {
104
103
  doPrepare(uri: string, position: embeddedLS.Position): Promise<embeddedLS.CallHierarchyItem[] | undefined>;
@@ -106,7 +105,7 @@ export declare function createProject(context: ProjectContext): Promise<{
106
105
  getOutgoingCalls(item: embeddedLS.CallHierarchyItem): Promise<embeddedLS.CallHierarchyOutgoingCall[]>;
107
106
  };
108
107
  dispose: () => void | undefined;
109
- context: embeddedLS.LanguageServiceRuntimeContext<embedded.LanguageServiceHost>;
108
+ context: embeddedLS.LanguageServicePluginContext;
110
109
  };
111
110
  getLanguageServiceDontCreate: () => {
112
111
  format: (uri: string, options: embeddedLS.FormattingOptions, range?: embeddedLS.Range | undefined, onTypeParams?: {
@@ -148,7 +147,6 @@ export declare function createProject(context: ProjectContext): Promise<{
148
147
  text: string;
149
148
  };
150
149
  }) => Promise<NonNullable<string | embeddedLS.TextEdit | null | undefined> | undefined>;
151
- doExecuteCommand: (command: string, args: embeddedLS.ExecutePluginCommandArgs, executeCommandContext: embeddedLS.ExecuteCommandContext) => Promise<void>;
152
150
  getInlayHints: (uri: string, range: embeddedLS.Range) => Promise<embeddedLS.InlayHint[] | undefined>;
153
151
  callHierarchy: {
154
152
  doPrepare(uri: string, position: embeddedLS.Position): Promise<embeddedLS.CallHierarchyItem[] | undefined>;
@@ -156,7 +154,7 @@ export declare function createProject(context: ProjectContext): Promise<{
156
154
  getOutgoingCalls(item: embeddedLS.CallHierarchyItem): Promise<embeddedLS.CallHierarchyOutgoingCall[]>;
157
155
  };
158
156
  dispose: () => void | undefined;
159
- context: embeddedLS.LanguageServiceRuntimeContext<embedded.LanguageServiceHost>;
157
+ context: embeddedLS.LanguageServicePluginContext;
160
158
  } | undefined;
161
159
  getParsedCommandLine: () => ts.ParsedCommandLine;
162
160
  tryAddFile: (fileName: string) => void;
@@ -62,12 +62,12 @@ function createProject(context) {
62
62
  dispose,
63
63
  };
64
64
  function getLanguageService() {
65
- var _a, _b, _c, _d;
65
+ var _a, _b, _c, _d, _e, _f;
66
66
  if (!languageService) {
67
67
  const config = {
68
68
  languages: Object.assign({}, (_a = context.serverConfig) === null || _a === void 0 ? void 0 : _a.languages),
69
69
  plugins: Object.assign({}, (_b = context.serverConfig) === null || _b === void 0 ? void 0 : _b.plugins),
70
- rules: Object.assign({}, (_c = context.serverConfig) === null || _c === void 0 ? void 0 : _c.rules),
70
+ 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) }),
71
71
  };
72
72
  const env = {
73
73
  rootUri: context.rootUri,
@@ -91,7 +91,7 @@ function createProject(context) {
91
91
  host: languageServiceHost,
92
92
  };
93
93
  for (const plugin of context.workspace.workspaces.plugins) {
94
- (_d = plugin.resolveConfig) === null || _d === void 0 ? void 0 : _d.call(plugin, config, lsCtx);
94
+ (_f = plugin.resolveConfig) === null || _f === void 0 ? void 0 : _f.call(plugin, config, lsCtx);
95
95
  }
96
96
  languageService = embeddedLS.createLanguageService(languageServiceHost, config, env, context.documentRegistry);
97
97
  }
@@ -4,7 +4,7 @@ const embedded = require("@volar/language-service");
4
4
  const types_1 = require("../../types");
5
5
  const vscode = require("vscode-languageserver");
6
6
  function setupCapabilities(params, server, initOptions, plugins, semanticTokensLegend) {
7
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
7
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
8
8
  // Syntactic
9
9
  if (!initOptions.respectClientCapabilities || ((_a = params.textDocument) === null || _a === void 0 ? void 0 : _a.selectionRange)) {
10
10
  server.selectionRangeProvider = true;
@@ -85,17 +85,17 @@ function setupCapabilities(params, server, initOptions, plugins, semanticTokensL
85
85
  server.codeLensProvider = {
86
86
  resolveProvider: true,
87
87
  };
88
- server.executeCommandProvider = { commands: [...(_y = (_x = server.executeCommandProvider) === null || _x === void 0 ? void 0 : _x.commands) !== null && _y !== void 0 ? _y : []] };
89
- server.executeCommandProvider.commands.push(embedded.executePluginCommand);
88
+ (_x = server.executeCommandProvider) !== null && _x !== void 0 ? _x : (server.executeCommandProvider = { commands: [] });
89
+ server.executeCommandProvider.commands.push(embedded.showReferencesCommand);
90
90
  }
91
- if (!initOptions.respectClientCapabilities || ((_z = params.textDocument) === null || _z === void 0 ? void 0 : _z.semanticTokens)) {
91
+ if (!initOptions.respectClientCapabilities || ((_y = params.textDocument) === null || _y === void 0 ? void 0 : _y.semanticTokens)) {
92
92
  server.semanticTokensProvider = {
93
93
  range: true,
94
94
  full: false,
95
95
  legend: semanticTokensLegend,
96
96
  };
97
97
  }
98
- if (!initOptions.respectClientCapabilities || ((_0 = params.textDocument) === null || _0 === void 0 ? void 0 : _0.codeAction)) {
98
+ if (!initOptions.respectClientCapabilities || ((_z = params.textDocument) === null || _z === void 0 ? void 0 : _z.codeAction)) {
99
99
  server.codeActionProvider = {
100
100
  codeActionKinds: [
101
101
  vscode.CodeActionKind.Empty,
@@ -111,10 +111,10 @@ function setupCapabilities(params, server, initOptions, plugins, semanticTokensL
111
111
  resolveProvider: true,
112
112
  };
113
113
  }
114
- if (!initOptions.respectClientCapabilities || ((_1 = params.textDocument) === null || _1 === void 0 ? void 0 : _1.inlayHint)) {
114
+ if (!initOptions.respectClientCapabilities || ((_0 = params.textDocument) === null || _0 === void 0 ? void 0 : _0.inlayHint)) {
115
115
  server.inlayHintProvider = true;
116
116
  }
117
- if ((!initOptions.respectClientCapabilities || ((_2 = params.textDocument) === null || _2 === void 0 ? void 0 : _2.diagnostic)) && ((_3 = initOptions.diagnosticModel) !== null && _3 !== void 0 ? _3 : types_1.DiagnosticModel.Push) === types_1.DiagnosticModel.Pull) {
117
+ if ((!initOptions.respectClientCapabilities || ((_1 = params.textDocument) === null || _1 === void 0 ? void 0 : _1.diagnostic)) && ((_2 = initOptions.diagnosticModel) !== null && _2 !== void 0 ? _2 : types_1.DiagnosticModel.Push) === types_1.DiagnosticModel.Pull) {
118
118
  const selector = plugins.map(plugin => { var _a; return (_a = plugin.diagnosticDocumentSelector) !== null && _a !== void 0 ? _a : []; }).flat();
119
119
  if (selector) {
120
120
  server.diagnosticProvider = {
@@ -125,7 +125,7 @@ function setupCapabilities(params, server, initOptions, plugins, semanticTokensL
125
125
  }
126
126
  }
127
127
  // cross file features
128
- if (!initOptions.respectClientCapabilities || ((_4 = params.workspace) === null || _4 === void 0 ? void 0 : _4.fileOperations)) {
128
+ if (!initOptions.respectClientCapabilities || ((_3 = params.workspace) === null || _3 === void 0 ? void 0 : _3.fileOperations)) {
129
129
  const exts = plugins.map(plugin => plugin.extensions.fileRenameOperationFilter).flat();
130
130
  if (exts.length) {
131
131
  server.workspace = {
@@ -143,7 +143,7 @@ function setupCapabilities(params, server, initOptions, plugins, semanticTokensL
143
143
  };
144
144
  }
145
145
  }
146
- if (!initOptions.respectClientCapabilities || ((_5 = params.workspace) === null || _5 === void 0 ? void 0 : _5.symbol)) {
146
+ if (!initOptions.respectClientCapabilities || ((_4 = params.workspace) === null || _4 === void 0 ? void 0 : _4.symbol)) {
147
147
  server.workspaceSymbolProvider = true;
148
148
  }
149
149
  }
@@ -96,7 +96,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
96
96
  text: string;
97
97
  };
98
98
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
99
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
100
99
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
101
100
  callHierarchy: {
102
101
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -104,7 +103,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
104
103
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
105
104
  };
106
105
  dispose: () => void | undefined;
107
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
106
+ context: import("@volar/language-service").LanguageServicePluginContext;
108
107
  };
109
108
  getLanguageServiceDontCreate: () => {
110
109
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -146,7 +145,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
146
145
  text: string;
147
146
  };
148
147
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
149
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
150
148
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
151
149
  callHierarchy: {
152
150
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -154,7 +152,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
154
152
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
155
153
  };
156
154
  dispose: () => void | undefined;
157
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
155
+ context: import("@volar/language-service").LanguageServicePluginContext;
158
156
  } | undefined;
159
157
  getParsedCommandLine: () => ts.ParsedCommandLine;
160
158
  tryAddFile: (fileName: string) => void;
@@ -246,7 +244,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
246
244
  text: string;
247
245
  };
248
246
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
249
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
250
247
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
251
248
  callHierarchy: {
252
249
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -254,7 +251,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
254
251
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
255
252
  };
256
253
  dispose: () => void | undefined;
257
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
254
+ context: import("@volar/language-service").LanguageServicePluginContext;
258
255
  };
259
256
  getLanguageServiceDontCreate: () => {
260
257
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -296,7 +293,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
296
293
  text: string;
297
294
  };
298
295
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
299
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
300
296
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
301
297
  callHierarchy: {
302
298
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -304,7 +300,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
304
300
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
305
301
  };
306
302
  dispose: () => void | undefined;
307
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
303
+ context: import("@volar/language-service").LanguageServicePluginContext;
308
304
  } | undefined;
309
305
  getParsedCommandLine: () => ts.ParsedCommandLine;
310
306
  tryAddFile: (fileName: string) => void;
@@ -396,7 +392,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
396
392
  text: string;
397
393
  };
398
394
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
399
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
400
395
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
401
396
  callHierarchy: {
402
397
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -404,7 +399,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
404
399
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
405
400
  };
406
401
  dispose: () => void | undefined;
407
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
402
+ context: import("@volar/language-service").LanguageServicePluginContext;
408
403
  };
409
404
  getLanguageServiceDontCreate: () => {
410
405
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -446,7 +441,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
446
441
  text: string;
447
442
  };
448
443
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
449
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
450
444
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
451
445
  callHierarchy: {
452
446
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -454,7 +448,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
454
448
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
455
449
  };
456
450
  dispose: () => void | undefined;
457
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
451
+ context: import("@volar/language-service").LanguageServicePluginContext;
458
452
  } | undefined;
459
453
  getParsedCommandLine: () => ts.ParsedCommandLine;
460
454
  tryAddFile: (fileName: string) => void;
@@ -546,7 +540,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
546
540
  text: string;
547
541
  };
548
542
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
549
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
550
543
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
551
544
  callHierarchy: {
552
545
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -554,7 +547,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
554
547
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
555
548
  };
556
549
  dispose: () => void | undefined;
557
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
550
+ context: import("@volar/language-service").LanguageServicePluginContext;
558
551
  };
559
552
  getLanguageServiceDontCreate: () => {
560
553
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -596,7 +589,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
596
589
  text: string;
597
590
  };
598
591
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
599
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
600
592
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
601
593
  callHierarchy: {
602
594
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -604,7 +596,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
604
596
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
605
597
  };
606
598
  dispose: () => void | undefined;
607
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
599
+ context: import("@volar/language-service").LanguageServicePluginContext;
608
600
  } | undefined;
609
601
  getParsedCommandLine: () => ts.ParsedCommandLine;
610
602
  tryAddFile: (fileName: string) => void;
@@ -695,7 +687,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
695
687
  text: string;
696
688
  };
697
689
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
698
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
699
690
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
700
691
  callHierarchy: {
701
692
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -703,7 +694,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
703
694
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
704
695
  };
705
696
  dispose: () => void | undefined;
706
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
697
+ context: import("@volar/language-service").LanguageServicePluginContext;
707
698
  };
708
699
  getLanguageServiceDontCreate: () => {
709
700
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -745,7 +736,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
745
736
  text: string;
746
737
  };
747
738
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
748
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
749
739
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
750
740
  callHierarchy: {
751
741
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -753,7 +743,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
753
743
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
754
744
  };
755
745
  dispose: () => void | undefined;
756
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
746
+ context: import("@volar/language-service").LanguageServicePluginContext;
757
747
  } | undefined;
758
748
  getParsedCommandLine: () => ts.ParsedCommandLine;
759
749
  tryAddFile: (fileName: string) => void;
@@ -844,7 +834,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
844
834
  text: string;
845
835
  };
846
836
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
847
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
848
837
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
849
838
  callHierarchy: {
850
839
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -852,7 +841,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
852
841
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
853
842
  };
854
843
  dispose: () => void | undefined;
855
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
844
+ context: import("@volar/language-service").LanguageServicePluginContext;
856
845
  };
857
846
  getLanguageServiceDontCreate: () => {
858
847
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -894,7 +883,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
894
883
  text: string;
895
884
  };
896
885
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
897
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
898
886
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
899
887
  callHierarchy: {
900
888
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -902,7 +890,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
902
890
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
903
891
  };
904
892
  dispose: () => void | undefined;
905
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
893
+ context: import("@volar/language-service").LanguageServicePluginContext;
906
894
  } | undefined;
907
895
  getParsedCommandLine: () => ts.ParsedCommandLine;
908
896
  tryAddFile: (fileName: string) => void;
@@ -997,7 +985,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
997
985
  text: string;
998
986
  };
999
987
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1000
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1001
988
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1002
989
  callHierarchy: {
1003
990
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1005,7 +992,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1005
992
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1006
993
  };
1007
994
  dispose: () => void | undefined;
1008
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
995
+ context: import("@volar/language-service").LanguageServicePluginContext;
1009
996
  };
1010
997
  getLanguageServiceDontCreate: () => {
1011
998
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -1047,7 +1034,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1047
1034
  text: string;
1048
1035
  };
1049
1036
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1050
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1051
1037
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1052
1038
  callHierarchy: {
1053
1039
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1055,7 +1041,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1055
1041
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1056
1042
  };
1057
1043
  dispose: () => void | undefined;
1058
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
1044
+ context: import("@volar/language-service").LanguageServicePluginContext;
1059
1045
  } | undefined;
1060
1046
  getParsedCommandLine: () => ts.ParsedCommandLine;
1061
1047
  tryAddFile: (fileName: string) => void;
@@ -1147,7 +1133,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1147
1133
  text: string;
1148
1134
  };
1149
1135
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1150
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1151
1136
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1152
1137
  callHierarchy: {
1153
1138
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1155,7 +1140,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1155
1140
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1156
1141
  };
1157
1142
  dispose: () => void | undefined;
1158
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
1143
+ context: import("@volar/language-service").LanguageServicePluginContext;
1159
1144
  };
1160
1145
  getLanguageServiceDontCreate: () => {
1161
1146
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -1197,7 +1182,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1197
1182
  text: string;
1198
1183
  };
1199
1184
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1200
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1201
1185
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1202
1186
  callHierarchy: {
1203
1187
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1205,7 +1189,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1205
1189
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1206
1190
  };
1207
1191
  dispose: () => void | undefined;
1208
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
1192
+ context: import("@volar/language-service").LanguageServicePluginContext;
1209
1193
  } | undefined;
1210
1194
  getParsedCommandLine: () => ts.ParsedCommandLine;
1211
1195
  tryAddFile: (fileName: string) => void;
@@ -1296,7 +1280,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1296
1280
  text: string;
1297
1281
  };
1298
1282
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1299
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1300
1283
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1301
1284
  callHierarchy: {
1302
1285
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1304,7 +1287,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1304
1287
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1305
1288
  };
1306
1289
  dispose: () => void | undefined;
1307
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
1290
+ context: import("@volar/language-service").LanguageServicePluginContext;
1308
1291
  };
1309
1292
  getLanguageServiceDontCreate: () => {
1310
1293
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -1346,7 +1329,6 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1346
1329
  text: string;
1347
1330
  };
1348
1331
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1349
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1350
1332
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1351
1333
  callHierarchy: {
1352
1334
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1354,7 +1336,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
1354
1336
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1355
1337
  };
1356
1338
  dispose: () => void | undefined;
1357
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-core").LanguageServiceHost>;
1339
+ context: import("@volar/language-service").LanguageServicePluginContext;
1358
1340
  } | undefined;
1359
1341
  getParsedCommandLine: () => ts.ParsedCommandLine;
1360
1342
  tryAddFile: (fileName: string) => void;
@@ -110,7 +110,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
110
110
  text: string;
111
111
  };
112
112
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
113
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
114
113
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
115
114
  callHierarchy: {
116
115
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -118,7 +117,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
118
117
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
119
118
  };
120
119
  dispose: () => void | undefined;
121
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
120
+ context: import("@volar/language-service").LanguageServicePluginContext;
122
121
  };
123
122
  getLanguageServiceDontCreate: () => {
124
123
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -160,7 +159,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
160
159
  text: string;
161
160
  };
162
161
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
163
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
164
162
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
165
163
  callHierarchy: {
166
164
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -168,7 +166,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
168
166
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
169
167
  };
170
168
  dispose: () => void | undefined;
171
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
169
+ context: import("@volar/language-service").LanguageServicePluginContext;
172
170
  } | undefined;
173
171
  getParsedCommandLine: () => ts.ParsedCommandLine;
174
172
  tryAddFile: (fileName: string) => void;
@@ -260,7 +258,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
260
258
  text: string;
261
259
  };
262
260
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
263
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
264
261
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
265
262
  callHierarchy: {
266
263
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -268,7 +265,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
268
265
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
269
266
  };
270
267
  dispose: () => void | undefined;
271
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
268
+ context: import("@volar/language-service").LanguageServicePluginContext;
272
269
  };
273
270
  getLanguageServiceDontCreate: () => {
274
271
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -310,7 +307,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
310
307
  text: string;
311
308
  };
312
309
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
313
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
314
310
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
315
311
  callHierarchy: {
316
312
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -318,7 +314,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
318
314
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
319
315
  };
320
316
  dispose: () => void | undefined;
321
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
317
+ context: import("@volar/language-service").LanguageServicePluginContext;
322
318
  } | undefined;
323
319
  getParsedCommandLine: () => ts.ParsedCommandLine;
324
320
  tryAddFile: (fileName: string) => void;
@@ -410,7 +406,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
410
406
  text: string;
411
407
  };
412
408
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
413
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
414
409
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
415
410
  callHierarchy: {
416
411
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -418,7 +413,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
418
413
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
419
414
  };
420
415
  dispose: () => void | undefined;
421
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
416
+ context: import("@volar/language-service").LanguageServicePluginContext;
422
417
  };
423
418
  getLanguageServiceDontCreate: () => {
424
419
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -460,7 +455,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
460
455
  text: string;
461
456
  };
462
457
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
463
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
464
458
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
465
459
  callHierarchy: {
466
460
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -468,7 +462,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
468
462
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
469
463
  };
470
464
  dispose: () => void | undefined;
471
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
465
+ context: import("@volar/language-service").LanguageServicePluginContext;
472
466
  } | undefined;
473
467
  getParsedCommandLine: () => ts.ParsedCommandLine;
474
468
  tryAddFile: (fileName: string) => void;
@@ -560,7 +554,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
560
554
  text: string;
561
555
  };
562
556
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
563
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
564
557
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
565
558
  callHierarchy: {
566
559
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -568,7 +561,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
568
561
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
569
562
  };
570
563
  dispose: () => void | undefined;
571
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
564
+ context: import("@volar/language-service").LanguageServicePluginContext;
572
565
  };
573
566
  getLanguageServiceDontCreate: () => {
574
567
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -610,7 +603,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
610
603
  text: string;
611
604
  };
612
605
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
613
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
614
606
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
615
607
  callHierarchy: {
616
608
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -618,7 +610,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
618
610
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
619
611
  };
620
612
  dispose: () => void | undefined;
621
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
613
+ context: import("@volar/language-service").LanguageServicePluginContext;
622
614
  } | undefined;
623
615
  getParsedCommandLine: () => ts.ParsedCommandLine;
624
616
  tryAddFile: (fileName: string) => void;
@@ -709,7 +701,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
709
701
  text: string;
710
702
  };
711
703
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
712
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
713
704
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
714
705
  callHierarchy: {
715
706
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -717,7 +708,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
717
708
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
718
709
  };
719
710
  dispose: () => void | undefined;
720
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
711
+ context: import("@volar/language-service").LanguageServicePluginContext;
721
712
  };
722
713
  getLanguageServiceDontCreate: () => {
723
714
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -759,7 +750,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
759
750
  text: string;
760
751
  };
761
752
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
762
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
763
753
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
764
754
  callHierarchy: {
765
755
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -767,7 +757,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
767
757
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
768
758
  };
769
759
  dispose: () => void | undefined;
770
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
760
+ context: import("@volar/language-service").LanguageServicePluginContext;
771
761
  } | undefined;
772
762
  getParsedCommandLine: () => ts.ParsedCommandLine;
773
763
  tryAddFile: (fileName: string) => void;
@@ -858,7 +848,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
858
848
  text: string;
859
849
  };
860
850
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
861
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
862
851
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
863
852
  callHierarchy: {
864
853
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -866,7 +855,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
866
855
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
867
856
  };
868
857
  dispose: () => void | undefined;
869
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
858
+ context: import("@volar/language-service").LanguageServicePluginContext;
870
859
  };
871
860
  getLanguageServiceDontCreate: () => {
872
861
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -908,7 +897,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
908
897
  text: string;
909
898
  };
910
899
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
911
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
912
900
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
913
901
  callHierarchy: {
914
902
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -916,7 +904,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
916
904
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
917
905
  };
918
906
  dispose: () => void | undefined;
919
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
907
+ context: import("@volar/language-service").LanguageServicePluginContext;
920
908
  } | undefined;
921
909
  getParsedCommandLine: () => ts.ParsedCommandLine;
922
910
  tryAddFile: (fileName: string) => void;
@@ -1011,7 +999,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1011
999
  text: string;
1012
1000
  };
1013
1001
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1014
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1015
1002
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1016
1003
  callHierarchy: {
1017
1004
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1019,7 +1006,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1019
1006
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1020
1007
  };
1021
1008
  dispose: () => void | undefined;
1022
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
1009
+ context: import("@volar/language-service").LanguageServicePluginContext;
1023
1010
  };
1024
1011
  getLanguageServiceDontCreate: () => {
1025
1012
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -1061,7 +1048,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1061
1048
  text: string;
1062
1049
  };
1063
1050
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1064
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1065
1051
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1066
1052
  callHierarchy: {
1067
1053
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1069,7 +1055,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1069
1055
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1070
1056
  };
1071
1057
  dispose: () => void | undefined;
1072
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
1058
+ context: import("@volar/language-service").LanguageServicePluginContext;
1073
1059
  } | undefined;
1074
1060
  getParsedCommandLine: () => ts.ParsedCommandLine;
1075
1061
  tryAddFile: (fileName: string) => void;
@@ -1161,7 +1147,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1161
1147
  text: string;
1162
1148
  };
1163
1149
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1164
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1165
1150
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1166
1151
  callHierarchy: {
1167
1152
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1169,7 +1154,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1169
1154
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1170
1155
  };
1171
1156
  dispose: () => void | undefined;
1172
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
1157
+ context: import("@volar/language-service").LanguageServicePluginContext;
1173
1158
  };
1174
1159
  getLanguageServiceDontCreate: () => {
1175
1160
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -1211,7 +1196,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1211
1196
  text: string;
1212
1197
  };
1213
1198
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1214
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1215
1199
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1216
1200
  callHierarchy: {
1217
1201
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1219,7 +1203,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1219
1203
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1220
1204
  };
1221
1205
  dispose: () => void | undefined;
1222
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
1206
+ context: import("@volar/language-service").LanguageServicePluginContext;
1223
1207
  } | undefined;
1224
1208
  getParsedCommandLine: () => ts.ParsedCommandLine;
1225
1209
  tryAddFile: (fileName: string) => void;
@@ -1310,7 +1294,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1310
1294
  text: string;
1311
1295
  };
1312
1296
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1313
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1314
1297
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1315
1298
  callHierarchy: {
1316
1299
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1318,7 +1301,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1318
1301
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1319
1302
  };
1320
1303
  dispose: () => void | undefined;
1321
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
1304
+ context: import("@volar/language-service").LanguageServicePluginContext;
1322
1305
  };
1323
1306
  getLanguageServiceDontCreate: () => {
1324
1307
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -1360,7 +1343,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1360
1343
  text: string;
1361
1344
  };
1362
1345
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1363
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1364
1346
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1365
1347
  callHierarchy: {
1366
1348
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1368,7 +1350,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1368
1350
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1369
1351
  };
1370
1352
  dispose: () => void | undefined;
1371
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
1353
+ context: import("@volar/language-service").LanguageServicePluginContext;
1372
1354
  } | undefined;
1373
1355
  getParsedCommandLine: () => ts.ParsedCommandLine;
1374
1356
  tryAddFile: (fileName: string) => void;
@@ -1464,7 +1446,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1464
1446
  text: string;
1465
1447
  };
1466
1448
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1467
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1468
1449
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1469
1450
  callHierarchy: {
1470
1451
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1472,7 +1453,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1472
1453
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1473
1454
  };
1474
1455
  dispose: () => void | undefined;
1475
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
1456
+ context: import("@volar/language-service").LanguageServicePluginContext;
1476
1457
  };
1477
1458
  getLanguageServiceDontCreate: () => {
1478
1459
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -1514,7 +1495,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1514
1495
  text: string;
1515
1496
  };
1516
1497
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1517
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1518
1498
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1519
1499
  callHierarchy: {
1520
1500
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1522,7 +1502,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1522
1502
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1523
1503
  };
1524
1504
  dispose: () => void | undefined;
1525
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
1505
+ context: import("@volar/language-service").LanguageServicePluginContext;
1526
1506
  } | undefined;
1527
1507
  getParsedCommandLine: () => ts.ParsedCommandLine;
1528
1508
  tryAddFile: (fileName: string) => void;
@@ -1615,7 +1595,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1615
1595
  text: string;
1616
1596
  };
1617
1597
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1618
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1619
1598
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1620
1599
  callHierarchy: {
1621
1600
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1623,7 +1602,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1623
1602
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1624
1603
  };
1625
1604
  dispose: () => void | undefined;
1626
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
1605
+ context: import("@volar/language-service").LanguageServicePluginContext;
1627
1606
  };
1628
1607
  getLanguageServiceDontCreate: () => {
1629
1608
  format: (uri: string, options: vscode.FormattingOptions, range?: vscode.Range | undefined, onTypeParams?: {
@@ -1665,7 +1644,6 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1665
1644
  text: string;
1666
1645
  };
1667
1646
  }) => Promise<NonNullable<string | vscode.TextEdit | null | undefined> | undefined>;
1668
- doExecuteCommand: (command: string, args: import("@volar/language-service").ExecutePluginCommandArgs, executeCommandContext: import("@volar/language-service").ExecuteCommandContext) => Promise<void>;
1669
1647
  getInlayHints: (uri: string, range: vscode.Range) => Promise<vscode.InlayHint[] | undefined>;
1670
1648
  callHierarchy: {
1671
1649
  doPrepare(uri: string, position: vscode.Position): Promise<vscode.CallHierarchyItem[] | undefined>;
@@ -1673,7 +1651,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
1673
1651
  getOutgoingCalls(item: vscode.CallHierarchyItem): Promise<vscode.CallHierarchyOutgoingCall[]>;
1674
1652
  };
1675
1653
  dispose: () => void | undefined;
1676
- context: import("@volar/language-service").LanguageServiceRuntimeContext<import("@volar/language-service").LanguageServiceHost>;
1654
+ context: import("@volar/language-service").LanguageServicePluginContext;
1677
1655
  } | undefined;
1678
1656
  getParsedCommandLine: () => ts.ParsedCommandLine;
1679
1657
  tryAddFile: (fileName: string) => void;
@@ -130,18 +130,9 @@ function createWorkspaces(context) {
130
130
  return;
131
131
  const languageService = project.getLanguageService();
132
132
  const errors = yield languageService.doValidation(uri, cancel, result => {
133
- context.server.connection.sendDiagnostics({ uri: uri, diagnostics: result.map(addVersion), version });
133
+ context.server.connection.sendDiagnostics({ uri: uri, diagnostics: result, version });
134
134
  });
135
- context.server.connection.sendDiagnostics({ uri: uri, diagnostics: errors.map(addVersion), version });
136
- function addVersion(error) {
137
- if (error.data === undefined) {
138
- error.data = { version };
139
- }
140
- else if (typeof error.data === 'object') {
141
- error.data.version = version;
142
- }
143
- return error;
144
- }
135
+ context.server.connection.sendDiagnostics({ uri: uri, diagnostics: errors, version });
145
136
  });
146
137
  }
147
138
  function getProjectAndTsConfig(uri) {
package/out/types.d.ts CHANGED
@@ -5,7 +5,7 @@ import type { FileSystemProvider } from 'vscode-html-languageservice';
5
5
  import type * as ts from 'typescript/lib/tsserverlibrary';
6
6
  import * as vscode from 'vscode-languageserver';
7
7
  import { URI } from 'vscode-uri';
8
- import { Config, LanguageServiceRuntimeContext } from '@volar/language-service';
8
+ import { Config, LanguageServicePluginContext } from '@volar/language-service';
9
9
  import { ProjectContext } from './common/project';
10
10
  export type FileSystemHost = {
11
11
  ready(connection: vscode.Connection): void;
@@ -29,7 +29,7 @@ export interface RuntimeEnvironment {
29
29
  }
30
30
  export interface LanguageServiceContext {
31
31
  project: ProjectContext;
32
- env: LanguageServiceRuntimeContext['env'];
32
+ env: LanguageServicePluginContext['env'];
33
33
  host: embedded.LanguageServiceHost;
34
34
  sys: FileSystem;
35
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/language-server",
3
- "version": "1.2.0-alpha.8",
3
+ "version": "1.2.0-alpha.9",
4
4
  "main": "out/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -17,9 +17,9 @@
17
17
  "directory": "packages/language-server"
18
18
  },
19
19
  "dependencies": {
20
- "@volar/language-core": "1.2.0-alpha.8",
21
- "@volar/language-service": "1.2.0-alpha.8",
22
- "@volar/shared": "1.2.0-alpha.8",
20
+ "@volar/language-core": "1.2.0-alpha.9",
21
+ "@volar/language-service": "1.2.0-alpha.9",
22
+ "@volar/shared": "1.2.0-alpha.9",
23
23
  "@vscode/l10n": "^0.0.10",
24
24
  "request-light": "^0.6.0",
25
25
  "typesafe-path": "^0.2.2",
@@ -29,5 +29,5 @@
29
29
  "vscode-languageserver-textdocument": "^1.0.8",
30
30
  "vscode-uri": "^3.0.7"
31
31
  },
32
- "gitHead": "9437b4560f35d2a153a9e2ae0dd0f64285bbb3b3"
32
+ "gitHead": "ac8ebe9dd13bb6881769afb8612d3a9489ba7799"
33
33
  }