diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 1774cbfc..4b552669 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -23,6 +23,4 @@ If applicable, add screenshots to help explain your problem. **Versions** -vscode: xxx -deno: xxx -extension: xxx +vscode: xxx deno: xxx extension: xxx diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 1991aebb..702378df 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -5,7 +5,8 @@ about: Suggest an idea for this project **Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] +A clear and concise description of what the problem is. Ex. I'm always +frustrated when [...] **Describe the solution you'd like** diff --git a/.vscode/launch.json b/.vscode/launch.json index b5641454..91a1dade 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,22 +1,22 @@ // A launch configuration that compiles the extension and then opens it inside a new window { - "version": "0.2.0", - "configurations": [ - { - "type": "extensionHost", - "request": "launch", - "name": "Launch Client", - "runtimeExecutable": "${execPath}", - "args": [ - "--extensionDevelopmentPath=${workspaceRoot}" - ], - "outFiles": [ - "${workspaceRoot}/client/out/**/*.js" - ], - "preLaunchTask": { - "type": "npm", - "script": "watch" - } - } - ] -} \ No newline at end of file + "version": "0.2.0", + "configurations": [ + { + "type": "extensionHost", + "request": "launch", + "name": "Launch Client", + "runtimeExecutable": "${execPath}", + "args": [ + "--extensionDevelopmentPath=${workspaceRoot}" + ], + "outFiles": [ + "${workspaceRoot}/client/out/**/*.js" + ], + "preLaunchTask": { + "type": "npm", + "script": "watch" + } + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 388412c1..aab6953f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { - "editor.insertSpaces": false, - "typescript.tsc.autoDetect": "off", - "typescript.tsdk": "./node_modules/typescript/lib", - "typescript.preferences.quoteStyle": "double", -} \ No newline at end of file + "editor.insertSpaces": false, + "typescript.tsc.autoDetect": "off", + "typescript.tsdk": "./node_modules/typescript/lib", + "typescript.preferences.quoteStyle": "double" +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 5efd8048..f129682c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,33 +1,33 @@ { - "version": "2.0.0", - "tasks": [ - { - "type": "npm", - "script": "compile", - "group": "build", - "presentation": { - "panel": "dedicated", - "reveal": "never" - }, - "problemMatcher": [ - "$tsc" - ] - }, - { - "type": "npm", - "script": "watch", - "isBackground": true, - "group": { - "kind": "build", - "isDefault": true - }, - "presentation": { - "panel": "dedicated", - "reveal": "never" - }, - "problemMatcher": [ - "$tsc-watch" - ] - } - ] -} \ No newline at end of file + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "compile", + "group": "build", + "presentation": { + "panel": "dedicated", + "reveal": "never" + }, + "problemMatcher": [ + "$tsc" + ] + }, + { + "type": "npm", + "script": "watch", + "isBackground": true, + "group": { + "kind": "build", + "isDefault": true + }, + "presentation": { + "panel": "dedicated", + "reveal": "never" + }, + "problemMatcher": [ + "$tsc-watch" + ] + } + ] +} diff --git a/README.md b/README.md index dad26b7a..87f274a6 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,8 @@ extension has the following configuration options: either be relative to the workspace, or an absolute path. _string, default `null`, examples: `./import_map.json`, `/path/to/import_map.json`, `C:\path\to\import_map.json`_ +- `deno.internalDebug`: If enabled the Deno Language Server will log additional + internal diagnostic information. - `deno.lint`: Controls if linting information will be provided by the Deno Language Server. _boolean, default `false`_ - `deno.suggest.imports.hosts`: A map of domain hosts (origins) that are used diff --git a/client/src/extension.ts b/client/src/extension.ts index 93447c23..e31862ac 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -60,6 +60,7 @@ const workspaceSettingsKeys: Array = [ "codeLens", "config", "importMap", + "internalDebug", "lint", "suggest", "unstable", diff --git a/client/src/interfaces.d.ts b/client/src/interfaces.d.ts index 8895863a..ee3345a8 100644 --- a/client/src/interfaces.d.ts +++ b/client/src/interfaces.d.ts @@ -24,6 +24,9 @@ export interface Settings { enable: boolean; /** A path to an import map that should be applied. */ importMap: string | null; + /** A flag that enables additional internal debug information to be printed + * to the _Deno Language Server_ output. */ + internalDebug: boolean; /** Determine if the extension should be providing linting diagnostics. */ lint: boolean; suggest: { diff --git a/client/tsconfig.json b/client/tsconfig.json index 203b9381..659d53d6 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -8,7 +8,7 @@ "outDir": "out", "rootDir": "src", "sourceMap": true, - "strict": true, + "strict": true }, "include": [ "src" @@ -17,4 +17,4 @@ "node_modules", ".vscode-test" ] -} \ No newline at end of file +} diff --git a/media/welcome.js b/media/welcome.js index e2895d09..425d9f21 100644 --- a/media/welcome.js +++ b/media/welcome.js @@ -1,13 +1,13 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. (function () { - const vscode = acquireVsCodeApi(); + const vscode = acquireVsCodeApi(); - const commands = document.querySelectorAll('.Command'); - for (const command of commands) { - const msg = JSON.parse(JSON.stringify(command.dataset)); - command.addEventListener("click", () => { - vscode.postMessage(msg); - }); - } + const commands = document.querySelectorAll(".Command"); + for (const command of commands) { + const msg = JSON.parse(JSON.stringify(command.dataset)); + command.addEventListener("click", () => { + vscode.postMessage(msg); + }); + } }()); diff --git a/package.json b/package.json index f9d9b2ad..71c96e8e 100644 --- a/package.json +++ b/package.json @@ -258,6 +258,16 @@ true, false ] + }, + "deno.internalDebug": { + "type": "boolean", + "default": false, + "markdownDescription": "Determines if the internal debugging information for the Deno language server will be logged to the _Deno Language Server_ console.", + "scope": "window", + "examples": [ + true, + false + ] } } }, @@ -284,7 +294,7 @@ "scripts": { "vscode:prepublish": "npm run compile", "compile": "tsc -b", - "fmt": "deno fmt client/src typescript-deno-plugin/src docs README.md CHANGELOG.md", + "fmt": "deno fmt .vscode .github client/src media typescript-deno-plugin/src typescript-deno-plugin/*.md docs package.json tsconfig.json README.md CHANGELOG.md", "lint": "deno lint --unstable client/src typescript-deno-plugin/src docs", "watch": "tsc -b -w", "postinstall": "cd typescript-deno-plugin && npm i && cd ../client && npm i && cd .." diff --git a/schemas/deno-import-intellisense.schema.json b/schemas/deno-import-intellisense.schema.json index 83a0e898..7b4622f0 100644 --- a/schemas/deno-import-intellisense.schema.json +++ b/schemas/deno-import-intellisense.schema.json @@ -79,4 +79,4 @@ } } } -} \ No newline at end of file +} diff --git a/schemas/import_map.schema.json b/schemas/import_map.schema.json index 251d1926..b4865f0c 100644 --- a/schemas/import_map.schema.json +++ b/schemas/import_map.schema.json @@ -29,4 +29,4 @@ } } } -} \ No newline at end of file +} diff --git a/tsconfig.json b/tsconfig.json index 35c7871a..d17c9930 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ "outDir": "out", "rootDir": "src", "sourceMap": true, - "strict": true, + "strict": true }, "include": [ "src" @@ -25,4 +25,4 @@ "path": "./typescript-deno-plugin" } ] -} \ No newline at end of file +} diff --git a/typescript-deno-plugin/README.md b/typescript-deno-plugin/README.md index 452cffd4..8fcfda1e 100644 --- a/typescript-deno-plugin/README.md +++ b/typescript-deno-plugin/README.md @@ -1,7 +1,7 @@ # typescript-deno-plugin The `typescript-deno-plugin` is a language service plugin for TypeScript. It is -loaded by the extension client. The main purpose of the plugin is to _disable_ +loaded by the extension client. The main purpose of the plugin is to _disable_ parts of the built in TypeScript/JavaScript language server in Visual Studio Code when Deno is enabled for a project, as language server information will be obtained from the Deno CLI Language Server itself. diff --git a/typescript-deno-plugin/src/index.ts b/typescript-deno-plugin/src/index.ts index da3f28cf..3857cda8 100644 --- a/typescript-deno-plugin/src/index.ts +++ b/typescript-deno-plugin/src/index.ts @@ -32,6 +32,7 @@ const defaultSettings: Settings = { codeLens: null, config: null, importMap: null, + internalDebug: false, lint: false, suggest: { autoImports: true,