mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-24 10:12:53 +02:00
EDITOR: Add file URI's to monaco to improve intellisense (#1017)
This commit is contained in:
@@ -191,7 +191,14 @@ function Root(props: IProps): React.ReactElement {
|
||||
code,
|
||||
props.hostname,
|
||||
new monaco.Position(0, 0),
|
||||
monaco.editor.createModel(code, filename.endsWith(".txt") ? "plaintext" : "javascript"),
|
||||
monaco.editor.createModel(
|
||||
code,
|
||||
filename.endsWith(".txt") ? "plaintext" : "javascript",
|
||||
monaco.Uri.from({
|
||||
scheme: "file",
|
||||
path: `${props.hostname}/${filename}`,
|
||||
}),
|
||||
),
|
||||
);
|
||||
openScripts.push(newScript);
|
||||
currentScript = newScript;
|
||||
|
||||
Reference in New Issue
Block a user