diff --git a/.vscode/launch.json b/.vscode/launch.json index 95fb50d..ed3ac30 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,7 +7,10 @@ "request": "launch", "name": "Launch Client", "runtimeExecutable": "${execPath}", - "args": ["--extensionDevelopmentPath=${workspaceRoot}"], + "args": [ + "--extensionDevelopmentPath=${workspaceRoot}", + "--disable-extensions" + ], "preLaunchTask": { "type": "npm", "script": "compile" @@ -21,8 +24,12 @@ "args": [ "--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/client/out/test/index", - "${workspaceRoot}/client/testFixture" - ] + "${workspaceRoot}/client/src/test/testFixture" + ], + "preLaunchTask": { + "type": "npm", + "script": "compile:tests" + } } ] -} +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 940998a..eab6f7d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,5 +6,8 @@ "source.fixAll.eslint": "explicit" }, "editor.formatOnSave": true, - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", + "[jsonc]": { + "editor.defaultFormatter": "vscode.json-language-features" + } } \ No newline at end of file diff --git a/client/src/test/helper.ts b/client/src/test/helper.ts index 6e6724d..9ae12ad 100644 --- a/client/src/test/helper.ts +++ b/client/src/test/helper.ts @@ -16,7 +16,7 @@ export let platformEol: string; */ export async function activate(docUri: vscode.Uri) { // The extensionId is `publisher.name` from package.json - const ext = vscode.extensions.getExtension('vscode-samples.lsp-sample')!; + const ext = vscode.extensions.getExtension('TheNuProjectContributors.vscode-nushell-lang')!; await ext.activate(); try { doc = await vscode.workspace.openTextDocument(docUri); diff --git a/client/src/test/testFixture/sample.nu b/client/src/test/testFixture/sample.nu new file mode 100644 index 0000000..60743ed --- /dev/null +++ b/client/src/test/testFixture/sample.nu @@ -0,0 +1 @@ +something; something = "nothing" \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 16f0eb8..b53baa0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-nushell-lang", - "version": "1.7.1", + "version": "1.9.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vscode-nushell-lang", - "version": "1.7.1", + "version": "1.9.0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 23d608a..9dfa305 100644 --- a/package.json +++ b/package.json @@ -23,9 +23,7 @@ "Programming Languages", "Snippets" ], - "activationEvents": [ - "onTerminalProfile:nushell_default" - ], + "activationEvents": [], "main": "out/client/src/extension.js", "contributes": { "languages": [ @@ -139,6 +137,7 @@ "install": "cd server && npm install && cd ../client && npm install && cd ..", "watch": "npm run esbuild-base -- --sourcemap --watch", "lint": "npx eslint ./client/src ./server/src --ext .ts,.tsx", + "compile:tests": "tsc -b", "test": "sh ./scripts/e2e.sh" }, "dependencies": { @@ -173,4 +172,4 @@ "color": "#008000", "theme": "light" } -} +} \ No newline at end of file