Skip to content

Commit

Permalink
1.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
robb-j committed Jul 18, 2024
1 parent c1e7005 commit 8fbd60c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 27 deletions.
49 changes: 23 additions & 26 deletions yaml.novaextension/Scripts/main.dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ var YamlLanguageServer = class {
const packageDir = nova.inDevMode() ? nova.extension.path : nova.extension.globalStoragePath;
const isInstalled = yield this.installPackages(packageDir);
if (!isInstalled) return;
const serverOptions = yield this.getServerOptions(
const serverOptions = this.getServerOptions(
nodePath,
packageDir,
DEBUG_LOGS ? nova.workspace.path : null
Expand Down Expand Up @@ -349,37 +349,34 @@ var YamlLanguageServer = class {
}
startLanguageServer(client) {
return __async(this, null, function* () {
let some = client.start();
debug3("start", some);
client.start();
});
}
getServerOptions(nodePath, packageDir, debugPath) {
return __async(this, null, function* () {
const nodeArgs = ["--unhandled-rejections=warn", "--trace-warnings"];
const serverPath = nova.path.join(
packageDir,
"node_modules/yaml-language-server/out/server/src/server.js"
);
if (DEBUG_INSPECT) {
nodeArgs.push("--inspect-brk=9231", "--trace-warnings");
}
if (debugPath) {
const stdinLog = nova.path.join(debugPath, "stdin.log");
const stdoutLog = nova.path.join(debugPath, "stdout.log");
const args = nodeArgs.join(" ");
const command = `${nodePath} ${args} "${serverPath}" --stdio`;
return {
type: "stdio",
path: "/bin/sh",
args: ["-c", `tee "${stdinLog}" | ${command} | tee "${stdoutLog}"`]
};
}
const nodeArgs = ["--unhandled-rejections=warn", "--trace-warnings"];
const serverPath = nova.path.join(
packageDir,
"node_modules/yaml-language-server/out/server/src/server.js"
);
if (DEBUG_INSPECT) {
nodeArgs.push("--inspect-brk=9231", "--trace-warnings");
}
if (debugPath) {
const stdinLog = nova.path.join(debugPath, "stdin.log");
const stdoutLog = nova.path.join(debugPath, "stdout.log");
const args = nodeArgs.join(" ");
const command = `${nodePath} ${args} "${serverPath}" --stdio`;
return {
type: "stdio",
path: nodePath,
args: [...nodeArgs, serverPath, "--stdio"]
path: "/bin/sh",
args: ["-c", `tee "${stdinLog}" | ${command} | tee "${stdoutLog}"`]
};
});
}
return {
type: "stdio",
path: nodePath,
args: [...nodeArgs, serverPath, "--stdio"]
};
}
};

Expand Down
2 changes: 1 addition & 1 deletion yaml.novaextension/extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "YAML",
"organization": "robb-j",
"description": "YAML validation based on JSON schemas, including kubernetes",
"version": "1.4.4",
"version": "1.4.5",
"categories": ["completions", "languages", "issues"],
"license": "MIT",
"repository": "https://github.com/robb-j/nova-yaml",
Expand Down

0 comments on commit 8fbd60c

Please sign in to comment.