Skip to content

Commit

Permalink
Upgrade language server version
Browse files Browse the repository at this point in the history
To go along with the changes in the language server 0.4.0:
https://github.com/smithy-lang/smithy-language-server/blob/main/CHANGELOG.md#040-2024-07-30,
this commit also:
- updates coursier to use java 21 to run the server
- adds config options diagnostics.minimumSeverity, onlyReloadOnSave
- removes config option for logToFile
  • Loading branch information
milesziemer committed Jul 30, 2024
1 parent cece632 commit cb74bcd
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 22 deletions.
20 changes: 15 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 20 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
"Programming Languages",
"Snippets"
],
"activationEvents": [
"onLanguage:smithy",
"onCommand:smithy.runSelector"
],
"main": "./out/src/extension",
"preview": true,
"contributes": {
Expand Down Expand Up @@ -106,25 +102,33 @@
"default": "verbose",
"description": "Traces the communication between VS Code and the language server."
},
"smithyLsp.logToFile": {
"scope": "window",
"type": "string",
"enum": [
"enabled",
"disabled"
],
"default": "disabled",
"description": "Writes additional logging to .smithy.lsp.log file in workspace."
},
"smithyLsp.version": {
"scope": "window",
"type": "string",
"default": "0.2.4",
"description": "Version of the Smithy LSP (see https://github.com/smithy-lang/smithy-language-server)"
"default": "0.4.0",
"description": "Version of the Smithy Language Server (see https://github.com/smithy-lang/smithy-language-server)."
},
"smithyLsp.rootPath": {
"scope": "resource",
"type": "string"
},
"smithyLsp.diagnostics.minimumSeverity": {
"scope": "window",
"type": "string",
"enum": [
"NOTE",
"WARNING",
"DANGER",
"ERROR"
],
"default": "WARNING",
"description": "Minimum severity of Smithy validation events to display in the editor."
},
"smithyLsp.onlyReloadOnSave": {
"scope": "window",
"type": "boolean",
"default": false,
"description": "Whether to only re-load the Smithy model on save. Use this if the server feels slow as you type."
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ export function activate(context: vscode.ExtensionContext) {
let launchargs = [
"launch",
"software.amazon.smithy:smithy-language-server:" + version,
"--jvm",
"21",
"-r",
"m2local",
"-M",
Expand Down Expand Up @@ -179,11 +181,13 @@ function getClientOptions(): LanguageClientOptions {
workspaceFolder,

initializationOptions: {
logToFile: vscode.workspace.getConfiguration("smithyLsp").get("logToFile", "disabled"),
"diagnostics.minimumSeverity": vscode.workspace.getConfiguration("smithyLsp").get("diagnostics.minimumSeverity"),
onlyReloadOnSave: vscode.workspace.getConfiguration("smithyLsp").get("onlyReloadOnSave"),
},

// Don't switch to output window when the server returns output.
revealOutputChannelOn: RevealOutputChannelOn.Never,
progressOnInitialization: true,
};
}

Expand Down

0 comments on commit cb74bcd

Please sign in to comment.