monaco-languageclient-examples 2025.8.3 → 2025.8.5
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/CHANGELOG.md +8 -0
- package/dist/appPlayground/common.d.ts +2 -2
- package/dist/appPlayground/common.d.ts.map +1 -1
- package/dist/appPlayground/common.js +2 -3
- package/dist/appPlayground/common.js.map +1 -1
- package/dist/appPlayground/config.d.ts +4 -2
- package/dist/appPlayground/config.d.ts.map +1 -1
- package/dist/appPlayground/config.js +65 -63
- package/dist/appPlayground/config.js.map +1 -1
- package/dist/appPlayground/launcher.js +1 -1
- package/dist/appPlayground/launcher.js.map +1 -1
- package/dist/appPlayground/main.d.ts.map +1 -1
- package/dist/appPlayground/main.js +5 -4
- package/dist/appPlayground/main.js.map +1 -1
- package/dist/appPlayground/reactLauncher.js +1 -1
- package/dist/appPlayground/reactLauncher.js.map +1 -1
- package/dist/appPlayground/reactMain.d.ts.map +1 -1
- package/dist/appPlayground/reactMain.js +2 -3
- package/dist/appPlayground/reactMain.js.map +1 -1
- package/dist/bare/client.d.ts.map +1 -1
- package/dist/bare/client.js +12 -15
- package/dist/bare/client.js.map +1 -1
- package/dist/browser/main.d.ts +1 -0
- package/dist/browser/main.d.ts.map +1 -1
- package/dist/browser/main.js +29 -27
- package/dist/browser/main.js.map +1 -1
- package/dist/clangd/client/config.d.ts +10 -3
- package/dist/clangd/client/config.d.ts.map +1 -1
- package/dist/clangd/client/config.js +85 -85
- package/dist/clangd/client/config.js.map +1 -1
- package/dist/clangd/client/main.d.ts.map +1 -1
- package/dist/clangd/client/main.js +12 -9
- package/dist/clangd/client/main.js.map +1 -1
- package/dist/common/client/extendedClient.d.ts +9 -0
- package/dist/common/client/extendedClient.d.ts.map +1 -0
- package/dist/common/client/extendedClient.js +97 -0
- package/dist/common/client/extendedClient.js.map +1 -0
- package/dist/common/client/utils.d.ts +8 -1
- package/dist/common/client/utils.d.ts.map +1 -1
- package/dist/common/client/utils.js +0 -3
- package/dist/common/client/utils.js.map +1 -1
- package/dist/debugger/client/debugger.d.ts +1 -1
- package/dist/debugger/client/debugger.d.ts.map +1 -1
- package/dist/eclipse.jdt.ls/client/main.d.ts +1 -1
- package/dist/eclipse.jdt.ls/client/main.d.ts.map +1 -1
- package/dist/eclipse.jdt.ls/client/main.js +4 -74
- package/dist/eclipse.jdt.ls/client/main.js.map +1 -1
- package/dist/eclipse.jdt.ls/config.d.ts +2 -5
- package/dist/eclipse.jdt.ls/config.d.ts.map +1 -1
- package/dist/eclipse.jdt.ls/config.js +2 -1
- package/dist/eclipse.jdt.ls/config.js.map +1 -1
- package/dist/groovy/client/main.d.ts +1 -1
- package/dist/groovy/client/main.d.ts.map +1 -1
- package/dist/groovy/client/main.js +4 -63
- package/dist/groovy/client/main.js.map +1 -1
- package/dist/groovy/config.d.ts +2 -5
- package/dist/groovy/config.d.ts.map +1 -1
- package/dist/groovy/config.js +2 -1
- package/dist/groovy/config.js.map +1 -1
- package/dist/json/client/client.d.ts +3 -0
- package/dist/json/client/client.d.ts.map +1 -0
- package/dist/json/client/client.js +13 -0
- package/dist/json/client/client.js.map +1 -0
- package/dist/json/client/config.d.ts +3 -0
- package/dist/json/client/config.d.ts.map +1 -0
- package/dist/json/client/config.js +11 -0
- package/dist/json/client/config.js.map +1 -0
- package/dist/json/server/main.js.map +1 -1
- package/dist/langium/langium-dsl/config/extendedConfig.d.ts +2 -7
- package/dist/langium/langium-dsl/config/extendedConfig.d.ts.map +1 -1
- package/dist/langium/langium-dsl/config/extendedConfig.js +103 -49
- package/dist/langium/langium-dsl/config/extendedConfig.js.map +1 -1
- package/dist/langium/langium-dsl/config/langium.configuration.json +10 -40
- package/dist/langium/langium-dsl/config/langium.tmLanguage.json +1 -1
- package/dist/langium/langium-dsl/main.d.ts +2 -0
- package/dist/langium/langium-dsl/main.d.ts.map +1 -0
- package/dist/langium/langium-dsl/main.js +26 -0
- package/dist/langium/langium-dsl/main.js.map +1 -0
- package/dist/langium/statemachine/config/wrapperStatemachineConfig.d.ts +4 -4
- package/dist/langium/statemachine/config/wrapperStatemachineConfig.d.ts.map +1 -1
- package/dist/langium/statemachine/config/wrapperStatemachineConfig.js +40 -41
- package/dist/langium/statemachine/config/wrapperStatemachineConfig.js.map +1 -1
- package/dist/langium/statemachine/launcher.js +1 -1
- package/dist/langium/statemachine/launcher.js.map +1 -1
- package/dist/langium/statemachine/main-react.d.ts.map +1 -1
- package/dist/langium/statemachine/main-react.js +7 -3
- package/dist/langium/statemachine/main-react.js.map +1 -1
- package/dist/langium/statemachine/main.d.ts.map +1 -1
- package/dist/langium/statemachine/main.js +38 -27
- package/dist/langium/statemachine/main.js.map +1 -1
- package/dist/multi/config.d.ts +1 -1
- package/dist/multi/config.d.ts.map +1 -1
- package/dist/multi/config.js +0 -1
- package/dist/multi/config.js.map +1 -1
- package/dist/multi/twoLanguageClients.d.ts.map +1 -1
- package/dist/multi/twoLanguageClients.js +45 -49
- package/dist/multi/twoLanguageClients.js.map +1 -1
- package/dist/node.d.ts +0 -3
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +0 -3
- package/dist/node.js.map +1 -1
- package/dist/python/client/config.d.ts +7 -3
- package/dist/python/client/config.d.ts.map +1 -1
- package/dist/python/client/config.js +93 -97
- package/dist/python/client/config.js.map +1 -1
- package/dist/python/client/main.d.ts.map +1 -1
- package/dist/python/client/main.js +16 -10
- package/dist/python/client/main.js.map +1 -1
- package/dist/python/client/reactPython.d.ts.map +1 -1
- package/dist/python/client/reactPython.js +13 -9
- package/dist/python/client/reactPython.js.map +1 -1
- package/dist/ts/wrapperTs.d.ts.map +1 -1
- package/dist/ts/wrapperTs.js +50 -45
- package/dist/ts/wrapperTs.js.map +1 -1
- package/ghp_langium_extended.html +3 -3
- package/index.html +1 -1
- package/json.html +1 -1
- package/langium_extended.html +4 -6
- package/package.json +10 -11
- package/src/appPlayground/common.ts +3 -3
- package/src/appPlayground/config.ts +69 -65
- package/src/appPlayground/launcher.ts +2 -1
- package/src/appPlayground/main.ts +8 -5
- package/src/appPlayground/reactLauncher.ts +2 -1
- package/src/appPlayground/reactMain.tsx +4 -4
- package/src/bare/client.ts +15 -16
- package/src/browser/main.ts +30 -27
- package/src/clangd/client/config.ts +97 -87
- package/src/clangd/client/main.ts +14 -10
- package/src/common/client/extendedClient.ts +111 -0
- package/src/common/client/utils.ts +7 -2
- package/src/debugger/client/debugger.ts +1 -1
- package/src/eclipse.jdt.ls/client/main.ts +4 -78
- package/src/eclipse.jdt.ls/config.ts +6 -2
- package/src/groovy/client/main.ts +4 -65
- package/src/groovy/config.ts +6 -2
- package/src/json/client/client.ts +14 -0
- package/src/json/client/config.ts +13 -0
- package/src/json/server/main.ts +1 -1
- package/src/langium/langium-dsl/config/extendedConfig.ts +117 -54
- package/src/langium/langium-dsl/config/langium.configuration.json +128 -158
- package/src/langium/langium-dsl/config/langium.tmLanguage.json +271 -271
- package/src/langium/langium-dsl/main.ts +31 -0
- package/src/langium/statemachine/config/wrapperStatemachineConfig.ts +48 -45
- package/src/langium/statemachine/launcher.ts +1 -1
- package/src/langium/statemachine/main-react.tsx +10 -4
- package/src/langium/statemachine/main.ts +43 -27
- package/src/multi/config.ts +3 -3
- package/src/multi/twoLanguageClients.ts +48 -52
- package/src/node.ts +0 -3
- package/src/python/client/config.ts +101 -99
- package/src/python/client/main.ts +20 -11
- package/src/python/client/reactPython.tsx +17 -10
- package/src/ts/wrapperTs.ts +52 -45
- package/two_langauge_clients.html +0 -1
- package/vite.production.base.ts +0 -1
- package/dist/json/client/wrapperWs.d.ts +0 -5
- package/dist/json/client/wrapperWs.d.ts.map +0 -1
- package/dist/json/client/wrapperWs.js +0 -87
- package/dist/json/client/wrapperWs.js.map +0 -1
- package/dist/langium/langium-dsl/config/classicConfig.d.ts +0 -7
- package/dist/langium/langium-dsl/config/classicConfig.d.ts.map +0 -1
- package/dist/langium/langium-dsl/config/classicConfig.js +0 -66
- package/dist/langium/langium-dsl/config/classicConfig.js.map +0 -1
- package/dist/langium/langium-dsl/wrapperLangium.d.ts +0 -2
- package/dist/langium/langium-dsl/wrapperLangium.d.ts.map +0 -1
- package/dist/langium/langium-dsl/wrapperLangium.js +0 -79
- package/dist/langium/langium-dsl/wrapperLangium.js.map +0 -1
- package/ghp_langium_classic.html +0 -26
- package/langium_classic.html +0 -26
- package/src/json/client/wrapperWs.ts +0 -90
- package/src/langium/langium-dsl/config/classicConfig.ts +0 -72
- package/src/langium/langium-dsl/wrapperLangium.ts +0 -85
|
@@ -3,43 +3,112 @@
|
|
|
3
3
|
* Licensed under the MIT License. See LICENSE in the package root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import * as vscode from 'vscode';
|
|
7
7
|
import { LogLevel } from '@codingame/monaco-vscode-api';
|
|
8
|
-
import '
|
|
9
|
-
import
|
|
10
|
-
import type {
|
|
11
|
-
import {
|
|
8
|
+
import { InMemoryFileSystemProvider, registerFileSystemOverlay, type IFileWriteOptions } from '@codingame/monaco-vscode-files-service-override';
|
|
9
|
+
import getKeybindingsServiceOverride from '@codingame/monaco-vscode-keybindings-service-override';
|
|
10
|
+
import type { EditorAppConfig } from 'monaco-languageclient/editorApp';
|
|
11
|
+
import type { LanguageClientConfig } from 'monaco-languageclient/lcwrapper';
|
|
12
|
+
import { type MonacoVscodeApiConfig, type OverallConfigType } from 'monaco-languageclient/vscodeApiWrapper';
|
|
13
|
+
import { configureDefaultWorkerFactory } from 'monaco-languageclient/workerFactory';
|
|
14
|
+
import { BrowserMessageReader, BrowserMessageWriter } from 'vscode-languageclient/browser.js';
|
|
15
|
+
import langiumGrammarLangium from '../../../../resources/langium/langium-dsl/langium-grammar.langium?raw';
|
|
16
|
+
import langiumTypesLangium from '../../../../resources/langium/langium-dsl/langium-types.langium?raw';
|
|
17
|
+
import type { ExampleAppConfig } from '../../../common/client/utils.js';
|
|
18
|
+
import workerUrl from '../worker/langium-server?worker&url';
|
|
12
19
|
import langiumLanguageConfig from './langium.configuration.json?raw';
|
|
13
20
|
import langiumTextmateGrammar from './langium.tmLanguage.json?raw';
|
|
14
|
-
import text from '../../../../resources/langium/langium-dsl//example.langium?raw';
|
|
15
|
-
|
|
16
|
-
export const setupLangiumClientExtended = async (params: {
|
|
17
|
-
worker: Worker
|
|
18
|
-
messageTransports?: MessageTransports,
|
|
19
|
-
}): Promise<WrapperConfig> => {
|
|
20
21
|
|
|
22
|
+
export const setupLangiumClientExtended = async (): Promise<ExampleAppConfig> => {
|
|
23
|
+
const overallConfigType: OverallConfigType = 'extended';
|
|
21
24
|
const extensionFilesOrContents = new Map<string, string | URL>();
|
|
22
25
|
// vite build is easier with string content
|
|
23
|
-
extensionFilesOrContents.set('/langium-configuration.json', langiumLanguageConfig);
|
|
24
|
-
extensionFilesOrContents.set('/langium-grammar.json', langiumTextmateGrammar);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
extensionFilesOrContents.set('/workspace/langium-configuration.json', langiumLanguageConfig);
|
|
27
|
+
extensionFilesOrContents.set('/workspace/langium-grammar.json', langiumTextmateGrammar);
|
|
28
|
+
|
|
29
|
+
const loadLangiumWorker = () => {
|
|
30
|
+
console.log(`Langium worker URL: ${workerUrl}`);
|
|
31
|
+
return new Worker(workerUrl, {
|
|
32
|
+
type: 'module',
|
|
33
|
+
name: 'Langium LS',
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const worker = loadLangiumWorker();
|
|
38
|
+
const reader = new BrowserMessageReader(worker);
|
|
39
|
+
const writer = new BrowserMessageWriter(worker);
|
|
40
|
+
reader.listen((message) => {
|
|
41
|
+
console.log('Received message from worker:', message);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// prepare all resources that should be preloaded
|
|
45
|
+
const workspaceUri = vscode.Uri.file('/workspace');
|
|
46
|
+
const langiumGrammarLangiumUri = vscode.Uri.file('/workspace/langium-grammar.langium');
|
|
47
|
+
const langiumTypesLangiumUri = vscode.Uri.file('/workspace/langium-types.langium');
|
|
48
|
+
const fileSystemProvider = new InMemoryFileSystemProvider();
|
|
49
|
+
const textEncoder = new TextEncoder();
|
|
50
|
+
|
|
51
|
+
const options: IFileWriteOptions = {
|
|
52
|
+
atomic: false,
|
|
53
|
+
unlock: false,
|
|
54
|
+
create: true,
|
|
55
|
+
overwrite: true
|
|
56
|
+
};
|
|
57
|
+
await fileSystemProvider.mkdir(workspaceUri);
|
|
58
|
+
await fileSystemProvider.writeFile(langiumGrammarLangiumUri, textEncoder.encode(langiumGrammarLangium), options);
|
|
59
|
+
await fileSystemProvider.writeFile(langiumTypesLangiumUri, textEncoder.encode(langiumTypesLangium), options);
|
|
60
|
+
registerFileSystemOverlay(1, fileSystemProvider);
|
|
61
|
+
|
|
62
|
+
const editorAppConfig: EditorAppConfig = {
|
|
63
|
+
$type: overallConfigType
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const innerHtml = `<div id="editorsDiv">
|
|
67
|
+
<div id="editors"></div>
|
|
68
|
+
</div>`;
|
|
69
|
+
const viewsInit = async () => {
|
|
70
|
+
const { Parts, onPartVisibilityChange, isPartVisibile, attachPart, } = await import('@codingame/monaco-vscode-views-service-override');
|
|
71
|
+
|
|
72
|
+
for (const config of [
|
|
73
|
+
{ part: Parts.EDITOR_PART, element: '#editors' },
|
|
74
|
+
]) {
|
|
75
|
+
attachPart(config.part, document.querySelector<HTMLDivElement>(config.element)!);
|
|
76
|
+
|
|
77
|
+
if (!isPartVisibile(config.part)) {
|
|
78
|
+
document.querySelector<HTMLDivElement>(config.element)!.style.display = 'none';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
onPartVisibilityChange(config.part, visible => {
|
|
82
|
+
document.querySelector<HTMLDivElement>(config.element)!.style.display = visible ? 'block' : 'none';
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const vscodeApiConfig: MonacoVscodeApiConfig = {
|
|
87
|
+
$type: overallConfigType,
|
|
28
88
|
logLevel: LogLevel.Debug,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
89
|
+
htmlContainer: document.body,
|
|
90
|
+
serviceOverrides: {
|
|
91
|
+
...getKeybindingsServiceOverride()
|
|
92
|
+
},
|
|
93
|
+
viewsConfig: {
|
|
94
|
+
viewServiceType: 'ViewsService',
|
|
95
|
+
htmlAugmentationInstructions: (htmlElement: HTMLElement | null | undefined) => {
|
|
96
|
+
const htmlContainer = document.createElement('div', { is: 'app' });
|
|
97
|
+
htmlContainer.innerHTML = innerHtml;
|
|
98
|
+
htmlElement?.append(htmlContainer);
|
|
32
99
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
100
|
+
viewsInitFunc: viewsInit
|
|
101
|
+
},
|
|
102
|
+
userConfiguration: {
|
|
103
|
+
json: JSON.stringify({
|
|
104
|
+
'workbench.colorTheme': 'Default Dark Modern',
|
|
105
|
+
'editor.guides.bracketPairsHorizontal': 'active',
|
|
106
|
+
'editor.wordBasedSuggestions': 'off',
|
|
107
|
+
'editor.experimental.asyncTokenization': true,
|
|
108
|
+
'vitest.disableWorkspaceWarning': true
|
|
109
|
+
})
|
|
42
110
|
},
|
|
111
|
+
monacoWorkerFactory: configureDefaultWorkerFactory,
|
|
43
112
|
extensions: [{
|
|
44
113
|
config: {
|
|
45
114
|
name: 'langium-example',
|
|
@@ -53,41 +122,35 @@ export const setupLangiumClientExtended = async (params: {
|
|
|
53
122
|
id: 'langium',
|
|
54
123
|
extensions: ['.langium'],
|
|
55
124
|
aliases: ['langium', 'LANGIUM'],
|
|
56
|
-
configuration: '
|
|
125
|
+
configuration: '/workspace/langium-configuration.json'
|
|
57
126
|
}],
|
|
58
127
|
grammars: [{
|
|
59
128
|
language: 'langium',
|
|
60
129
|
scopeName: 'source.langium',
|
|
61
|
-
path: '
|
|
130
|
+
path: '/workspace/langium-grammar.json'
|
|
62
131
|
}]
|
|
63
132
|
}
|
|
64
133
|
},
|
|
65
134
|
filesOrContents: extensionFilesOrContents
|
|
66
|
-
}]
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
monacoWorkerFactory: configureDefaultWorkerFactory
|
|
135
|
+
}]
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const languageClientConfig: LanguageClientConfig = {
|
|
139
|
+
clientOptions: {
|
|
140
|
+
documentSelector: ['langium']
|
|
75
141
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
connection: {
|
|
83
|
-
options: {
|
|
84
|
-
$type: 'WorkerDirect',
|
|
85
|
-
worker: params.worker
|
|
86
|
-
},
|
|
87
|
-
messageTransports: params.messageTransports
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
142
|
+
connection: {
|
|
143
|
+
options: {
|
|
144
|
+
$type: 'WorkerDirect',
|
|
145
|
+
worker
|
|
146
|
+
},
|
|
147
|
+
messageTransports: { reader, writer }
|
|
91
148
|
}
|
|
92
149
|
};
|
|
150
|
+
|
|
151
|
+
return {
|
|
152
|
+
editorAppConfig,
|
|
153
|
+
vscodeApiConfig,
|
|
154
|
+
languageClientConfig
|
|
155
|
+
};
|
|
93
156
|
};
|
|
@@ -1,164 +1,134 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"/*",
|
|
6
|
-
"*/"
|
|
7
|
-
]
|
|
8
|
-
},
|
|
9
|
-
"brackets": [
|
|
10
|
-
[
|
|
11
|
-
"{",
|
|
12
|
-
"}"
|
|
13
|
-
],
|
|
14
|
-
[
|
|
15
|
-
"[",
|
|
16
|
-
"]"
|
|
17
|
-
],
|
|
18
|
-
[
|
|
19
|
-
"(",
|
|
20
|
-
")"
|
|
21
|
-
]
|
|
22
|
-
],
|
|
23
|
-
"autoClosingPairs": [
|
|
24
|
-
{
|
|
25
|
-
"open": "{",
|
|
26
|
-
"close": "}"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"open": "[",
|
|
30
|
-
"close": "]"
|
|
2
|
+
"comments": {
|
|
3
|
+
"lineComment": "//",
|
|
4
|
+
"blockComment": ["/*", "*/"]
|
|
31
5
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
{
|
|
37
|
-
"open": "'",
|
|
38
|
-
"close": "'",
|
|
39
|
-
"notIn": [
|
|
40
|
-
"string",
|
|
41
|
-
"comment"
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"open": "\"",
|
|
46
|
-
"close": "\"",
|
|
47
|
-
"notIn": [
|
|
48
|
-
"string"
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"open": "/**",
|
|
53
|
-
"close": " */",
|
|
54
|
-
"notIn": [
|
|
55
|
-
"string"
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
"autoCloseBefore": "}])`\n\t",
|
|
60
|
-
"surroundingPairs": [
|
|
61
|
-
[
|
|
62
|
-
"{",
|
|
63
|
-
"}"
|
|
6
|
+
"brackets": [
|
|
7
|
+
["{", "}"],
|
|
8
|
+
["[", "]"],
|
|
9
|
+
["(", ")"]
|
|
64
10
|
],
|
|
65
|
-
[
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
11
|
+
"autoClosingPairs": [
|
|
12
|
+
{ "open": "{", "close": "}" },
|
|
13
|
+
{ "open": "[", "close": "]" },
|
|
14
|
+
{ "open": "(", "close": ")" },
|
|
15
|
+
{
|
|
16
|
+
"open": "'",
|
|
17
|
+
"close": "'",
|
|
18
|
+
"notIn": [
|
|
19
|
+
"string",
|
|
20
|
+
"comment"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"open": "\"",
|
|
25
|
+
"close": "\"",
|
|
26
|
+
"notIn": [
|
|
27
|
+
"string"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"open": "/**",
|
|
32
|
+
"close": " */",
|
|
33
|
+
"notIn": [
|
|
34
|
+
"string"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
78
37
|
],
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
38
|
+
"autoCloseBefore": "}])`\n\t",
|
|
39
|
+
"surroundingPairs": [
|
|
40
|
+
["{", "}"],
|
|
41
|
+
["[", "]"],
|
|
42
|
+
["(", ")"]
|
|
82
43
|
],
|
|
83
|
-
[
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
44
|
+
"colorizedBracketPairs": [
|
|
45
|
+
[
|
|
46
|
+
"(",
|
|
47
|
+
")"
|
|
48
|
+
],
|
|
49
|
+
[
|
|
50
|
+
"[",
|
|
51
|
+
"]"
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"{",
|
|
55
|
+
"}"
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
"<",
|
|
59
|
+
">"
|
|
60
|
+
],
|
|
61
|
+
[
|
|
62
|
+
"'",
|
|
63
|
+
"'"
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"\"",
|
|
67
|
+
"\""
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
"<",
|
|
71
|
+
">"
|
|
72
|
+
]
|
|
73
|
+
],
|
|
74
|
+
"onEnterRules": [
|
|
75
|
+
{
|
|
76
|
+
"": "// e.g. /** | */",
|
|
77
|
+
"beforeText": {
|
|
78
|
+
"pattern": "^\\s*/\\*\\*(?!/)([^\\*]|\\*(?!/))*$"
|
|
79
|
+
},
|
|
80
|
+
"afterText": {
|
|
81
|
+
"pattern": "^\\s*\\*/$"
|
|
82
|
+
},
|
|
83
|
+
"action": {
|
|
84
|
+
"indent": "indentOutdent",
|
|
85
|
+
"appendText": " * "
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"": "// e.g. /** ...|",
|
|
90
|
+
"beforeText": {
|
|
91
|
+
"pattern": "^\\s*/\\*\\*(?!/)([^\\*]|\\*(?!/))*$"
|
|
92
|
+
},
|
|
93
|
+
"action": {
|
|
94
|
+
"indent": "none",
|
|
95
|
+
"appendText": " * "
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"": "// e.g. * ...|",
|
|
100
|
+
"beforeText": {
|
|
101
|
+
"pattern": "^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$"
|
|
102
|
+
},
|
|
103
|
+
"previousLineText": {
|
|
104
|
+
"pattern": "(?=^(\\s*(/\\*\\*|\\*)).*)(?=(?!(\\s*\\*/)))"
|
|
105
|
+
},
|
|
106
|
+
"action": {
|
|
107
|
+
"indent": "none",
|
|
108
|
+
"appendText": "* "
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"": "// e.g. */|",
|
|
113
|
+
"beforeText": {
|
|
114
|
+
"pattern": "^(\\t|[ ])*[ ]\\*/\\s*$"
|
|
115
|
+
},
|
|
116
|
+
"action": {
|
|
117
|
+
"indent": "none",
|
|
118
|
+
"removeText": 1
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"beforeText": ":\\s*$",
|
|
123
|
+
"action": {
|
|
124
|
+
"indent": "indent"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"beforeText": ";\\s*$",
|
|
129
|
+
"action": {
|
|
130
|
+
"indent": "outdent"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
102
133
|
]
|
|
103
|
-
|
|
104
|
-
"onEnterRules": [
|
|
105
|
-
{
|
|
106
|
-
"": "// e.g. /** | */",
|
|
107
|
-
"beforeText": {
|
|
108
|
-
"pattern": "^\\s*/\\*\\*(?!/)([^\\*]|\\*(?!/))*$"
|
|
109
|
-
},
|
|
110
|
-
"afterText": {
|
|
111
|
-
"pattern": "^\\s*\\*/$"
|
|
112
|
-
},
|
|
113
|
-
"action": {
|
|
114
|
-
"indent": "indentOutdent",
|
|
115
|
-
"appendText": " * "
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"": "// e.g. /** ...|",
|
|
120
|
-
"beforeText": {
|
|
121
|
-
"pattern": "^\\s*/\\*\\*(?!/)([^\\*]|\\*(?!/))*$"
|
|
122
|
-
},
|
|
123
|
-
"action": {
|
|
124
|
-
"indent": "none",
|
|
125
|
-
"appendText": " * "
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"": "// e.g. * ...|",
|
|
130
|
-
"beforeText": {
|
|
131
|
-
"pattern": "^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$"
|
|
132
|
-
},
|
|
133
|
-
"previousLineText": {
|
|
134
|
-
"pattern": "(?=^(\\s*(/\\*\\*|\\*)).*)(?=(?!(\\s*\\*/)))"
|
|
135
|
-
},
|
|
136
|
-
"action": {
|
|
137
|
-
"indent": "none",
|
|
138
|
-
"appendText": "* "
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"": "// e.g. */|",
|
|
143
|
-
"beforeText": {
|
|
144
|
-
"pattern": "^(\\t|[ ])*[ ]\\*/\\s*$"
|
|
145
|
-
},
|
|
146
|
-
"action": {
|
|
147
|
-
"indent": "none",
|
|
148
|
-
"removeText": 1
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"beforeText": ":\\s*$",
|
|
153
|
-
"action": {
|
|
154
|
-
"indent": "indent"
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"beforeText": ";\\s*$",
|
|
159
|
-
"action": {
|
|
160
|
-
"indent": "outdent"
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
]
|
|
164
|
-
}
|
|
134
|
+
}
|