modern-monaco 0.3.0 → 0.3.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/dist/core.mjs
CHANGED
|
@@ -40,7 +40,7 @@ function isObject(v) {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// package.json
|
|
43
|
-
var version = "0.3.
|
|
43
|
+
var version = "0.3.1";
|
|
44
44
|
|
|
45
45
|
// src/core.ts
|
|
46
46
|
import { getExtnameFromLanguageId, getLanguageIdFromPath, grammars, initShiki, setDefaultWasmLoader, themes } from "./shiki.mjs";
|
|
@@ -49,7 +49,6 @@ import { render } from "./shiki.mjs";
|
|
|
49
49
|
import { getWasmInstance } from "./shiki-wasm.mjs";
|
|
50
50
|
import { NotFoundError, Workspace } from "./workspace.mjs";
|
|
51
51
|
import { debunce, decode, getCDNUrl, isDigital } from "./util.mjs";
|
|
52
|
-
import { init as initLspClient } from "./lsp/client.mjs";
|
|
53
52
|
var editorProps = [
|
|
54
53
|
"autoDetectHighContrast",
|
|
55
54
|
"automaticLayout",
|
|
@@ -351,9 +350,6 @@ async function loadMonaco(highlighter, workspace, lsp, cdn) {
|
|
|
351
350
|
]);
|
|
352
351
|
const allLspProviders = { ...builtinLSPProviders, ...lspProviders, ...lsp?.providers };
|
|
353
352
|
workspace?.setupMonaco(monaco);
|
|
354
|
-
if (Object.keys(allLspProviders).length > 0) {
|
|
355
|
-
initLspClient(monaco);
|
|
356
|
-
}
|
|
357
353
|
if (!document.getElementById("monaco-editor-core-css")) {
|
|
358
354
|
const styleEl = document.createElement("style");
|
|
359
355
|
styleEl.id = "monaco-editor-core-css";
|
package/dist/lsp/css/setup.mjs
CHANGED
|
@@ -24,6 +24,7 @@ async function setup(monaco, languageId, languageSettings, formattingOptions, wo
|
|
|
24
24
|
worker: getWorker(createData),
|
|
25
25
|
host: client.createHost(workspace)
|
|
26
26
|
});
|
|
27
|
+
client.init(monaco);
|
|
27
28
|
client.registerBasicFeatures(languageId, worker, ["/", "-", ":", "("], workspace);
|
|
28
29
|
client.registerCodeAction(languageId, worker);
|
|
29
30
|
client.registerColorPresentation(languageId, worker);
|
package/dist/lsp/html/setup.mjs
CHANGED
|
@@ -33,6 +33,7 @@ async function setup(monaco, languageId, languageSettings, formattingOptions, wo
|
|
|
33
33
|
host: client.createHost(workspace)
|
|
34
34
|
});
|
|
35
35
|
const workerWithEmbeddedLanguages = client.createWorkerWithEmbeddedLanguages(htmlWorker);
|
|
36
|
+
client.init(monaco);
|
|
36
37
|
client.registerEmbedded(languageId, workerWithEmbeddedLanguages, ["css", "javascript", "importmap"]);
|
|
37
38
|
client.registerBasicFeatures(languageId, workerWithEmbeddedLanguages, ["<", "/", "=", '"'], workspace);
|
|
38
39
|
client.registerAutoComplete(languageId, workerWithEmbeddedLanguages, [">", "/", "="]);
|
package/dist/lsp/json/setup.mjs
CHANGED
|
@@ -151,6 +151,7 @@ async function setup(monaco, languageId, languageSettings, formattingOptions, wo
|
|
|
151
151
|
resetSchema(event.model.uri);
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
|
+
client.init(monaco);
|
|
154
155
|
client.registerBasicFeatures(languageId, worker, [" ", ":", '"'], workspace);
|
|
155
156
|
client.registerColorPresentation(languageId, worker);
|
|
156
157
|
client.registerDocumentLinks(languageId, worker);
|
|
@@ -104,6 +104,7 @@ async function setup(monaco, languageId, languageSettings, formattingOptions, wo
|
|
|
104
104
|
if (worker instanceof Promise) {
|
|
105
105
|
worker = await worker;
|
|
106
106
|
}
|
|
107
|
+
client.init(monaco);
|
|
107
108
|
client.registerBasicFeatures(languageId, worker, [".", "/", '"', "'", "<"], workspace);
|
|
108
109
|
client.registerAutoComplete(languageId, worker, [">", "/"]);
|
|
109
110
|
client.registerSignatureHelp(languageId, worker, ["(", ","]);
|