@codingame/monaco-languageclient-wrapper 9.0.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/createLanguageClient.js +4 -4
- package/dist/customRequests.js +1 -1
- package/dist/extensionConfiguration.js +3 -1
- package/dist/extensions/cobol.js +2 -2
- package/dist/extensions/java/sourceAction.js +1 -1
- package/dist/extensions/java.js +3 -1
- package/dist/extensions/tools.js +42 -14
- package/dist/extensions.js +18 -9
- package/dist/index.d.ts +1 -1
- package/dist/infrastructure.js +10 -9
- package/dist/languageClient.js +11 -13
- package/dist/staticOptions.js +26 -45
- package/package.json +33 -43
- package/stats.html +2230 -2123
|
@@ -37,7 +37,7 @@ class MiddlewareMessageReader {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
listen(callback) {
|
|
40
|
-
return this.delegate.listen(message => {
|
|
40
|
+
return this.delegate.listen((message) => {
|
|
41
41
|
callback(this.middleware(message));
|
|
42
42
|
});
|
|
43
43
|
}
|
|
@@ -56,10 +56,10 @@ class MonacoLanguageClient extends BaseLanguageClient {
|
|
|
56
56
|
}
|
|
57
57
|
function hackTransports(transports) {
|
|
58
58
|
return {
|
|
59
|
-
reader: new MiddlewareMessageReader(transports.reader, message => {
|
|
59
|
+
reader: new MiddlewareMessageReader(transports.reader, (message) => {
|
|
60
60
|
return message;
|
|
61
61
|
}),
|
|
62
|
-
writer: new MiddlewareMessageWriter(transports.writer, message => {
|
|
62
|
+
writer: new MiddlewareMessageWriter(transports.writer, (message) => {
|
|
63
63
|
var _a, _b, _c;
|
|
64
64
|
if (Message.isRequest(message) && message.method === InitializeRequest.type.method) {
|
|
65
65
|
const params = message.params;
|
|
@@ -109,7 +109,7 @@ async function createLanguageClient(id, infrastructure, { documentSelector, sync
|
|
|
109
109
|
try {
|
|
110
110
|
connection.dispose();
|
|
111
111
|
}
|
|
112
|
-
catch
|
|
112
|
+
catch {
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
}
|
package/dist/customRequests.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProtocolRequestType, ProtocolNotificationType } from 'vscode-languageserver-protocol';
|
|
2
2
|
const willShutdownNotificationType = new ProtocolNotificationType('willShutdown');
|
|
3
3
|
const writeFileRequestType = new ProtocolRequestType('file/write');
|
|
4
4
|
const readFileRequestType = new ProtocolRequestType('file/read');
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { registerDefaultConfigurations } from '@codingame/monaco-editor-wrapper';
|
|
2
2
|
async function loadExtensionConfigurations(clientOptions) {
|
|
3
|
-
registerDefaultConfigurations(clientOptions
|
|
3
|
+
registerDefaultConfigurations(clientOptions
|
|
4
|
+
.map((clientOption) => clientOption.defaultConfigurationOverride)
|
|
5
|
+
.filter((v) => v != null));
|
|
4
6
|
}
|
|
5
7
|
export { loadExtensionConfigurations };
|
package/dist/extensions/cobol.js
CHANGED
|
@@ -18,8 +18,8 @@ class CobolResolveSubroutineFeature extends ExtensionFeature {
|
|
|
18
18
|
return contantRoutinePath;
|
|
19
19
|
}
|
|
20
20
|
return (_d = vscode.workspace.textDocuments
|
|
21
|
-
.filter(textDocument => vscode.languages.match(documentSelector, textDocument))
|
|
22
|
-
.filter(document => document.getText().match(new RegExp(`PROGRAM-ID\\.\\W+${routineName}\\.`, 'gi')))
|
|
21
|
+
.filter((textDocument) => vscode.languages.match(documentSelector, textDocument))
|
|
22
|
+
.filter((document) => document.getText().match(new RegExp(`PROGRAM-ID\\.\\W+${routineName}\\.`, 'gi')))
|
|
23
23
|
.sort((a, b) => a.uri.toString().localeCompare(b.uri.toString()))[0]) === null || _d === void 0 ? void 0 : _d.uri.toString();
|
|
24
24
|
}));
|
|
25
25
|
}
|
|
@@ -2,7 +2,7 @@ import { __awaiter } from '../../node_modules/tslib/tslib.es6.js';
|
|
|
2
2
|
import { commands, window, Uri, ViewColumn, workspace, TextEditorRevealType } from 'vscode';
|
|
3
3
|
import { Commands } from './commands.js';
|
|
4
4
|
import { applyWorkspaceEdit } from './extension.js';
|
|
5
|
-
import { ListOverridableMethodsRequest, AddOverridableMethodsRequest, CheckHashCodeEqualsStatusRequest, GenerateHashCodeEqualsRequest, OrganizeImportsRequest, CheckToStringStatusRequest, GenerateToStringRequest,
|
|
5
|
+
import { ListOverridableMethodsRequest, AddOverridableMethodsRequest, CheckHashCodeEqualsStatusRequest, GenerateHashCodeEqualsRequest, OrganizeImportsRequest, CheckToStringStatusRequest, GenerateToStringRequest, CheckConstructorStatusRequest, GenerateConstructorsRequest, CheckDelegateMethodsStatusRequest, GenerateDelegateMethodsRequest, AccessorCodeActionRequest, AccessorKind, GenerateAccessorsRequest } from './protocol.js';
|
|
6
6
|
function registerCommands(languageClient, context) {
|
|
7
7
|
registerOverrideMethodsCommand(languageClient, context);
|
|
8
8
|
registerHashCodeEqualsCommand(languageClient, context);
|
package/dist/extensions/java.js
CHANGED
|
@@ -24,7 +24,9 @@ class JavaExtensionFeature extends ExtensionFeature {
|
|
|
24
24
|
registerCommands(this.languageClient, context);
|
|
25
25
|
context.subscriptions.push(workspace.registerTextDocumentContentProvider('jdt', {
|
|
26
26
|
provideTextDocumentContent: async (uri, token) => {
|
|
27
|
-
return this.languageClient
|
|
27
|
+
return this.languageClient
|
|
28
|
+
.sendRequest(ClassFileContentsRequest.type, { uri: uri.toString() }, token)
|
|
29
|
+
.then((v) => {
|
|
28
30
|
return v !== null && v !== void 0 ? v : '';
|
|
29
31
|
});
|
|
30
32
|
}
|
package/dist/extensions/tools.js
CHANGED
|
@@ -32,20 +32,48 @@ class SimpleExtensionContext {
|
|
|
32
32
|
throw new MultiDisposeError(errors);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
get languageModelAccessInformation() {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
get
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
get
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
get
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
get
|
|
48
|
-
|
|
35
|
+
get languageModelAccessInformation() {
|
|
36
|
+
return unsupported();
|
|
37
|
+
}
|
|
38
|
+
get workspaceState() {
|
|
39
|
+
return unsupported();
|
|
40
|
+
}
|
|
41
|
+
get globalState() {
|
|
42
|
+
return unsupported();
|
|
43
|
+
}
|
|
44
|
+
get secrets() {
|
|
45
|
+
return unsupported();
|
|
46
|
+
}
|
|
47
|
+
get extensionUri() {
|
|
48
|
+
return unsupported();
|
|
49
|
+
}
|
|
50
|
+
get extensionPath() {
|
|
51
|
+
return unsupported();
|
|
52
|
+
}
|
|
53
|
+
get environmentVariableCollection() {
|
|
54
|
+
return unsupported();
|
|
55
|
+
}
|
|
56
|
+
get globalStorageUri() {
|
|
57
|
+
return unsupported();
|
|
58
|
+
}
|
|
59
|
+
get globalStoragePath() {
|
|
60
|
+
return unsupported();
|
|
61
|
+
}
|
|
62
|
+
get logUri() {
|
|
63
|
+
return unsupported();
|
|
64
|
+
}
|
|
65
|
+
get logPath() {
|
|
66
|
+
return unsupported();
|
|
67
|
+
}
|
|
68
|
+
get extensionMode() {
|
|
69
|
+
return unsupported();
|
|
70
|
+
}
|
|
71
|
+
get extension() {
|
|
72
|
+
return unsupported();
|
|
73
|
+
}
|
|
74
|
+
get extensionRuntime() {
|
|
75
|
+
return unsupported();
|
|
76
|
+
}
|
|
49
77
|
}
|
|
50
78
|
class ExtensionFeature {
|
|
51
79
|
constructor() {
|
package/dist/extensions.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { monaco } from '@codingame/monaco-editor-wrapper';
|
|
2
|
-
import { registerFileSystemOverlay, FileSystemProviderError, FileSystemProviderErrorCode, FileType } from '@codingame/monaco-vscode-files-service-override';
|
|
2
|
+
import { registerFileSystemOverlay, FileSystemProviderCapabilities, FileSystemProviderError, FileSystemProviderErrorCode, FileType } from '@codingame/monaco-vscode-files-service-override';
|
|
3
3
|
import { DidSaveTextDocumentNotification } from 'vscode-languageserver-protocol';
|
|
4
4
|
import * as vscode from 'vscode';
|
|
5
|
-
import { DisposableStore } from 'vscode/monaco';
|
|
5
|
+
import { DisposableStore } from '@codingame/monaco-vscode-api/monaco';
|
|
6
6
|
import { willShutdownNotificationType } from './customRequests.js';
|
|
7
7
|
async function bufferToBase64(buffer) {
|
|
8
8
|
const base64url = await new Promise((resolve) => {
|
|
@@ -26,7 +26,8 @@ class InitializeTextDocumentFeature {
|
|
|
26
26
|
fillClientCapabilities() { }
|
|
27
27
|
initialize(capabilities, documentSelector) {
|
|
28
28
|
var _a;
|
|
29
|
-
const textDocumentSyncOptions = capabilities
|
|
29
|
+
const textDocumentSyncOptions = capabilities
|
|
30
|
+
.resolvedTextDocumentSync;
|
|
30
31
|
if (documentSelector == null || ((_a = textDocumentSyncOptions === null || textDocumentSyncOptions === void 0 ? void 0 : textDocumentSyncOptions.openClose) !== null && _a !== void 0 ? _a : false)) {
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
@@ -34,7 +35,9 @@ class InitializeTextDocumentFeature {
|
|
|
34
35
|
const languageClient = this.languageClient;
|
|
35
36
|
async function saveFile(textDocument) {
|
|
36
37
|
var _a;
|
|
37
|
-
if (documentSelector != null &&
|
|
38
|
+
if (documentSelector != null &&
|
|
39
|
+
vscode.languages.match(documentSelector, textDocument) > 0 &&
|
|
40
|
+
textDocument.uri.scheme === 'file') {
|
|
38
41
|
await ((_a = infrastructure.writeFile) === null || _a === void 0 ? void 0 : _a.call(infrastructure, textDocument.uri, btoa(textDocument.getText()), languageClient));
|
|
39
42
|
await languageClient.sendNotification(DidSaveTextDocumentNotification.type, {
|
|
40
43
|
textDocument: {
|
|
@@ -79,7 +82,7 @@ class InfrastructureFileSystemUpdaterProvider {
|
|
|
79
82
|
constructor(infrastructure, languageClientManager) {
|
|
80
83
|
this.infrastructure = infrastructure;
|
|
81
84
|
this.languageClientManager = languageClientManager;
|
|
82
|
-
this.capabilities =
|
|
85
|
+
this.capabilities = FileSystemProviderCapabilities.FileReadWrite | FileSystemProviderCapabilities.PathCaseSensitive;
|
|
83
86
|
this.onDidChangeCapabilities = new vscode.EventEmitter().event;
|
|
84
87
|
this.onDidChangeFile = new vscode.EventEmitter().event;
|
|
85
88
|
this.onDidWatchError = new vscode.EventEmitter().event;
|
|
@@ -116,13 +119,19 @@ class InfrastructureFileSystemProvider {
|
|
|
116
119
|
constructor(infrastructure, languageClientManager) {
|
|
117
120
|
this.infrastructure = infrastructure;
|
|
118
121
|
this.languageClientManager = languageClientManager;
|
|
119
|
-
this.capabilities =
|
|
122
|
+
this.capabilities = FileSystemProviderCapabilities.FileReadWrite |
|
|
123
|
+
FileSystemProviderCapabilities.PathCaseSensitive |
|
|
124
|
+
FileSystemProviderCapabilities.Readonly;
|
|
120
125
|
this.onDidChangeCapabilities = new vscode.EventEmitter().event;
|
|
121
126
|
this.onDidChangeFile = new vscode.EventEmitter().event;
|
|
122
127
|
}
|
|
123
128
|
isBlacklisted(resource) {
|
|
124
|
-
const REMOTE_FILE_BLACKLIST = [
|
|
125
|
-
|
|
129
|
+
const REMOTE_FILE_BLACKLIST = [
|
|
130
|
+
'.git/config',
|
|
131
|
+
'.vscode',
|
|
132
|
+
monaco.Uri.parse(this.infrastructure.rootUri).path
|
|
133
|
+
];
|
|
134
|
+
const blacklisted = REMOTE_FILE_BLACKLIST.some((blacklisted) => resource.path.endsWith(blacklisted));
|
|
126
135
|
return blacklisted;
|
|
127
136
|
}
|
|
128
137
|
async readFile(resource) {
|
|
@@ -181,7 +190,7 @@ class InfrastructureFileSystemProvider {
|
|
|
181
190
|
if (result == null) {
|
|
182
191
|
return [];
|
|
183
192
|
}
|
|
184
|
-
return result.map(file => {
|
|
193
|
+
return result.map((file) => {
|
|
185
194
|
let name = file;
|
|
186
195
|
let type = FileType.File;
|
|
187
196
|
if (file.endsWith('/')) {
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { MessageTransports } from 'vscode-languageclient';
|
|
|
3
3
|
import * as vscode from 'vscode';
|
|
4
4
|
export { WorkspaceFolder } from 'vscode';
|
|
5
5
|
import * as monaco from 'monaco-editor';
|
|
6
|
-
import { Disposable,
|
|
6
|
+
import { Disposable, NotificationType, RequestType, CancellationToken, Emitter, Event, LSPAny } from 'vscode-languageserver-protocol';
|
|
7
7
|
import { StaticFeature, DynamicFeature } from 'vscode-languageclient/lib/common/api';
|
|
8
8
|
|
|
9
9
|
type LanguageClientOptionsById<T extends string> = Record<T, LanguageClientOptions>;
|
package/dist/infrastructure.js
CHANGED
|
@@ -33,11 +33,13 @@ class CodinGameInfrastructure {
|
|
|
33
33
|
this.libraryUrls = libraryUrls;
|
|
34
34
|
this.automaticTextDocumentUpdate = false;
|
|
35
35
|
this.rootUri = 'file:///tmp/project';
|
|
36
|
-
this.workspaceFolders = [
|
|
36
|
+
this.workspaceFolders = [
|
|
37
|
+
{
|
|
37
38
|
uri: monaco.Uri.file('/tmp/project'),
|
|
38
39
|
index: 0,
|
|
39
40
|
name: 'main'
|
|
40
|
-
}
|
|
41
|
+
}
|
|
42
|
+
];
|
|
41
43
|
}
|
|
42
44
|
useMutualizedProxy(languageClientId, options) {
|
|
43
45
|
return this._useMutualizedProxy && options.mutualizable;
|
|
@@ -51,13 +53,13 @@ class CodinGameInfrastructure {
|
|
|
51
53
|
return (await readFile(resource.toString(true), languageClient)).content;
|
|
52
54
|
}
|
|
53
55
|
async getFileStats(directory, languageClient) {
|
|
54
|
-
return
|
|
56
|
+
return await getFileStats(directory.toString(true), languageClient);
|
|
55
57
|
}
|
|
56
58
|
async listFiles(directory, languageClient) {
|
|
57
59
|
try {
|
|
58
60
|
return (await listFiles(directory.toString(true), languageClient)).files;
|
|
59
61
|
}
|
|
60
|
-
catch
|
|
62
|
+
catch {
|
|
61
63
|
return [];
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -65,7 +67,7 @@ class CodinGameInfrastructure {
|
|
|
65
67
|
var _a;
|
|
66
68
|
try {
|
|
67
69
|
const url = new URL(this.sessionId != null ? `run/${this.sessionId}/${id}` : `run/${id}`, this.serverAddress);
|
|
68
|
-
(_a = this.libraryUrls) === null || _a === void 0 ? void 0 : _a.forEach(libraryUrl => url.searchParams.append('libraryUrl', libraryUrl));
|
|
70
|
+
(_a = this.libraryUrls) === null || _a === void 0 ? void 0 : _a.forEach((libraryUrl) => url.searchParams.append('libraryUrl', libraryUrl));
|
|
69
71
|
url.searchParams.append('token', await this.getSecurityToken());
|
|
70
72
|
const connection = await openWebsocketConnection(url);
|
|
71
73
|
return connection;
|
|
@@ -78,12 +80,11 @@ class CodinGameInfrastructure {
|
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
getInitializationOptions(documentSelector) {
|
|
81
|
-
let documents = vscode.workspace.textDocuments.filter(doc => doc.uri.scheme === 'file');
|
|
83
|
+
let documents = vscode.workspace.textDocuments.filter((doc) => doc.uri.scheme === 'file');
|
|
82
84
|
if (documentSelector != null) {
|
|
83
|
-
documents = documents.filter(doc => vscode.languages.match(documentSelector, doc));
|
|
85
|
+
documents = documents.filter((doc) => vscode.languages.match(documentSelector, doc));
|
|
84
86
|
}
|
|
85
|
-
const files = documents
|
|
86
|
-
.reduce((map, doc) => {
|
|
87
|
+
const files = documents.reduce((map, doc) => {
|
|
87
88
|
map[doc.uri.toString(true)] = doc.getText();
|
|
88
89
|
return map;
|
|
89
90
|
}, {});
|
package/dist/languageClient.js
CHANGED
|
@@ -2,7 +2,7 @@ import { CloseAction, ErrorAction, State } from 'vscode-languageclient';
|
|
|
2
2
|
import delay from 'delay';
|
|
3
3
|
import { Emitter, LogMessageNotification } from 'vscode-languageserver-protocol';
|
|
4
4
|
import * as vscode from 'vscode';
|
|
5
|
-
import { errorHandler } from 'vscode/monaco';
|
|
5
|
+
import { errorHandler } from '@codingame/monaco-vscode-api/monaco';
|
|
6
6
|
import once from 'once';
|
|
7
7
|
import { DisposableCollection } from 'vscode-ws-jsonrpc';
|
|
8
8
|
import { initializePromise } from '@codingame/monaco-editor-wrapper';
|
|
@@ -71,7 +71,7 @@ class LanguageClientManager {
|
|
|
71
71
|
try {
|
|
72
72
|
await this.startPromise;
|
|
73
73
|
}
|
|
74
|
-
catch
|
|
74
|
+
catch {
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
if (this.languageClient != null) {
|
|
@@ -110,8 +110,7 @@ class LanguageClientManager {
|
|
|
110
110
|
let started = false;
|
|
111
111
|
let attempt = 0;
|
|
112
112
|
const maxStartAttemptCount = this.managerOptions.maxStartAttemptCount;
|
|
113
|
-
while (!this.isDisposed() &&
|
|
114
|
-
!started) {
|
|
113
|
+
while (!this.isDisposed() && !started) {
|
|
115
114
|
if (maxStartAttemptCount != null && attempt >= maxStartAttemptCount) {
|
|
116
115
|
throw new Error(`Max connection attempt count exceeded: ${maxStartAttemptCount}`);
|
|
117
116
|
}
|
|
@@ -233,8 +232,8 @@ class LanguageClientManager {
|
|
|
233
232
|
let readyPromise;
|
|
234
233
|
const { maxInitializeDuration, readinessMessageMatcher } = this.clientOptions;
|
|
235
234
|
if (readinessMessageMatcher != null && !this.useMutualizedProxy) {
|
|
236
|
-
readyPromise = new Promise(resolve => {
|
|
237
|
-
disposableCollection.push(languageClient.onNotification(LogMessageNotification.type, logMessage => {
|
|
235
|
+
readyPromise = new Promise((resolve) => {
|
|
236
|
+
disposableCollection.push(languageClient.onNotification(LogMessageNotification.type, (logMessage) => {
|
|
238
237
|
if (readinessMessageMatcher.exec(logMessage.message) != null) {
|
|
239
238
|
resolve();
|
|
240
239
|
}
|
|
@@ -242,14 +241,11 @@ class LanguageClientManager {
|
|
|
242
241
|
});
|
|
243
242
|
}
|
|
244
243
|
else {
|
|
245
|
-
readyPromise = new Promise(resolve => {
|
|
244
|
+
readyPromise = new Promise((resolve) => {
|
|
246
245
|
disposableCollection.push(onServerResponse.event(resolve));
|
|
247
246
|
});
|
|
248
247
|
}
|
|
249
|
-
await Promise.race([
|
|
250
|
-
readyPromise,
|
|
251
|
-
delay(maxInitializeDuration !== null && maxInitializeDuration !== void 0 ? maxInitializeDuration : 15000)
|
|
252
|
-
]);
|
|
248
|
+
await Promise.race([readyPromise, delay(maxInitializeDuration !== null && maxInitializeDuration !== void 0 ? maxInitializeDuration : 15000)]);
|
|
253
249
|
disposableCollection.dispose();
|
|
254
250
|
}, (error) => {
|
|
255
251
|
errorHandler.onUnexpectedError(new Error(`[LSP] Error while waiting for the ${this.id} language client to be ready`, {
|
|
@@ -269,10 +265,12 @@ class LanguageClientManager {
|
|
|
269
265
|
setTimeout(() => {
|
|
270
266
|
void languageClient.dispose();
|
|
271
267
|
});
|
|
272
|
-
if (state.oldState === State.Running &&
|
|
268
|
+
if (state.oldState === State.Running &&
|
|
269
|
+
!this.isDisposed() &&
|
|
270
|
+
this.languageClient === languageClient) {
|
|
273
271
|
this.languageClient = undefined;
|
|
274
272
|
console.info('[LSP] Restarting language client', state);
|
|
275
|
-
this.start().catch(error => {
|
|
273
|
+
this.start().catch((error) => {
|
|
276
274
|
errorHandler.onUnexpectedError(new Error('[LSP] Language client stopped', {
|
|
277
275
|
cause: error
|
|
278
276
|
}));
|
package/dist/staticOptions.js
CHANGED
|
@@ -41,9 +41,7 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
41
41
|
mutualizable: false
|
|
42
42
|
},
|
|
43
43
|
csharp: {
|
|
44
|
-
documentSelector: [
|
|
45
|
-
{ scheme: 'file', language: 'csharp' }
|
|
46
|
-
],
|
|
44
|
+
documentSelector: [{ scheme: 'file', language: 'csharp' }],
|
|
47
45
|
mutualizable: true,
|
|
48
46
|
middleware: {
|
|
49
47
|
async provideDefinition(document, position, token, next) {
|
|
@@ -62,9 +60,7 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
62
60
|
},
|
|
63
61
|
async createAdditionalFeatures(client) {
|
|
64
62
|
const { CsharpExtensionFeature } = await import('./extensions/csharp.js').then(module => module);
|
|
65
|
-
return [
|
|
66
|
-
new CsharpExtensionFeature(client)
|
|
67
|
-
];
|
|
63
|
+
return [new CsharpExtensionFeature(client)];
|
|
68
64
|
}
|
|
69
65
|
},
|
|
70
66
|
cpp: {
|
|
@@ -97,9 +93,7 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
97
93
|
},
|
|
98
94
|
async createAdditionalFeatures(client) {
|
|
99
95
|
const { CobolResolveSubroutineFeature } = await import('./extensions/cobol.js').then(module => module);
|
|
100
|
-
return [
|
|
101
|
-
new CobolResolveSubroutineFeature(client)
|
|
102
|
-
];
|
|
96
|
+
return [new CobolResolveSubroutineFeature(client)];
|
|
103
97
|
}
|
|
104
98
|
},
|
|
105
99
|
dart: {
|
|
@@ -128,9 +122,7 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
128
122
|
}
|
|
129
123
|
},
|
|
130
124
|
groovy: {
|
|
131
|
-
documentSelector: [
|
|
132
|
-
{ scheme: 'file', language: 'groovy' }
|
|
133
|
-
],
|
|
125
|
+
documentSelector: [{ scheme: 'file', language: 'groovy' }],
|
|
134
126
|
synchronize: {
|
|
135
127
|
configurationSection: 'groovy'
|
|
136
128
|
},
|
|
@@ -148,9 +140,7 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
148
140
|
mutualizable: true,
|
|
149
141
|
async createAdditionalFeatures(client) {
|
|
150
142
|
const { JavaExtensionFeature } = await import('./extensions/java.js').then(module => module);
|
|
151
|
-
return [
|
|
152
|
-
new JavaExtensionFeature(client)
|
|
153
|
-
];
|
|
143
|
+
return [new JavaExtensionFeature(client)];
|
|
154
144
|
},
|
|
155
145
|
initializationOptions: {
|
|
156
146
|
extendedClientCapabilities: {
|
|
@@ -197,9 +187,7 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
197
187
|
maxInitializeDuration: 60000
|
|
198
188
|
},
|
|
199
189
|
lua: {
|
|
200
|
-
documentSelector: [
|
|
201
|
-
{ scheme: 'file', language: 'lua' }
|
|
202
|
-
],
|
|
190
|
+
documentSelector: [{ scheme: 'file', language: 'lua' }],
|
|
203
191
|
synchronize: {
|
|
204
192
|
configurationSection: 'Lua'
|
|
205
193
|
},
|
|
@@ -211,10 +199,12 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
211
199
|
}
|
|
212
200
|
},
|
|
213
201
|
mysql: {
|
|
214
|
-
documentSelector: [
|
|
202
|
+
documentSelector: [
|
|
203
|
+
{
|
|
215
204
|
scheme: 'file',
|
|
216
205
|
language: 'sql'
|
|
217
|
-
}
|
|
206
|
+
}
|
|
207
|
+
],
|
|
218
208
|
middleware: {
|
|
219
209
|
provideCodeActions() {
|
|
220
210
|
return [];
|
|
@@ -223,10 +213,12 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
223
213
|
mutualizable: false
|
|
224
214
|
},
|
|
225
215
|
ocaml: {
|
|
226
|
-
documentSelector: [
|
|
216
|
+
documentSelector: [
|
|
217
|
+
{
|
|
227
218
|
scheme: 'file',
|
|
228
219
|
language: 'ocaml'
|
|
229
|
-
}
|
|
220
|
+
}
|
|
221
|
+
],
|
|
230
222
|
mutualizable: false
|
|
231
223
|
},
|
|
232
224
|
'objective-c': {
|
|
@@ -252,15 +244,11 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
252
244
|
var _a;
|
|
253
245
|
return ({
|
|
254
246
|
configuration: {
|
|
255
|
-
uris: (_a = vscode.workspace.workspaceFolders) === null || _a === void 0 ? void 0 : _a.map(folder => folder.uri.toString()),
|
|
247
|
+
uris: (_a = vscode.workspace.workspaceFolders) === null || _a === void 0 ? void 0 : _a.map((folder) => folder.uri.toString()),
|
|
256
248
|
phpVersion: 7.3,
|
|
257
|
-
fileExtensions: [
|
|
258
|
-
'php'
|
|
259
|
-
],
|
|
249
|
+
fileExtensions: ['php'],
|
|
260
250
|
indexDatabaseUri: 'file:///tmp/index.sqlite',
|
|
261
|
-
excludedPathExpressions: [
|
|
262
|
-
'file:///opt/serenata'
|
|
263
|
-
]
|
|
251
|
+
excludedPathExpressions: ['file:///opt/serenata']
|
|
264
252
|
}
|
|
265
253
|
});
|
|
266
254
|
},
|
|
@@ -277,10 +265,12 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
277
265
|
mutualizable: true
|
|
278
266
|
},
|
|
279
267
|
postgresql: {
|
|
280
|
-
documentSelector: [
|
|
268
|
+
documentSelector: [
|
|
269
|
+
{
|
|
281
270
|
scheme: 'file',
|
|
282
271
|
language: 'postgres'
|
|
283
|
-
}
|
|
272
|
+
}
|
|
273
|
+
],
|
|
284
274
|
middleware: {
|
|
285
275
|
provideCodeActions() {
|
|
286
276
|
return [];
|
|
@@ -289,9 +279,7 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
289
279
|
mutualizable: false
|
|
290
280
|
},
|
|
291
281
|
python: {
|
|
292
|
-
documentSelector: [
|
|
293
|
-
{ scheme: 'file', language: 'python' }
|
|
294
|
-
],
|
|
282
|
+
documentSelector: [{ scheme: 'file', language: 'python' }],
|
|
295
283
|
synchronize: {
|
|
296
284
|
configurationSection: 'python'
|
|
297
285
|
},
|
|
@@ -321,9 +309,7 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
321
309
|
mutualizable: true
|
|
322
310
|
},
|
|
323
311
|
ruby: {
|
|
324
|
-
documentSelector: [
|
|
325
|
-
{ scheme: 'file', language: 'ruby' }
|
|
326
|
-
],
|
|
312
|
+
documentSelector: [{ scheme: 'file', language: 'ruby' }],
|
|
327
313
|
mutualizable: true,
|
|
328
314
|
defaultConfigurationOverride: {
|
|
329
315
|
'solargraph.diagnostics': true,
|
|
@@ -334,15 +320,11 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
334
320
|
}
|
|
335
321
|
},
|
|
336
322
|
rust: {
|
|
337
|
-
documentSelector: [
|
|
338
|
-
{ scheme: 'file', language: 'rust' }
|
|
339
|
-
],
|
|
323
|
+
documentSelector: [{ scheme: 'file', language: 'rust' }],
|
|
340
324
|
mutualizable: false
|
|
341
325
|
},
|
|
342
326
|
scala: {
|
|
343
|
-
documentSelector: [
|
|
344
|
-
{ scheme: 'file', language: 'scala' }
|
|
345
|
-
],
|
|
327
|
+
documentSelector: [{ scheme: 'file', language: 'scala' }],
|
|
346
328
|
synchronize: {
|
|
347
329
|
configurationSection: 'metals'
|
|
348
330
|
},
|
|
@@ -410,5 +392,4 @@ const staticOptions = asLanguageClientOptionsById({
|
|
|
410
392
|
mutualizable: true
|
|
411
393
|
}
|
|
412
394
|
});
|
|
413
|
-
|
|
414
|
-
export { staticOptions$1 as default };
|
|
395
|
+
export { staticOptions as default };
|