@rohal12/spindle-lsp 0.8.3 → 0.8.4
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/bin.js +9 -3
- package/dist/bin.js.map +2 -2
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -59707,7 +59707,7 @@ function startServer(_args) {
|
|
|
59707
59707
|
connection.onInitialize((params) => {
|
|
59708
59708
|
console.error("[spindle-lsp] onInitialize called");
|
|
59709
59709
|
const initOptions = params.initializationOptions ?? {};
|
|
59710
|
-
workspaceRoot = initOptions.workspaceRoot ?? (params.workspaceFolders?.[0]?.uri ? uriToFsPath(params.workspaceFolders[0].uri) : void 0);
|
|
59710
|
+
workspaceRoot = initOptions.workspaceRoot ?? (params.workspaceFolders?.[0]?.uri ? uriToFsPath(params.workspaceFolders[0].uri) : void 0) ?? (params.rootUri ? uriToFsPath(params.rootUri) : void 0);
|
|
59711
59711
|
const projectConfig = workspaceRoot ? loadConfigFromDisk(workspaceRoot) : { macros: {} };
|
|
59712
59712
|
const config2 = {
|
|
59713
59713
|
disabledPlugins: initOptions.disabledPlugins,
|
|
@@ -59783,7 +59783,13 @@ function startServer(_args) {
|
|
|
59783
59783
|
connection.onDidCloseTextDocument(({ textDocument }) => {
|
|
59784
59784
|
documents.delete(textDocument.uri);
|
|
59785
59785
|
if (workspace) {
|
|
59786
|
-
|
|
59786
|
+
try {
|
|
59787
|
+
const fsPath = uriToFsPath(textDocument.uri);
|
|
59788
|
+
const text = readFileSync7(fsPath, "utf-8");
|
|
59789
|
+
workspace.documents.update(textDocument.uri, text);
|
|
59790
|
+
} catch {
|
|
59791
|
+
workspace.documents.close(textDocument.uri);
|
|
59792
|
+
}
|
|
59787
59793
|
}
|
|
59788
59794
|
});
|
|
59789
59795
|
connection.onDidChangeWatchedFiles(({ changes }) => {
|
|
@@ -59852,7 +59858,7 @@ var init_server4 = __esm({
|
|
|
59852
59858
|
|
|
59853
59859
|
// src/bin.ts
|
|
59854
59860
|
var args = process.argv.slice(2);
|
|
59855
|
-
var VERSION = "0.8.
|
|
59861
|
+
var VERSION = "0.8.4";
|
|
59856
59862
|
var HELP = `spindle-lsp v${VERSION}
|
|
59857
59863
|
Language Server Protocol server for Spindle story format
|
|
59858
59864
|
|