mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 08:42:53 +02:00
allow json (#1137)
Allow creating .json files. Also added the json language server so syntax highlighting and validation works with the ingame editor
This commit is contained in:
@@ -60,6 +60,12 @@ export class ScriptEditor {
|
||||
const source = (libSource + "").replace(/export /g, "");
|
||||
monaco.languages.typescript.javascriptDefaults.addExtraLib(source, "netscript.d.ts");
|
||||
monaco.languages.typescript.typescriptDefaults.addExtraLib(source, "netscript.d.ts");
|
||||
monaco.languages.json.jsonDefaults.setModeConfiguration({
|
||||
...monaco.languages.json.jsonDefaults.modeConfiguration,
|
||||
//completion should be disabled because the
|
||||
//json language server tries to load a schema by default
|
||||
completionItems: false,
|
||||
});
|
||||
// Load themes
|
||||
loadThemes(monaco.editor.defineTheme);
|
||||
sanitizeTheme(Settings.EditorTheme);
|
||||
|
||||
Reference in New Issue
Block a user