monaco-languageclient 5.0.0-next.4 → 5.0.1
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 -2
- package/lib/console-window.d.ts +4 -2
- package/lib/console-window.d.ts.map +1 -1
- package/lib/console-window.js +19 -1
- package/lib/console-window.js.map +1 -1
- package/lib/monaco-language-client.d.ts +5 -3
- package/lib/monaco-language-client.d.ts.map +1 -1
- package/lib/monaco-language-client.js +32 -15
- package/lib/monaco-language-client.js.map +1 -1
- package/package.json +6 -20
- package/src/console-window.ts +23 -3
- package/src/monaco-language-client.ts +35 -18
- package/lib/helpers/themeHelper.d.ts +0 -3
- package/lib/helpers/themeHelper.d.ts.map +0 -1
- package/lib/helpers/themeHelper.js +0 -7
- package/lib/helpers/themeHelper.js.map +0 -1
- package/lib/helpers/themeLocalHelper.d.ts +0 -2
- package/lib/helpers/themeLocalHelper.d.ts.map +0 -1
- package/lib/helpers/themeLocalHelper.js +0 -100
- package/lib/helpers/themeLocalHelper.js.map +0 -1
- package/lib/helpers/themeRemoteHelper.d.ts +0 -3
- package/lib/helpers/themeRemoteHelper.d.ts.map +0 -1
- package/lib/helpers/themeRemoteHelper.js +0 -25
- package/lib/helpers/themeRemoteHelper.js.map +0 -1
- package/src/helpers/themeHelper.ts +0 -6
- package/src/helpers/themeLocalHelper.ts +0 -103
- package/src/helpers/themeRemoteHelper.ts +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -2,13 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this npm module are documented in this file.
|
|
4
4
|
|
|
5
|
-
## [5.0.
|
|
5
|
+
## [5.0.1] - 2023-04-04
|
|
6
6
|
|
|
7
|
+
- Bugfix: textDocument/didChange message is doubled #[479](https://github.com/TypeFox/monaco-languageclient/issues/479)
|
|
8
|
+
|
|
9
|
+
## [5.0.0] - 2023-04-04
|
|
10
|
+
|
|
11
|
+
- **BREAKING CHANGE**: Update to monaco-vscode-api 1.76 #[470](https://github.com/TypeFox/monaco-languageclient/pull/470)
|
|
12
|
+
- More services from `monaco-vscode-api` are used in the langium example (language config, text mate, keyboard bindings)
|
|
13
|
+
- Updates to `monaco-editor` version `0.36.1` and vscode api compatibility to `1.76.0`
|
|
7
14
|
- **BREAKING CHANGE**: Do not reexport code of imported libraries (e.g. vscode-languageclient) #[459](https://github.com/TypeFox/monaco-languageclient/pull/459)
|
|
8
15
|
- Content of `vscode-jsonrpc`,`vscode-languageclient` and `vscode-languageserver-protocol` is no longer re-exported
|
|
9
16
|
- Restructures example into less packages. It reduces maintenace efforts
|
|
10
17
|
- Web worker language server example is replaced with Langium Statemachine
|
|
11
|
-
- More services from `monaco-vscode-api` are used in this example (themes, text mate, keyboard)
|
|
12
18
|
|
|
13
19
|
## [4.0.3] - 2022-12-01
|
|
14
20
|
|
package/lib/console-window.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Window, Severity } from 'vscode/services';
|
|
2
2
|
import * as vscode from 'vscode';
|
|
3
3
|
export declare class ConsoleWindow implements Window {
|
|
4
|
-
protected readonly channels: Map<string, vscode.
|
|
4
|
+
protected readonly channels: Map<string, vscode.LogOutputChannel>;
|
|
5
5
|
showMessage<T extends vscode.MessageOptions | string | vscode.MessageItem>(severity: Severity, message: string, ..._actions: T[]): Thenable<T | undefined>;
|
|
6
|
-
createOutputChannel(name: string
|
|
6
|
+
createOutputChannel(name: string, _options: string | {
|
|
7
|
+
log: true;
|
|
8
|
+
} | undefined): vscode.LogOutputChannel;
|
|
7
9
|
}
|
|
8
10
|
//# sourceMappingURL=console-window.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console-window.d.ts","sourceRoot":"","sources":["../src/console-window.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,qBAAa,aAAc,YAAW,MAAM;IACxC,SAAS,CAAC,QAAQ,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"console-window.d.ts","sourceRoot":"","sources":["../src/console-window.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,qBAAa,aAAc,YAAW,MAAM;IACxC,SAAS,CAAC,QAAQ,CAAC,QAAQ,uCAA8C;IACzE,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC,EAAE,GAAG,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC;IAgB1J,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG;QACjD,GAAG,EAAE,IAAI,CAAC;KACb,GAAG,SAAS,GAAG,MAAM,CAAC,gBAAgB;CAkD1C"}
|
package/lib/console-window.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
import { Severity } from 'vscode/services';
|
|
6
|
+
import * as vscode from 'vscode';
|
|
6
7
|
export class ConsoleWindow {
|
|
7
8
|
channels = new Map();
|
|
8
9
|
showMessage(severity, message, ..._actions) {
|
|
@@ -20,13 +21,30 @@ export class ConsoleWindow {
|
|
|
20
21
|
}
|
|
21
22
|
return Promise.resolve(undefined);
|
|
22
23
|
}
|
|
23
|
-
createOutputChannel(name) {
|
|
24
|
+
createOutputChannel(name, _options) {
|
|
24
25
|
const existing = this.channels.get(name);
|
|
25
26
|
if (existing) {
|
|
26
27
|
return existing;
|
|
27
28
|
}
|
|
28
29
|
const channel = {
|
|
29
30
|
name: 'default',
|
|
31
|
+
logLevel: vscode.LogLevel.Info,
|
|
32
|
+
onDidChangeLogLevel: new vscode.EventEmitter().event,
|
|
33
|
+
trace(_message, ..._args) {
|
|
34
|
+
// no-op
|
|
35
|
+
},
|
|
36
|
+
debug(_message, ..._args) {
|
|
37
|
+
// no-op
|
|
38
|
+
},
|
|
39
|
+
info(_message, ..._args) {
|
|
40
|
+
// no-op
|
|
41
|
+
},
|
|
42
|
+
warn(_message, ..._args) {
|
|
43
|
+
// no-op
|
|
44
|
+
},
|
|
45
|
+
error(_message, ..._args) {
|
|
46
|
+
// no-op
|
|
47
|
+
},
|
|
30
48
|
append(value) {
|
|
31
49
|
console.log(name + ': ' + value);
|
|
32
50
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console-window.js","sourceRoot":"","sources":["../src/console-window.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAU,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"console-window.js","sourceRoot":"","sources":["../src/console-window.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAU,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,OAAO,aAAa;IACH,QAAQ,GAAG,IAAI,GAAG,EAAmC,CAAC;IACzE,WAAW,CAAgE,QAAkB,EAAE,OAAe,EAAE,GAAG,QAAa;QAC5H,IAAI,QAAQ,KAAK,QAAQ,CAAC,KAAK,EAAE;YAC7B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SAC1B;QACD,IAAI,QAAQ,KAAK,QAAQ,CAAC,OAAO,EAAE;YAC/B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACzB;QACD,IAAI,QAAQ,KAAK,QAAQ,CAAC,IAAI,EAAE;YAC5B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,C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AAQ;YACZ,CAAC;YACD,IAAI,EAAE;gBACF,QAAQ;YACZ,CAAC;SACJ,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACjC,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ"}
|
|
@@ -8,9 +8,11 @@ export declare class MonacoLanguageClient extends BaseLanguageClient {
|
|
|
8
8
|
protected createMessageTransports(encoding: string): Promise<MessageTransports>;
|
|
9
9
|
protected getLocale(): string;
|
|
10
10
|
protected registerBuiltinFeatures(): void;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/**
|
|
12
|
+
* These are all contained in BaseLanguageClient#registerBuiltinFeatures but not registered
|
|
13
|
+
* in MonacoLanguageClient. This method is not called!
|
|
14
|
+
*/
|
|
15
|
+
registerNotUsedFeatures(): void;
|
|
14
16
|
}
|
|
15
17
|
export declare namespace MonacoLanguageClient {
|
|
16
18
|
interface Options {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monaco-language-client.d.ts","sourceRoot":"","sources":["../src/monaco-language-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"monaco-language-client.d.ts","sourceRoot":"","sources":["../src/monaco-language-client.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAqC1H,MAAM,WAAW,mBAAmB;IAChC,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACrD;AAED,qBAAa,oBAAqB,SAAQ,kBAAkB;IACxD,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;gBAE/C,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,oBAAoB,CAAC,OAAO;IAsBzF,SAAS,CAAC,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;cAI5D,SAAS,IAAI,MAAM;cAInB,uBAAuB;IA2C1C;;;OAGG;IACI,uBAAuB;CAiBjC;AACD,yBAAiB,oBAAoB,CAAC;IAClC,UAAiB,OAAO;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,aAAa,EAAE,qBAAqB,CAAC;QACrC,kBAAkB,EAAE,mBAAmB,CAAC;KAC3C;CACJ"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2018-2022 TypeFox GmbH (http://www.typefox.io). All rights reserved.
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
|
+
/* eslint-disable @typescript-eslint/dot-notation */
|
|
5
6
|
import { BaseLanguageClient } from 'vscode-languageclient/lib/common/client.js';
|
|
6
7
|
import { ConfigurationFeature, SyncConfigurationFeature } from 'vscode-languageclient/lib/common/configuration.js';
|
|
7
8
|
import { DidChangeTextDocumentFeature, DidCloseTextDocumentFeature, DidOpenTextDocumentFeature, DidSaveTextDocumentFeature, WillSaveFeature, WillSaveWaitUntilFeature } from 'vscode-languageclient/lib/common/textSynchronization.js';
|
|
@@ -30,6 +31,12 @@ import { LinkedEditingFeature } from 'vscode-languageclient/lib/common/linkedEdi
|
|
|
30
31
|
import { InlayHintsFeature } from 'vscode-languageclient/lib/common/inlayHint.js';
|
|
31
32
|
import { DiagnosticFeature } from 'vscode-languageclient/lib/common/diagnostic.js';
|
|
32
33
|
import { ProgressFeature } from 'vscode-languageclient/lib/common/progress.js';
|
|
34
|
+
import { WorkspaceSymbolFeature } from 'vscode-languageclient/lib/common/workspaceSymbol.js';
|
|
35
|
+
import { CallHierarchyFeature } from 'vscode-languageclient/lib/common/callHierarchy.js';
|
|
36
|
+
import { DidCreateFilesFeature, DidDeleteFilesFeature, DidRenameFilesFeature, WillCreateFilesFeature, WillDeleteFilesFeature, WillRenameFilesFeature } from 'vscode-languageclient/lib/common/fileOperations.js';
|
|
37
|
+
import { TypeHierarchyFeature } from 'vscode-languageclient/lib/common/typeHierarchy.js';
|
|
38
|
+
import { InlineValueFeature } from 'vscode-languageclient/lib/common/inlineValue.js';
|
|
39
|
+
import { NotebookDocumentSyncFeature } from 'vscode-languageclient/lib/common/notebook.js';
|
|
33
40
|
export class MonacoLanguageClient extends BaseLanguageClient {
|
|
34
41
|
connectionProvider;
|
|
35
42
|
constructor({ id, name, clientOptions, connectionProvider }) {
|
|
@@ -37,18 +44,14 @@ export class MonacoLanguageClient extends BaseLanguageClient {
|
|
|
37
44
|
this.connectionProvider = connectionProvider;
|
|
38
45
|
// Hack because vscode-language client rejects the whole registration block if one capability registration has no associated client feature registered
|
|
39
46
|
// Some language servers still send the registration even though the client says it doesn't support it
|
|
40
|
-
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
41
47
|
const originalHandleRegistrationRequest = this['handleRegistrationRequest'].bind(this);
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
43
48
|
this['handleRegistrationRequest'] = (params) => {
|
|
44
49
|
originalHandleRegistrationRequest({
|
|
45
50
|
...params,
|
|
46
51
|
registrations: params.registrations.filter(registration => this.getFeature(registration.method) != null)
|
|
47
52
|
});
|
|
48
53
|
};
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
50
54
|
const originalHandleUnregistrationRequest = this['handleUnregistrationRequest'].bind(this);
|
|
51
|
-
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
52
55
|
this['handleUnregistrationRequest'] = (params) => {
|
|
53
56
|
originalHandleUnregistrationRequest({
|
|
54
57
|
...params,
|
|
@@ -63,11 +66,15 @@ export class MonacoLanguageClient extends BaseLanguageClient {
|
|
|
63
66
|
return navigator.language || 'en-US';
|
|
64
67
|
}
|
|
65
68
|
registerBuiltinFeatures() {
|
|
66
|
-
|
|
69
|
+
const pendingFullTextDocumentChanges = new Map();
|
|
70
|
+
this.registerFeature(new ConfigurationFeature(this));
|
|
67
71
|
this.registerFeature(new DidOpenTextDocumentFeature(this, this['_syncedDocuments']));
|
|
68
|
-
this
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
this['_didChangeTextDocumentFeature'] = new DidChangeTextDocumentFeature(this, pendingFullTextDocumentChanges);
|
|
73
|
+
this['_didChangeTextDocumentFeature'].onPendingChangeAdded(() => {
|
|
74
|
+
this['triggerPendingChangeDelivery']();
|
|
75
|
+
});
|
|
76
|
+
this.registerFeature(this['_didChangeTextDocumentFeature']);
|
|
77
|
+
this.registerFeature(new DidCloseTextDocumentFeature(this, this['_syncedDocuments'], pendingFullTextDocumentChanges));
|
|
71
78
|
this.registerFeature(new CompletionItemFeature(this));
|
|
72
79
|
this.registerFeature(new HoverFeature(this));
|
|
73
80
|
this.registerFeature(new SignatureHelpFeature(this));
|
|
@@ -83,6 +90,7 @@ export class MonacoLanguageClient extends BaseLanguageClient {
|
|
|
83
90
|
this.registerFeature(new RenameFeature(this));
|
|
84
91
|
this.registerFeature(new DocumentLinkFeature(this));
|
|
85
92
|
this.registerFeature(new ExecuteCommandFeature(this));
|
|
93
|
+
this.registerFeature(new SyncConfigurationFeature(this));
|
|
86
94
|
this.registerFeature(new TypeDefinitionFeature(this));
|
|
87
95
|
this.registerFeature(new ImplementationFeature(this));
|
|
88
96
|
this.registerFeature(new ColorProviderFeature(this));
|
|
@@ -99,17 +107,26 @@ export class MonacoLanguageClient extends BaseLanguageClient {
|
|
|
99
107
|
this.registerFeature(new InlayHintsFeature(this));
|
|
100
108
|
this.registerFeature(new DiagnosticFeature(this));
|
|
101
109
|
}
|
|
102
|
-
|
|
110
|
+
/**
|
|
111
|
+
* These are all contained in BaseLanguageClient#registerBuiltinFeatures but not registered
|
|
112
|
+
* in MonacoLanguageClient. This method is not called!
|
|
113
|
+
*/
|
|
114
|
+
registerNotUsedFeatures() {
|
|
103
115
|
this.registerFeature(new WillSaveFeature(this));
|
|
104
116
|
this.registerFeature(new WillSaveWaitUntilFeature(this));
|
|
105
117
|
this.registerFeature(new DidSaveTextDocumentFeature(this));
|
|
106
|
-
|
|
107
|
-
registerConfigurationFeatures() {
|
|
108
|
-
this.registerFeature(new ConfigurationFeature(this));
|
|
109
|
-
this.registerFeature(new SyncConfigurationFeature(this));
|
|
110
|
-
}
|
|
111
|
-
registerProgressFeatures() {
|
|
118
|
+
this.registerFeature(new WorkspaceSymbolFeature(this));
|
|
112
119
|
this.registerFeature(new ProgressFeature(this));
|
|
120
|
+
this.registerFeature(new DidCreateFilesFeature(this));
|
|
121
|
+
this.registerFeature(new DidRenameFilesFeature(this));
|
|
122
|
+
this.registerFeature(new DidDeleteFilesFeature(this));
|
|
123
|
+
this.registerFeature(new WillCreateFilesFeature(this));
|
|
124
|
+
this.registerFeature(new WillRenameFilesFeature(this));
|
|
125
|
+
this.registerFeature(new WillDeleteFilesFeature(this));
|
|
126
|
+
this.registerFeature(new CallHierarchyFeature(this));
|
|
127
|
+
this.registerFeature(new TypeHierarchyFeature(this));
|
|
128
|
+
this.registerFeature(new InlineValueFeature(this));
|
|
129
|
+
this.registerFeature(new NotebookDocumentSyncFeature(this));
|
|
113
130
|
}
|
|
114
131
|
}
|
|
115
132
|
//# sourceMappingURL=monaco-language-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monaco-language-client.js","sourceRoot":"","sources":["../src/monaco-language-client.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,kBAAkB,EAA4C,MAAM,4CAA4C,CAAC;AAC1H,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AACnH,OAAO,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,yDAAyD,CAAC;AACvO,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;A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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monaco-languageclient",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Monaco Language client implementation",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TypeFox GmbH ",
|
|
@@ -23,26 +23,12 @@
|
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./lib/index.d.ts",
|
|
25
25
|
"default": "./lib/index.js"
|
|
26
|
-
},
|
|
27
|
-
"./themeRemoteHelper": {
|
|
28
|
-
"types": "./lib/helpers/themeRemoteHelper.d.ts",
|
|
29
|
-
"default": "./lib/helpers/themeRemoteHelper.js"
|
|
30
|
-
},
|
|
31
|
-
"./themeLocalHelper": {
|
|
32
|
-
"types": "./lib/helpers/themeLocalHelper.d.ts",
|
|
33
|
-
"default": "./lib/helpers/themeLocalHelper.js"
|
|
34
26
|
}
|
|
35
27
|
},
|
|
36
28
|
"typesVersions": {
|
|
37
29
|
"*": {
|
|
38
30
|
".": [
|
|
39
31
|
"lib/index.d.ts"
|
|
40
|
-
],
|
|
41
|
-
"themeRemoteHelper": [
|
|
42
|
-
"./lib/helpers/themeRemoteHelper.d.ts"
|
|
43
|
-
],
|
|
44
|
-
"themeLocalHelper": [
|
|
45
|
-
"./lib/helpers/themeLocalHelper.d.ts"
|
|
46
32
|
]
|
|
47
33
|
}
|
|
48
34
|
},
|
|
@@ -51,8 +37,8 @@
|
|
|
51
37
|
"npm": ">=9.0.0"
|
|
52
38
|
},
|
|
53
39
|
"volta": {
|
|
54
|
-
"node": "18.
|
|
55
|
-
"npm": "9.
|
|
40
|
+
"node": "18.15.0",
|
|
41
|
+
"npm": "9.6.2"
|
|
56
42
|
},
|
|
57
43
|
"files": [
|
|
58
44
|
"lib",
|
|
@@ -62,11 +48,11 @@
|
|
|
62
48
|
"License.txt"
|
|
63
49
|
],
|
|
64
50
|
"dependencies": {
|
|
65
|
-
"vscode-jsonrpc": "8.0
|
|
66
|
-
"vscode-languageclient": "8.0
|
|
51
|
+
"vscode-jsonrpc": "~8.1.0",
|
|
52
|
+
"vscode-languageclient": "~8.1.0"
|
|
67
53
|
},
|
|
68
54
|
"peerDependencies": {
|
|
69
|
-
"vscode": "npm:@codingame/monaco-vscode-api
|
|
55
|
+
"vscode": "npm:@codingame/monaco-vscode-api@~1.76.6"
|
|
70
56
|
},
|
|
71
57
|
"scripts": {
|
|
72
58
|
"clean": "npx shx rm -fr lib *.tsbuildinfo",
|
package/src/console-window.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Window, Severity } from 'vscode/services';
|
|
|
6
6
|
import * as vscode from 'vscode';
|
|
7
7
|
|
|
8
8
|
export class ConsoleWindow implements Window {
|
|
9
|
-
protected readonly channels = new Map<string, vscode.
|
|
9
|
+
protected readonly channels = new Map<string, vscode.LogOutputChannel>();
|
|
10
10
|
showMessage<T extends vscode.MessageOptions | string | vscode.MessageItem>(severity: Severity, message: string, ..._actions: T[]): Thenable<T | undefined> {
|
|
11
11
|
if (severity === Severity.Error) {
|
|
12
12
|
console.error(message);
|
|
@@ -23,13 +23,33 @@ export class ConsoleWindow implements Window {
|
|
|
23
23
|
return Promise.resolve(undefined);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
createOutputChannel(name: string
|
|
26
|
+
createOutputChannel(name: string, _options: string | {
|
|
27
|
+
log: true;
|
|
28
|
+
} | undefined): vscode.LogOutputChannel {
|
|
27
29
|
const existing = this.channels.get(name);
|
|
28
30
|
if (existing) {
|
|
29
31
|
return existing;
|
|
30
32
|
}
|
|
31
|
-
|
|
33
|
+
|
|
34
|
+
const channel: vscode.LogOutputChannel = {
|
|
32
35
|
name: 'default',
|
|
36
|
+
logLevel: vscode.LogLevel.Info,
|
|
37
|
+
onDidChangeLogLevel: new vscode.EventEmitter<vscode.LogLevel.Info>().event,
|
|
38
|
+
trace(_message: string, ..._args: any[]): void {
|
|
39
|
+
// no-op
|
|
40
|
+
},
|
|
41
|
+
debug(_message: string, ..._args: any[]): void {
|
|
42
|
+
// no-op
|
|
43
|
+
},
|
|
44
|
+
info(_message: string, ..._args: any[]): void {
|
|
45
|
+
// no-op
|
|
46
|
+
},
|
|
47
|
+
warn(_message: string, ..._args: any[]): void {
|
|
48
|
+
// no-op
|
|
49
|
+
},
|
|
50
|
+
error(_message: string | Error, ..._args: any[]): void {
|
|
51
|
+
// no-op
|
|
52
|
+
},
|
|
33
53
|
append(value: string): void {
|
|
34
54
|
console.log(name + ': ' + value);
|
|
35
55
|
},
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
|
|
6
|
+
/* eslint-disable @typescript-eslint/dot-notation */
|
|
7
|
+
|
|
6
8
|
import { BaseLanguageClient, MessageTransports, LanguageClientOptions } from 'vscode-languageclient/lib/common/client.js';
|
|
7
9
|
import { ConfigurationFeature, SyncConfigurationFeature } from 'vscode-languageclient/lib/common/configuration.js';
|
|
8
10
|
import { DidChangeTextDocumentFeature, DidCloseTextDocumentFeature, DidOpenTextDocumentFeature, DidSaveTextDocumentFeature, WillSaveFeature, WillSaveWaitUntilFeature } from 'vscode-languageclient/lib/common/textSynchronization.js';
|
|
@@ -32,6 +34,13 @@ import { InlayHintsFeature } from 'vscode-languageclient/lib/common/inlayHint.js
|
|
|
32
34
|
import { DiagnosticFeature } from 'vscode-languageclient/lib/common/diagnostic.js';
|
|
33
35
|
import { ProgressFeature } from 'vscode-languageclient/lib/common/progress.js';
|
|
34
36
|
import { RegistrationParams, UnregistrationParams } from 'vscode-languageclient';
|
|
37
|
+
import { TextDocument } from 'vscode';
|
|
38
|
+
import { WorkspaceSymbolFeature } from 'vscode-languageclient/lib/common/workspaceSymbol.js';
|
|
39
|
+
import { CallHierarchyFeature } from 'vscode-languageclient/lib/common/callHierarchy.js';
|
|
40
|
+
import { DidCreateFilesFeature, DidDeleteFilesFeature, DidRenameFilesFeature, WillCreateFilesFeature, WillDeleteFilesFeature, WillRenameFilesFeature } from 'vscode-languageclient/lib/common/fileOperations.js';
|
|
41
|
+
import { TypeHierarchyFeature } from 'vscode-languageclient/lib/common/typeHierarchy.js';
|
|
42
|
+
import { InlineValueFeature } from 'vscode-languageclient/lib/common/inlineValue.js';
|
|
43
|
+
import { NotebookDocumentSyncFeature } from 'vscode-languageclient/lib/common/notebook.js';
|
|
35
44
|
|
|
36
45
|
export interface IConnectionProvider {
|
|
37
46
|
get(encoding: string): Promise<MessageTransports>;
|
|
@@ -46,18 +55,14 @@ export class MonacoLanguageClient extends BaseLanguageClient {
|
|
|
46
55
|
|
|
47
56
|
// Hack because vscode-language client rejects the whole registration block if one capability registration has no associated client feature registered
|
|
48
57
|
// Some language servers still send the registration even though the client says it doesn't support it
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
50
58
|
const originalHandleRegistrationRequest: (params: RegistrationParams) => Promise<void> = this['handleRegistrationRequest'].bind(this);
|
|
51
|
-
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
52
59
|
this['handleRegistrationRequest'] = (params: RegistrationParams) => {
|
|
53
60
|
originalHandleRegistrationRequest({
|
|
54
61
|
...params,
|
|
55
62
|
registrations: params.registrations.filter(registration => this.getFeature(<any>registration.method) != null)
|
|
56
63
|
});
|
|
57
64
|
};
|
|
58
|
-
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
59
65
|
const originalHandleUnregistrationRequest: (params: UnregistrationParams) => Promise<void> = this['handleUnregistrationRequest'].bind(this);
|
|
60
|
-
// eslint-disable-next-line @typescript-eslint/dot-notation
|
|
61
66
|
this['handleUnregistrationRequest'] = (params: UnregistrationParams) => {
|
|
62
67
|
originalHandleUnregistrationRequest({
|
|
63
68
|
...params,
|
|
@@ -70,16 +75,20 @@ export class MonacoLanguageClient extends BaseLanguageClient {
|
|
|
70
75
|
return this.connectionProvider.get(encoding);
|
|
71
76
|
}
|
|
72
77
|
|
|
73
|
-
protected getLocale(): string {
|
|
78
|
+
protected override getLocale(): string {
|
|
74
79
|
return navigator.language || 'en-US';
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
protected override registerBuiltinFeatures() {
|
|
78
|
-
|
|
83
|
+
const pendingFullTextDocumentChanges: Map<string, TextDocument> = new Map();
|
|
84
|
+
this.registerFeature(new ConfigurationFeature(this));
|
|
79
85
|
this.registerFeature(new DidOpenTextDocumentFeature(this, this['_syncedDocuments']));
|
|
80
|
-
this
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
this['_didChangeTextDocumentFeature'] = new DidChangeTextDocumentFeature(this, pendingFullTextDocumentChanges);
|
|
87
|
+
this['_didChangeTextDocumentFeature'].onPendingChangeAdded(() => {
|
|
88
|
+
this['triggerPendingChangeDelivery']();
|
|
89
|
+
});
|
|
90
|
+
this.registerFeature(this['_didChangeTextDocumentFeature']);
|
|
91
|
+
this.registerFeature(new DidCloseTextDocumentFeature(this, this['_syncedDocuments'], pendingFullTextDocumentChanges));
|
|
83
92
|
this.registerFeature(new CompletionItemFeature(this));
|
|
84
93
|
this.registerFeature(new HoverFeature(this));
|
|
85
94
|
this.registerFeature(new SignatureHelpFeature(this));
|
|
@@ -95,6 +104,7 @@ export class MonacoLanguageClient extends BaseLanguageClient {
|
|
|
95
104
|
this.registerFeature(new RenameFeature(this));
|
|
96
105
|
this.registerFeature(new DocumentLinkFeature(this));
|
|
97
106
|
this.registerFeature(new ExecuteCommandFeature(this));
|
|
107
|
+
this.registerFeature(new SyncConfigurationFeature(this));
|
|
98
108
|
this.registerFeature(new TypeDefinitionFeature(this));
|
|
99
109
|
this.registerFeature(new ImplementationFeature(this));
|
|
100
110
|
this.registerFeature(new ColorProviderFeature(this));
|
|
@@ -112,19 +122,26 @@ export class MonacoLanguageClient extends BaseLanguageClient {
|
|
|
112
122
|
this.registerFeature(new DiagnosticFeature(this));
|
|
113
123
|
}
|
|
114
124
|
|
|
115
|
-
|
|
125
|
+
/**
|
|
126
|
+
* These are all contained in BaseLanguageClient#registerBuiltinFeatures but not registered
|
|
127
|
+
* in MonacoLanguageClient. This method is not called!
|
|
128
|
+
*/
|
|
129
|
+
public registerNotUsedFeatures() {
|
|
116
130
|
this.registerFeature(new WillSaveFeature(this));
|
|
117
131
|
this.registerFeature(new WillSaveWaitUntilFeature(this));
|
|
118
132
|
this.registerFeature(new DidSaveTextDocumentFeature(this));
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
public registerConfigurationFeatures() {
|
|
122
|
-
this.registerFeature(new ConfigurationFeature(this));
|
|
123
|
-
this.registerFeature(new SyncConfigurationFeature(this));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
public registerProgressFeatures() {
|
|
133
|
+
this.registerFeature(new WorkspaceSymbolFeature(this));
|
|
127
134
|
this.registerFeature(new ProgressFeature(this));
|
|
135
|
+
this.registerFeature(new DidCreateFilesFeature(this));
|
|
136
|
+
this.registerFeature(new DidRenameFilesFeature(this));
|
|
137
|
+
this.registerFeature(new DidDeleteFilesFeature(this));
|
|
138
|
+
this.registerFeature(new WillCreateFilesFeature(this));
|
|
139
|
+
this.registerFeature(new WillRenameFilesFeature(this));
|
|
140
|
+
this.registerFeature(new WillDeleteFilesFeature(this));
|
|
141
|
+
this.registerFeature(new CallHierarchyFeature(this));
|
|
142
|
+
this.registerFeature(new TypeHierarchyFeature(this));
|
|
143
|
+
this.registerFeature(new InlineValueFeature(this));
|
|
144
|
+
this.registerFeature(new NotebookDocumentSyncFeature(this));
|
|
128
145
|
}
|
|
129
146
|
}
|
|
130
147
|
export namespace MonacoLanguageClient {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themeHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/themeHelper.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) 2018-2022 TypeFox GmbH (http://www.typefox.io). All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
* ------------------------------------------------------------------------------------------ */
|
|
5
|
-
export { fetchRemoteTheme, fetchAllThemesFromGitHub } from './themeRemoteHelper.js';
|
|
6
|
-
export { loadAllDefaultThemes } from './themeLocalHelper.js';
|
|
7
|
-
//# sourceMappingURL=themeHelper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themeHelper.js","sourceRoot":"","sources":["../../src/helpers/themeHelper.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themeLocalHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/themeLocalHelper.ts"],"names":[],"mappings":"AAsEA,eAAO,MAAM,oBAAoB,cAAqB,MAAM,kBAgC3D,CAAC"}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) 2018-2022 TypeFox GmbH (http://www.typefox.io). All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
* ------------------------------------------------------------------------------------------ */
|
|
5
|
-
import { setDefaultThemes } from 'vscode/service-override/theme';
|
|
6
|
-
const createThemesDefintion = () => {
|
|
7
|
-
return [
|
|
8
|
-
{
|
|
9
|
-
id: 'Visual Studio Light',
|
|
10
|
-
label: 'Light (Visual Studio)',
|
|
11
|
-
uiTheme: 'vs-light',
|
|
12
|
-
path: './themes/light_vs.json',
|
|
13
|
-
extension: 'theme-defaults'
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
id: 'Default Light+',
|
|
17
|
-
label: 'Light+ (default light)',
|
|
18
|
-
uiTheme: 'vs-light',
|
|
19
|
-
path: './themes/light_plus.json',
|
|
20
|
-
extension: 'theme-defaults'
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
id: 'Light+ (Experimental)',
|
|
24
|
-
label: 'Light+ (Experimental)',
|
|
25
|
-
uiTheme: 'vs-light',
|
|
26
|
-
path: './themes/light_plus_experimental.json',
|
|
27
|
-
extension: 'theme-defaults'
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: 'Default High Contrast Light',
|
|
31
|
-
label: 'High Contrast Light',
|
|
32
|
-
uiTheme: 'hc-light',
|
|
33
|
-
path: './themes/hc_light.json'
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
id: 'Visual Studio Dark',
|
|
37
|
-
label: 'Dark (Visual Studio)',
|
|
38
|
-
uiTheme: 'vs-dark',
|
|
39
|
-
path: './themes/dark_vs.json',
|
|
40
|
-
extension: 'theme-defaults'
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
id: 'Default Dark+',
|
|
44
|
-
label: 'Dark+ (default dark)',
|
|
45
|
-
uiTheme: 'vs-dark',
|
|
46
|
-
path: './themes/dark_plus.json',
|
|
47
|
-
extension: 'theme-defaults'
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: 'Dark+ (Experimental)',
|
|
51
|
-
label: 'Dark+ (Experimental)',
|
|
52
|
-
uiTheme: 'vs-dark',
|
|
53
|
-
path: './themes/dark_plus_experimental.json',
|
|
54
|
-
extension: 'theme-defaults'
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
id: 'Default High Contrast Dark',
|
|
58
|
-
label: 'High Contrast Dark',
|
|
59
|
-
uiTheme: 'hc-black',
|
|
60
|
-
path: './themes/hc_black.json'
|
|
61
|
-
}
|
|
62
|
-
];
|
|
63
|
-
};
|
|
64
|
-
const fetchLocalTheme = async (url) => {
|
|
65
|
-
const resp = await fetch(url);
|
|
66
|
-
return resp.text();
|
|
67
|
-
};
|
|
68
|
-
export const loadAllDefaultThemes = async (targetDir) => {
|
|
69
|
-
const themeLightVsUrl = new URL(targetDir + '/light_vs.json', window.location.href).href;
|
|
70
|
-
const themeLightPlusUrl = new URL(targetDir + '/light_plus.json', window.location.href).href;
|
|
71
|
-
const themeLightPlusExpUrl = new URL(targetDir + '/light_plus_experimental.json', window.location.href).href;
|
|
72
|
-
const themeLightHcUrl = new URL(targetDir + '/hc_light.json', window.location.href).href;
|
|
73
|
-
const themeDarkVsUrl = new URL(targetDir + '/dark_vs.json', window.location.href).href;
|
|
74
|
-
const themeDarkPlusUrl = new URL(targetDir + '/dark_plus.json', window.location.href).href;
|
|
75
|
-
const themeDarkPlusExpUrl = new URL(targetDir + '/dark_plus_experimental.json', window.location.href).href;
|
|
76
|
-
const themeDarkHcUrl = new URL(targetDir + '/hc_black.json', window.location.href).href;
|
|
77
|
-
setDefaultThemes(createThemesDefintion(), (theme) => {
|
|
78
|
-
switch (theme.path) {
|
|
79
|
-
case './themes/light_vs.json':
|
|
80
|
-
return fetchLocalTheme(themeLightVsUrl);
|
|
81
|
-
case './themes/light_plus.json':
|
|
82
|
-
return fetchLocalTheme(themeLightPlusUrl);
|
|
83
|
-
case './themes/light_plus_experimental.json':
|
|
84
|
-
return fetchLocalTheme(themeLightPlusExpUrl);
|
|
85
|
-
case './themes/hc_light.json':
|
|
86
|
-
return fetchLocalTheme(themeLightHcUrl);
|
|
87
|
-
case './themes/dark_vs.json':
|
|
88
|
-
return fetchLocalTheme(themeDarkVsUrl);
|
|
89
|
-
case './themes/dark_plus.json':
|
|
90
|
-
return fetchLocalTheme(themeDarkPlusUrl);
|
|
91
|
-
case './themes/dark_plus_experimental.json':
|
|
92
|
-
return fetchLocalTheme(themeDarkPlusExpUrl);
|
|
93
|
-
case './themes/hc_dark.json':
|
|
94
|
-
return fetchLocalTheme(themeDarkHcUrl);
|
|
95
|
-
default:
|
|
96
|
-
return Promise.reject(new Error(`Theme ${theme.path} not found`));
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
//# sourceMappingURL=themeLocalHelper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themeLocalHelper.js","sourceRoot":"","sources":["../../src/helpers/themeLocalHelper.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAwB,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEvF,MAAM,qBAAqB,GAAG,GAAG,EAAE;IAC/B,OAAO;QACH;YACI,EAAE,EAAE,qBAAqB;YACzB,KAAK,EAAE,uBAAuB;YAC9B,OAAO,EAAE,UAAU;YACnB,IAAI,EAAE,wBAAwB;YAC9B,SAAS,EAAE,gBAAgB;SAC9B;QACD;YACI,EAAE,EAAE,gBAAgB;YACpB,KAAK,EAAE,wBAAwB;YAC/B,OAAO,EAAE,UAAU;YACnB,IAAI,EAAE,0BAA0B;YAChC,SAAS,EAAE,gBAAgB;SAC9B;QACD;YACI,EAAE,EAAE,uBAAuB;YAC3B,KAAK,EAAE,uBAAuB;YAC9B,OAAO,EAAE,UAAU;YACnB,IAAI,EAAE,uCAAuC;YAC7C,SAAS,EAAE,gBAAgB;SAC9B;QACD;YACI,EAAE,EAAE,6BAA6B;YACjC,KAAK,EAAE,qBAAqB;YAC5B,OAAO,EAAE,UAAU;YACnB,IAAI,EAAE,wBAAwB;SACjC;QACD;YACI,EAAE,EAAE,oBAAoB;YACxB,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE,SAAS;YAClB,IAAI,EAAE,uBAAuB;YAC7B,SAAS,EAAE,gBAAgB;SAC9B;QACD;YACI,EAAE,EAAE,eAAe;YACnB,KAAK,EAAE,sBAAsB;YAC7B,OAAO,EAAE,SAAS;YAClB,IAAI,EAAE,yBAAyB;YAC/B,SAAS,EAAE,gBAAgB;SAC9B;QACD;YACI,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B,QAAe,MAAM,cAAc,MAAM,kBAKrE,CAAC;AAGF,eAAO,MAAM,wBAAwB,cAAqB,MAAM,kBAY/D,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) 2018-2022 TypeFox GmbH (http://www.typefox.io). All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
* ------------------------------------------------------------------------------------------ */
|
|
5
|
-
import { writeFileSync } from 'fs';
|
|
6
|
-
export const fetchRemoteTheme = async (url, targetFile) => {
|
|
7
|
-
const res = await fetch(url);
|
|
8
|
-
res.text().then(x => {
|
|
9
|
-
writeFileSync(targetFile, x);
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
|
-
// re-fectch required themes
|
|
13
|
-
export const fetchAllThemesFromGitHub = async (targetDir) => {
|
|
14
|
-
// light
|
|
15
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/light_vs.json', targetDir + '/light_vs.json');
|
|
16
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/light_plus.json', targetDir + '/light_plus.json');
|
|
17
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/light_plus_experimental.json', targetDir + '/light_plus_experimental.json');
|
|
18
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/hc_light.json', targetDir + '/hc_light.json');
|
|
19
|
-
// dark
|
|
20
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/dark_vs.json', targetDir + '/dark_vs.json');
|
|
21
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/dark_plus.json', targetDir + '/dark_plus.json');
|
|
22
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/dark_plus_experimental.json', targetDir + '/dark_plus_experimental.json');
|
|
23
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/hc_black.json', targetDir + '/hc_black.json');
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=themeRemoteHelper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themeRemoteHelper.js","sourceRoot":"","sources":["../../src/helpers/themeRemoteHelper.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAEnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EAAE,GAAW,EAAE,UAAkB,EAAE,EAAE;IACtE,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,GAAG,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QAChB,aAAa,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,4BAA4B;AAC5B,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,EAAE,SAAiB,EAAE,EAAE;IAChE,QAAQ;IACR,gBAAgB,CAAC,wGAAwG,EAAE,SAAS,GAAG,gBAAgB,CAAC,CAAC;IACzJ,gBAAgB,CAAC,0GAA0G,EAAE,SAAS,GAAG,kBAAkB,CAAC,CAAC;IAC7J,gBAAgB,CAAC,uHAAuH,EAAE,SAAS,GAAG,+BAA+B,CAAC,CAAC;IACvL,gBAAgB,CAAC,wGAAwG,EAAE,SAAS,GAAG,gBAAgB,CAAC,CAAC;IAEzJ,OAAO;IACP,gBAAgB,CAAC,uGAAuG,EAAE,SAAS,GAAG,eAAe,CAAC,CAAC;IACvJ,gBAAgB,CAAC,yGAAyG,EAAE,SAAS,GAAG,iBAAiB,CAAC,CAAC;IAC3J,gBAAgB,CAAC,sHAAsH,EAAE,SAAS,GAAG,8BAA8B,CAAC,CAAC;IACrL,gBAAgB,CAAC,wGAAwG,EAAE,SAAS,GAAG,gBAAgB,CAAC,CAAC;AAC7J,CAAC,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) 2018-2022 TypeFox GmbH (http://www.typefox.io). All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
* ------------------------------------------------------------------------------------------ */
|
|
5
|
-
export { fetchRemoteTheme, fetchAllThemesFromGitHub } from './themeRemoteHelper.js';
|
|
6
|
-
export { loadAllDefaultThemes } from './themeLocalHelper.js';
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) 2018-2022 TypeFox GmbH (http://www.typefox.io). All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
* ------------------------------------------------------------------------------------------ */
|
|
5
|
-
import { IThemeExtensionPoint, setDefaultThemes } from 'vscode/service-override/theme';
|
|
6
|
-
|
|
7
|
-
const createThemesDefintion = () => {
|
|
8
|
-
return [
|
|
9
|
-
{
|
|
10
|
-
id: 'Visual Studio Light',
|
|
11
|
-
label: 'Light (Visual Studio)',
|
|
12
|
-
uiTheme: 'vs-light',
|
|
13
|
-
path: './themes/light_vs.json',
|
|
14
|
-
extension: 'theme-defaults'
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
id: 'Default Light+',
|
|
18
|
-
label: 'Light+ (default light)',
|
|
19
|
-
uiTheme: 'vs-light',
|
|
20
|
-
path: './themes/light_plus.json',
|
|
21
|
-
extension: 'theme-defaults'
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
id: 'Light+ (Experimental)',
|
|
25
|
-
label: 'Light+ (Experimental)',
|
|
26
|
-
uiTheme: 'vs-light',
|
|
27
|
-
path: './themes/light_plus_experimental.json',
|
|
28
|
-
extension: 'theme-defaults'
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: 'Default High Contrast Light',
|
|
32
|
-
label: 'High Contrast Light',
|
|
33
|
-
uiTheme: 'hc-light',
|
|
34
|
-
path: './themes/hc_light.json'
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: 'Visual Studio Dark',
|
|
38
|
-
label: 'Dark (Visual Studio)',
|
|
39
|
-
uiTheme: 'vs-dark',
|
|
40
|
-
path: './themes/dark_vs.json',
|
|
41
|
-
extension: 'theme-defaults'
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: 'Default Dark+',
|
|
45
|
-
label: 'Dark+ (default dark)',
|
|
46
|
-
uiTheme: 'vs-dark',
|
|
47
|
-
path: './themes/dark_plus.json',
|
|
48
|
-
extension: 'theme-defaults'
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: 'Dark+ (Experimental)',
|
|
52
|
-
label: 'Dark+ (Experimental)',
|
|
53
|
-
uiTheme: 'vs-dark',
|
|
54
|
-
path: './themes/dark_plus_experimental.json',
|
|
55
|
-
extension: 'theme-defaults'
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
id: 'Default High Contrast Dark',
|
|
59
|
-
label: 'High Contrast Dark',
|
|
60
|
-
uiTheme: 'hc-black',
|
|
61
|
-
path: './themes/hc_black.json'
|
|
62
|
-
}
|
|
63
|
-
] as IThemeExtensionPoint[];
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const fetchLocalTheme = async (url: string) => {
|
|
67
|
-
const resp = await fetch(url);
|
|
68
|
-
return resp.text();
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export const loadAllDefaultThemes = async (targetDir: string) => {
|
|
72
|
-
const themeLightVsUrl = new URL(targetDir + '/light_vs.json', window.location.href).href;
|
|
73
|
-
const themeLightPlusUrl = new URL(targetDir + '/light_plus.json', window.location.href).href;
|
|
74
|
-
const themeLightPlusExpUrl = new URL(targetDir + '/light_plus_experimental.json', window.location.href).href;
|
|
75
|
-
const themeLightHcUrl = new URL(targetDir + '/hc_light.json', window.location.href).href;
|
|
76
|
-
const themeDarkVsUrl = new URL(targetDir + '/dark_vs.json', window.location.href).href;
|
|
77
|
-
const themeDarkPlusUrl = new URL(targetDir + '/dark_plus.json', window.location.href).href;
|
|
78
|
-
const themeDarkPlusExpUrl = new URL(targetDir + '/dark_plus_experimental.json', window.location.href).href;
|
|
79
|
-
const themeDarkHcUrl = new URL(targetDir + '/hc_black.json', window.location.href).href;
|
|
80
|
-
|
|
81
|
-
setDefaultThemes(createThemesDefintion(), (theme) => {
|
|
82
|
-
switch (theme.path) {
|
|
83
|
-
case './themes/light_vs.json':
|
|
84
|
-
return fetchLocalTheme(themeLightVsUrl);
|
|
85
|
-
case './themes/light_plus.json':
|
|
86
|
-
return fetchLocalTheme(themeLightPlusUrl);
|
|
87
|
-
case './themes/light_plus_experimental.json':
|
|
88
|
-
return fetchLocalTheme(themeLightPlusExpUrl);
|
|
89
|
-
case './themes/hc_light.json':
|
|
90
|
-
return fetchLocalTheme(themeLightHcUrl);
|
|
91
|
-
case './themes/dark_vs.json':
|
|
92
|
-
return fetchLocalTheme(themeDarkVsUrl);
|
|
93
|
-
case './themes/dark_plus.json':
|
|
94
|
-
return fetchLocalTheme(themeDarkPlusUrl);
|
|
95
|
-
case './themes/dark_plus_experimental.json':
|
|
96
|
-
return fetchLocalTheme(themeDarkPlusExpUrl);
|
|
97
|
-
case './themes/hc_dark.json':
|
|
98
|
-
return fetchLocalTheme(themeDarkHcUrl);
|
|
99
|
-
default:
|
|
100
|
-
return Promise.reject(new Error(`Theme ${theme.path} not found`));
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) 2018-2022 TypeFox GmbH (http://www.typefox.io). All rights reserved.
|
|
3
|
-
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
-
* ------------------------------------------------------------------------------------------ */
|
|
5
|
-
import { writeFileSync } from 'fs';
|
|
6
|
-
|
|
7
|
-
export const fetchRemoteTheme = async (url: string, targetFile: string) => {
|
|
8
|
-
const res = await fetch(url);
|
|
9
|
-
res.text().then(x => {
|
|
10
|
-
writeFileSync(targetFile, x);
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
// re-fectch required themes
|
|
15
|
-
export const fetchAllThemesFromGitHub = async (targetDir: string) => {
|
|
16
|
-
// light
|
|
17
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/light_vs.json', targetDir + '/light_vs.json');
|
|
18
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/light_plus.json', targetDir + '/light_plus.json');
|
|
19
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/light_plus_experimental.json', targetDir + '/light_plus_experimental.json');
|
|
20
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/hc_light.json', targetDir + '/hc_light.json');
|
|
21
|
-
|
|
22
|
-
// dark
|
|
23
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/dark_vs.json', targetDir + '/dark_vs.json');
|
|
24
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/dark_plus.json', targetDir + '/dark_plus.json');
|
|
25
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/dark_plus_experimental.json', targetDir + '/dark_plus_experimental.json');
|
|
26
|
-
fetchRemoteTheme('https://raw.githubusercontent.com/microsoft/vscode/main/extensions/theme-defaults/themes/hc_black.json', targetDir + '/hc_black.json');
|
|
27
|
-
};
|