@volar/language-server 1.0.14 → 1.0.17

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.
Files changed (64) hide show
  1. package/out/{utils/webFileSystemHost.d.ts → browser/fileSystems.d.ts} +0 -0
  2. package/out/{utils/webFileSystemHost.js → browser/fileSystems.js} +4 -4
  3. package/out/{browser.d.ts → browser/index.d.ts} +2 -2
  4. package/out/{browser.js → browser/index.js} +32 -28
  5. package/out/{utils/ts → browser/typescript}/core.d.ts +0 -0
  6. package/out/{utils/ts → browser/typescript}/core.js +0 -0
  7. package/out/{utils/ts → browser/typescript}/corePublic.d.ts +0 -0
  8. package/out/{utils/ts → browser/typescript}/corePublic.js +0 -0
  9. package/out/{utils/ts → browser/typescript}/path.d.ts +0 -0
  10. package/out/{utils/ts → browser/typescript}/path.js +0 -0
  11. package/out/{utils/ts → browser/typescript}/types.d.ts +0 -0
  12. package/out/{utils/ts → browser/typescript}/types.js +0 -0
  13. package/out/{utils/ts → browser/typescript}/utilities.d.ts +0 -0
  14. package/out/{utils/ts → browser/typescript}/utilities.js +0 -0
  15. package/out/{utils → common}/cancellationPipe.d.ts +0 -0
  16. package/out/{utils → common}/cancellationPipe.js +0 -0
  17. package/out/{utils → common}/configurationHost.d.ts +1 -1
  18. package/out/{utils → common}/configurationHost.js +7 -5
  19. package/out/{utils/snapshots.d.ts → common/documents.d.ts} +1 -1
  20. package/out/{utils/snapshots.js → common/documents.js} +5 -5
  21. package/out/{features → common/features}/customFeatures.d.ts +1 -1
  22. package/out/{features → common/features}/customFeatures.js +20 -42
  23. package/out/common/features/documentFeatures.d.ts +4 -0
  24. package/out/{features → common/features}/documentFeatures.js +1 -1
  25. package/out/common/features/languageFeatures.d.ts +4 -0
  26. package/out/{features → common/features}/languageFeatures.js +4 -5
  27. package/out/{utils → common}/project.d.ts +13 -8
  28. package/out/{utils → common}/project.js +19 -16
  29. package/out/{schemaRequestHandlers → common/schemaRequestHandlers}/file.d.ts +0 -0
  30. package/out/{schemaRequestHandlers → common/schemaRequestHandlers}/file.js +0 -0
  31. package/out/{schemaRequestHandlers → common/schemaRequestHandlers}/http.d.ts +0 -0
  32. package/out/{schemaRequestHandlers → common/schemaRequestHandlers}/http.js +0 -0
  33. package/out/common/server.d.ts +8 -0
  34. package/out/{server.js → common/server.js} +94 -33
  35. package/out/{utils/documentServiceHost.d.ts → common/syntaxServicesHost.d.ts} +2 -2
  36. package/out/{utils/documentServiceHost.js → common/syntaxServicesHost.js} +10 -10
  37. package/out/{utils → common/utils}/inferredCompilerOptions.d.ts +0 -0
  38. package/out/{utils → common/utils}/inferredCompilerOptions.js +0 -0
  39. package/out/{registerFeatures.d.ts → common/utils/registerFeatures.d.ts} +2 -3
  40. package/out/{registerFeatures.js → common/utils/registerFeatures.js} +6 -53
  41. package/out/{utils/config.d.ts → common/utils/serverConfig.d.ts} +0 -0
  42. package/out/{utils/config.js → common/utils/serverConfig.js} +1 -1
  43. package/out/{utils → common/utils}/uriMap.d.ts +0 -0
  44. package/out/{utils → common/utils}/uriMap.js +0 -0
  45. package/out/common/workspace.d.ts +1186 -0
  46. package/out/{utils/workspaceProjects.js → common/workspace.js} +29 -13
  47. package/out/common/workspaces.d.ts +1465 -0
  48. package/out/{utils → common}/workspaces.js +15 -10
  49. package/out/{utils/nodeFileSystemHost.d.ts → node/fileSystem.d.ts} +0 -0
  50. package/out/{utils/nodeFileSystemHost.js → node/fileSystem.js} +17 -19
  51. package/out/{node.d.ts → node/index.d.ts} +2 -2
  52. package/out/node/index.js +107 -0
  53. package/out/protocol.d.ts +4 -6
  54. package/out/protocol.js +1 -5
  55. package/out/types.d.ts +5 -3
  56. package/package.json +7 -7
  57. package/out/features/documentFeatures.d.ts +0 -4
  58. package/out/features/languageFeatures.d.ts +0 -4
  59. package/out/node.js +0 -103
  60. package/out/server.d.ts +0 -3
  61. package/out/utils/iterableWeakSet.d.ts +0 -7
  62. package/out/utils/iterableWeakSet.js +0 -40
  63. package/out/utils/workspaceProjects.d.ts +0 -162
  64. package/out/utils/workspaces.d.ts +0 -429
