diff --git a/package-lock.json b/package-lock.json index 87c5db8..8c3b0a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "smithy-vscode-extension", - "version": "0.5.4", + "version": "0.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "smithy-vscode-extension", - "version": "0.5.4", + "version": "0.6.0", "license": "Apache-2.0", "dependencies": { "follow-redirects": "^1.15.6", @@ -259,15 +259,16 @@ } }, "node_modules/@vscode/vsce": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.22.0.tgz", - "integrity": "sha512-8df4uJiM3C6GZ2Sx/KilSKVxsetrTBBIUb3c0W4B1EWHcddioVs5mkyDKtMNP0khP/xBILVSzlXxhV+nm2rC9A==", + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.23.0.tgz", + "integrity": "sha512-Wf9yN8feZf4XmUW/erXyKQvCL577u72AQv4AI4Cwt5o5NyE49C5mpfw3pN78BJYYG3qnSIxwRo7JPvEurkQuNA==", "dev": true, "dependencies": { "azure-devops-node-api": "^11.0.1", "chalk": "^2.4.2", "cheerio": "^1.0.0-rc.9", "commander": "^6.2.1", + "find-yarn-workspace-root": "^2.0.0", "glob": "^7.0.6", "hosted-git-info": "^4.0.2", "jsonc-parser": "^3.2.0", @@ -1535,6 +1536,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "dev": true, + "dependencies": { + "micromatch": "^4.0.2" + } + }, "node_modules/flat": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", diff --git a/package.json b/package.json index a991a53..1f4daf0 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,6 @@ "Programming Languages", "Snippets" ], - "activationEvents": [ - "onLanguage:smithy", - "onCommand:smithy.runSelector" - ], "main": "./out/src/extension", "preview": true, "contributes": { @@ -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." } } } diff --git a/src/extension.ts b/src/extension.ts index 2d7f4f6..d17bc9f 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -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", @@ -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, }; }