@@ -11,48 +11,49 @@ Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.createCommonLanguageServer = void 0;
12
12
  const vscode = require("vscode-languageserver");
13
13
  const vscode_uri_1 = require("vscode-uri");
14
- const types_1 = require("./types");
15
- const configurationHost_1 = require("./utils/configurationHost");
16
- const documentServiceHost_1 = require("./utils/documentServiceHost");
17
- const snapshots_1 = require("./utils/snapshots");
18
- const workspaces_1 = require("./utils/workspaces");
19
- const registerFeatures_1 = require("./registerFeatures");
20
- const cancellationPipe_1 = require("./utils/cancellationPipe");
21
- function createCommonLanguageServer(connection, runtimeEnv, _plugins) {
22
- let params;
14
+ const types_1 = require("../types");
15
+ const cancellationPipe_1 = require("./cancellationPipe");
16
+ const configurationHost_1 = require("./configurationHost");
17
+ const documents_1 = require("./documents");
18
+ const syntaxServicesHost_1 = require("./syntaxServicesHost");
19
+ const registerFeatures_1 = require("./utils/registerFeatures");
20
+ const workspaces_1 = require("./workspaces");
21
+ function createCommonLanguageServer(params) {
22
+ const { connection, runtimeEnv, plugins: _plugins } = params;
23
+ let initParams;
23
24
  let options;
24
25
  let roots = [];
25
26
  let fsHost;
26
27
  let projects;
27
28
  let documentServiceHost;
28
- let configHost;
29
+ let configurationHost;
29
30
  let plugins;
30
- const documents = (0, snapshots_1.createSnapshots)(connection);
31
+ const documents = (0, documents_1.createDocuments)(connection);
31
32
  connection.onInitialize((_params) => __awaiter(this, void 0, void 0, function* () {
32
33
  var _a, _b, _c, _d;
33
- params = _params;
34
- options = params.initializationOptions;
34
+ initParams = _params;
35
+ options = initParams.initializationOptions;
35
36
  plugins = _plugins.map(plugin => plugin(options));
36
- if (((_a = params.capabilities.workspace) === null || _a === void 0 ? void 0 : _a.workspaceFolders) && params.workspaceFolders) {
37
- roots = params.workspaceFolders.map(folder => vscode_uri_1.URI.parse(folder.uri));
37
+ if (((_a = initParams.capabilities.workspace) === null || _a === void 0 ? void 0 : _a.workspaceFolders) && initParams.workspaceFolders) {
38
+ roots = initParams.workspaceFolders.map(folder => vscode_uri_1.URI.parse(folder.uri));
38
39
  }
39
- else if (params.rootUri) {
40
- roots = [vscode_uri_1.URI.parse(params.rootUri)];
40
+ else if (initParams.rootUri) {
41
+ roots = [vscode_uri_1.URI.parse(initParams.rootUri)];
41
42
  }
42
- else if (params.rootPath) {
43
- roots = [vscode_uri_1.URI.file(params.rootPath)];
43
+ else if (initParams.rootPath) {
44
+ roots = [vscode_uri_1.URI.file(initParams.rootPath)];
44
45
  }
45
46
  const result = {
46
47
  capabilities: {
47
48
  textDocumentSync: (_b = options.textDocumentSync) !== null && _b !== void 0 ? _b : vscode.TextDocumentSyncKind.Incremental,
48
49
  },
49
50
  };
50
- configHost = ((_c = params.capabilities.workspace) === null || _c === void 0 ? void 0 : _c.configuration) ? (0, configurationHost_1.createConfigurationHost)(params, connection) : undefined;
51
+ configurationHost = ((_c = initParams.capabilities.workspace) === null || _c === void 0 ? void 0 : _c.configuration) ? (0, configurationHost_1.createConfigurationHost)(initParams, connection) : undefined;
51
52
  const serverMode = (_d = options.serverMode) !== null && _d !== void 0 ? _d : types_1.ServerMode.Semantic;
52
- (0, registerFeatures_1.setupSyntacticCapabilities)(params.capabilities, result.capabilities, options);
53
+ (0, registerFeatures_1.setupSyntacticCapabilities)(initParams.capabilities, result.capabilities, options);
53
54
  yield _createDocumentServiceHost();
54
55
  if (serverMode === types_1.ServerMode.Semantic) {
55
- (0, registerFeatures_1.setupSemanticCapabilities)(params.capabilities, result.capabilities, options, plugins);
56
+ (0, registerFeatures_1.setupSemanticCapabilities)(initParams.capabilities, result.capabilities, options, plugins, getSemanticTokensLegend());
56
57
  yield createLanguageServiceHost();
57
58
  }
58
59
  try {
@@ -66,11 +67,11 @@ function createCommonLanguageServer(connection, runtimeEnv, _plugins) {
66
67
  catch (_e) { }
67
68
  return result;
68
69
  }));
69
- connection.onInitialized(() => __awaiter(this, void 0, void 0, function* () {
70
- var _f, _g, _h;
70
+ connection.onInitialized(() => {
71
+ var _a, _b, _c;
71
72
  fsHost === null || fsHost === void 0 ? void 0 : fsHost.ready(connection);
72
- configHost === null || configHost === void 0 ? void 0 : configHost.ready();
73
- if ((_f = params.capabilities.workspace) === null || _f === void 0 ? void 0 : _f.workspaceFolders) {
73
+ configurationHost === null || configurationHost === void 0 ? void 0 : configurationHost.ready();
74
+ if ((_a = initParams.capabilities.workspace) === null || _a === void 0 ? void 0 : _a.workspaceFolders) {
74
75
  connection.workspace.onDidChangeWorkspaceFolders(e => {
75
76
  for (const folder of e.added) {
76
77
  documentServiceHost === null || documentServiceHost === void 0 ? void 0 : documentServiceHost.add(vscode_uri_1.URI.parse(folder.uri));
@@ -84,7 +85,7 @@ function createCommonLanguageServer(connection, runtimeEnv, _plugins) {
84
85
  }
85
86
  if (options.serverMode !== types_1.ServerMode.Syntactic
86
87
  && !options.disableFileWatcher
87
- && ((_h = (_g = params.capabilities.workspace) === null || _g === void 0 ? void 0 : _g.didChangeWatchedFiles) === null || _h === void 0 ? void 0 : _h.dynamicRegistration)) {
88
+ && ((_c = (_b = initParams.capabilities.workspace) === null || _b === void 0 ? void 0 : _b.didChangeWatchedFiles) === null || _c === void 0 ? void 0 : _c.dynamicRegistration)) {
88
89
  connection.client.register(vscode.DidChangeWatchedFilesNotification.type, {
89
90
  watchers: [
90
91
  ...plugins.map(plugin => plugin.extraFileExtensions.map(ext => ({ globPattern: `**/*.${ext.extension}` }))).flat(),
@@ -105,13 +106,13 @@ function createCommonLanguageServer(connection, runtimeEnv, _plugins) {
105
106
  ]
106
107
  });
107
108
  }
108
- }));
109
+ });
109
110
  connection.listen();
110
111
  function _createDocumentServiceHost() {
111
112
  var _a, _b;
112
113
  return __awaiter(this, void 0, void 0, function* () {
113
114
  const ts = runtimeEnv.loadTypescript(options.typescript.tsdk);
114
- documentServiceHost = (0, documentServiceHost_1.createDocumentServiceHost)(runtimeEnv, plugins, ts, configHost, options);
115
+ documentServiceHost = (0, syntaxServicesHost_1.createSyntaxServicesHost)(runtimeEnv, plugins, ts, configurationHost, options);
115
116
  for (const root of roots) {
116
117
  documentServiceHost.add(root);
117
118
  }
@@ -125,16 +126,27 @@ function createCommonLanguageServer(connection, runtimeEnv, _plugins) {
125
126
  var _a, _b;
126
127
  return __awaiter(this, void 0, void 0, function* () {
127
128
  const ts = runtimeEnv.loadTypescript(options.typescript.tsdk);
128
- fsHost = runtimeEnv.createFileSystemHost(ts, params.capabilities);
129
- const tsLocalized = params.locale ? yield runtimeEnv.loadTypescriptLocalized(options.typescript.tsdk, params.locale) : undefined;
129
+ fsHost = runtimeEnv.createFileSystemHost(ts, initParams.capabilities);
130
+ const tsLocalized = initParams.locale ? yield runtimeEnv.loadTypescriptLocalized(options.typescript.tsdk, initParams.locale) : undefined;
130
131
  const cancelTokenHost = (0, cancellationPipe_1.createCancellationTokenHost)(options.cancellationPipeName);
131
- const _projects = (0, workspaces_1.createWorkspaces)(runtimeEnv, plugins, fsHost, configHost, ts, tsLocalized, params.capabilities, options, documents, connection, cancelTokenHost);
132
+ const _projects = (0, workspaces_1.createWorkspaces)({
133
+ server: params,
134
+ fileSystemHost: fsHost,
135
+ configurationHost,
136
+ ts,
137
+ tsLocalized,
138
+ initParams: initParams,
139
+ initOptions: options,
140
+ documents,
141
+ cancelTokenHost,
142
+ plugins,
143
+ });
132
144
  projects = _projects;
133
145
  for (const root of roots) {
134
146
  projects.add(root);
135
147
  }
136
148
  (yield Promise.resolve().then(() => require('./features/customFeatures'))).register(connection, projects);
137
- (yield Promise.resolve().then(() => require('./features/languageFeatures'))).register(connection, projects, params, cancelTokenHost);
149
+ (yield Promise.resolve().then(() => require('./features/languageFeatures'))).register(connection, projects, initParams, cancelTokenHost, getSemanticTokensLegend());
138
150
  for (const plugin of plugins) {
139
151
  (_b = (_a = plugin.semanticService) === null || _a === void 0 ? void 0 : _a.onInitialize) === null || _b === void 0 ? void 0 : _b.call(_a, connection, getLanguageService);
140
152
  }
@@ -147,6 +159,55 @@ function createCommonLanguageServer(connection, runtimeEnv, _plugins) {
147
159
  }
148
160
  });
149
161
  }
162
+ function getSemanticTokensLegend() {
163
+ if (!options.semanticTokensLegend) {
164
+ return standardSemanticTokensLegend;
165
+ }
166
+ return {
167
+ tokenTypes: [...standardSemanticTokensLegend.tokenTypes, ...options.semanticTokensLegend.tokenTypes],
168
+ tokenModifiers: [...standardSemanticTokensLegend.tokenModifiers, ...options.semanticTokensLegend.tokenModifiers],
169
+ };
170
+ }
150
171
  }
151
172
  exports.createCommonLanguageServer = createCommonLanguageServer;
173
+ // https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#standard-token-types-and-modifiers
174
+ const standardSemanticTokensLegend = {
175
+ tokenTypes: [
176
+ 'namespace',
177
+ 'class',
178
+ 'enum',
179
+ 'interface',
180
+ 'struct',
181
+ 'typeParameter',
182
+ 'type',
183
+ 'parameter',
184
+ 'variable',
185
+ 'property',
186
+ 'enumMember',
187
+ 'decorator',
188
+ 'event',
189
+ 'function',
190
+ 'method',
191
+ 'macro',
192
+ 'label',
193
+ 'comment',
194
+ 'string',
195
+ 'keyword',
196
+ 'number',
197
+ 'regexp',
198
+ 'operator',
199
+ ],
200
+ tokenModifiers: [
201
+ 'declaration',
202
+ 'definition',
203
+ 'readonly',
204
+ 'static',
205
+ 'deprecated',
206
+ 'abstract',
207
+ 'async',
208
+ 'modification',
209
+ 'documentation',
210
+ 'defaultLibrary',
211
+ ],
212
+ };
152
213
  //# sourceMappingURL=server.js.map
@@ -1,8 +1,8 @@
1
- import { LanguageServerInitializationOptions, LanguageServerPlugin, RuntimeEnvironment } from '../types';
2
1
  import * as embedded from '@volar/language-service';
3
2
  import { URI } from 'vscode-uri';
3
+ import { LanguageServerInitializationOptions, LanguageServerPlugin, RuntimeEnvironment } from '../types';
4
4
  import type * as _ from 'vscode-languageserver-textdocument';
5
- export declare function createDocumentServiceHost(runtimeEnv: RuntimeEnvironment, plugins: ReturnType<LanguageServerPlugin>[], ts: typeof import('typescript/lib/tsserverlibrary'), configHost: embedded.ConfigurationHost | undefined, initOptions: LanguageServerInitializationOptions): {
5
+ export declare function createSyntaxServicesHost(runtimeEnv: RuntimeEnvironment, plugins: ReturnType<LanguageServerPlugin>[], ts: typeof import('typescript/lib/tsserverlibrary'), configHost: embedded.ConfigurationHost | undefined, initOptions: LanguageServerInitializationOptions): {
6
6
  add: (rootUri: URI) => void;
7
7
  remove: (rootUri: URI) => void;
8
8
  get: (documentUri: string) => {
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.createDocumentServiceHost = void 0;
2
+ exports.createSyntaxServicesHost = void 0;
3
3
  const embedded = require("@volar/language-service");
4
4
  const vscode_uri_1 = require("vscode-uri");
5
- const config_1 = require("./config");
6
- function createDocumentServiceHost(runtimeEnv, plugins, ts, configHost, initOptions) {
7
- const workspaceServices = new Map();
5
+ const serverConfig_1 = require("./utils/serverConfig");
6
+ function createSyntaxServicesHost(runtimeEnv, plugins, ts, configHost, initOptions) {
7
+ const services = new Map();
8
8
  const untitledService = create(vscode_uri_1.URI.from({ scheme: 'untitled' }));
9
9
  return {
10
10
  add,
@@ -12,13 +12,13 @@ function createDocumentServiceHost(runtimeEnv, plugins, ts, configHost, initOpti
12
12
  get,
13
13
  };
14
14
  function add(rootUri) {
15
- workspaceServices.set(rootUri.toString(), create(rootUri));
15
+ services.set(rootUri.toString(), create(rootUri));
16
16
  }
17
17
  function remove(rootUri) {
18
- workspaceServices.delete(rootUri.toString());
18
+ services.delete(rootUri.toString());
19
19
  }
20
20
  function get(documentUri) {
21
- for (const [rootUri, service] of workspaceServices) {
21
+ for (const [rootUri, service] of services) {
22
22
  if (documentUri.startsWith(rootUri)) {
23
23
  return service;
24
24
  }
@@ -39,7 +39,7 @@ function createDocumentServiceHost(runtimeEnv, plugins, ts, configHost, initOpti
39
39
  },
40
40
  getPlugins() {
41
41
  return [
42
- ...(0, config_1.loadCustomPlugins)(rootUri.fsPath, initOptions.configFilePath),
42
+ ...(0, serverConfig_1.loadCustomPlugins)(rootUri.fsPath, initOptions.configFilePath),
43
43
  ...plugins.map(plugin => { var _a, _b, _c; return (_c = (_b = (_a = plugin.syntacticService) === null || _a === void 0 ? void 0 : _a.getServicePlugins) === null || _b === void 0 ? void 0 : _b.call(_a, serviceContext)) !== null && _c !== void 0 ? _c : []; }).flat(),
44
44
  ];
45
45
  },
@@ -47,5 +47,5 @@ function createDocumentServiceHost(runtimeEnv, plugins, ts, configHost, initOpti
47
47
  return embedded.createDocumentService(serviceContext);
48
48
  }
49
49
  }
50
- exports.createDocumentServiceHost = createDocumentServiceHost;
51
- //# sourceMappingURL=documentServiceHost.js.map
50
+ exports.createSyntaxServicesHost = createSyntaxServicesHost;
51
+ //# sourceMappingURL=syntaxServicesHost.js.map
@@ -1,6 +1,5 @@
1
- import { LanguageServerPlugin, LanguageServerInitializationOptions } from './types';
1
+ import { LanguageServerPlugin, LanguageServerInitializationOptions } from '../../types';
2
2
  import * as vscode from 'vscode-languageserver';
3
3
  import { ClientCapabilities } from 'vscode-languageserver';
4
- export declare const semanticTokensLegend: vscode.SemanticTokensLegend;
5
4
  export declare function setupSyntacticCapabilities(params: ClientCapabilities, server: vscode.ServerCapabilities, initOptions: LanguageServerInitializationOptions): void;
6
- export declare function setupSemanticCapabilities(params: ClientCapabilities, server: vscode.ServerCapabilities, initOptions: LanguageServerInitializationOptions, plugins: ReturnType<LanguageServerPlugin>[]): void;
5
+ export declare function setupSemanticCapabilities(params: ClientCapabilities, server: vscode.ServerCapabilities, initOptions: LanguageServerInitializationOptions, plugins: ReturnType<LanguageServerPlugin>[], semanticTokensLegend: vscode.SemanticTokensLegend): void;
@@ -1,48 +1,8 @@
1
1
  Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.setupSemanticCapabilities = exports.setupSyntacticCapabilities = exports.semanticTokensLegend = void 0;
2
+ exports.setupSemanticCapabilities = exports.setupSyntacticCapabilities = void 0;
3
3
  const embedded = require("@volar/language-service");
4
- const types_1 = require("./types");
4
+ const types_1 = require("../../types");
5
5
  const vscode = require("vscode-languageserver");
6
- // https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#standard-token-types-and-modifiers
7
- exports.semanticTokensLegend = {
8
- tokenTypes: [
9
- 'namespace',
10
- 'class',
11
- 'enum',
12
- 'interface',
13
- 'struct',
14
- 'typeParameter',
15
- 'type',
16
- 'parameter',
17
- 'variable',
18
- 'property',
19
- 'enumMember',
20
- 'decorator',
21
- 'event',
22
- 'function',
23
- 'method',
24
- 'macro',
25
- 'label',
26
- 'comment',
27
- 'string',
28
- 'keyword',
29
- 'number',
30
- 'regexp',
31
- 'operator',
32
- ],
33
- tokenModifiers: [
34
- 'declaration',
35
- 'definition',
36
- 'readonly',
37
- 'static',
38
- 'deprecated',
39
- 'abstract',
40
- 'async',
41
- 'modification',
42
- 'documentation',
43
- 'defaultLibrary',
44
- ],
45
- };
46
6
  function setupSyntacticCapabilities(params, server, initOptions) {
47
7
  var _a, _b, _c, _d, _e, _f, _g, _h;
48
8
  if (!initOptions.respectClientCapabilities || ((_a = params.textDocument) === null || _a === void 0 ? void 0 : _a.selectionRange)) {
@@ -70,16 +30,12 @@ function setupSyntacticCapabilities(params, server, initOptions) {
70
30
  // https://github.com/microsoft/vscode/blob/ce119308e8fd4cd3f992d42b297588e7abe33a0c/extensions/typescript-language-features/src/languageFeatures/formatting.ts#L99
71
31
  server.documentOnTypeFormattingProvider = {
72
32
  firstTriggerCharacter: ';',
73
- moreTriggerCharacter: [
74
- '}',
75
- '\n',
76
- '{', // addSpaceBetweenDoubleCurlyBrackets
77
- ],
33
+ moreTriggerCharacter: ['}', '\n'],
78
34
  };
79
35
  }
80
36
  }
81
37
  exports.setupSyntacticCapabilities = setupSyntacticCapabilities;
82
- function setupSemanticCapabilities(params, server, initOptions, plugins) {
38
+ function setupSemanticCapabilities(params, server, initOptions, plugins, semanticTokensLegend) {
83
39
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
84
40
  if (!initOptions.respectClientCapabilities || ((_a = params.textDocument) === null || _a === void 0 ? void 0 : _a.references)) {
85
41
  server.referencesProvider = true;
@@ -166,16 +122,13 @@ function setupSemanticCapabilities(params, server, initOptions, plugins) {
166
122
  resolveProvider: true,
167
123
  };
168
124
  server.executeCommandProvider = { commands: [...(_s = (_r = server.executeCommandProvider) === null || _r === void 0 ? void 0 : _r.commands) !== null && _s !== void 0 ? _s : []] };
169
- // @ts-expect-error
170
- if (!initOptions.__noPluginCommands) {
171
- server.executeCommandProvider.commands.push(embedded.executePluginCommand);
172
- }
125
+ server.executeCommandProvider.commands.push(embedded.executePluginCommand);
173
126
  }
174
127
  if (!initOptions.respectClientCapabilities || ((_t = params.textDocument) === null || _t === void 0 ? void 0 : _t.semanticTokens)) {
175
128
  server.semanticTokensProvider = {
176
129
  range: true,
177
130
  full: false,
178
- legend: exports.semanticTokensLegend,
131
+ legend: semanticTokensLegend,
179
132
  };
180
133
  }
181
134
  if (!initOptions.respectClientCapabilities || ((_u = params.textDocument) === null || _u === void 0 ? void 0 : _u.codeAction)) {
@@ -20,4 +20,4 @@ function loadCustomPlugins(dir, configFile) {
20
20
  return [];
21
21
  }
22
22
  exports.loadCustomPlugins = loadCustomPlugins;
23
- //# sourceMappingURL=config.js.map
23
+ //# sourceMappingURL=serverConfig.js.map
File without changes
File without changes