From 1f7f5806abd2ed3fad7b26a7c3de26725a26a0b2 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Fri, 8 Dec 2023 22:02:19 +0000 Subject: [PATCH] feat: "deno.logFile" setting (#1003) --- client/src/extension.ts | 2 ++ client/src/shared_types.d.ts | 1 + package.json | 10 ++++++++++ typescript-deno-plugin/src/index.ts | 1 + 4 files changed, 14 insertions(+) diff --git a/client/src/extension.ts b/client/src/extension.ts index ec2cd388..ab487469 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -58,6 +58,7 @@ const workspaceSettingsKeys: Array = [ "inlayHints", "internalDebug", "lint", + "logFile", "path", "suggest", "testing", @@ -177,6 +178,7 @@ function handleConfigurationChange(event: vscode.ConfigurationChangeEvent) { event.affectsConfiguration("deno.enable") || event.affectsConfiguration("deno.disablePaths") || event.affectsConfiguration("deno.enablePaths") || + event.affectsConfiguration("deno.logFile") || event.affectsConfiguration("deno.path") || event.affectsConfiguration("deno.maxTsServerMemory") ) { diff --git a/client/src/shared_types.d.ts b/client/src/shared_types.d.ts index 3fe9bbbc..91e6d2e2 100644 --- a/client/src/shared_types.d.ts +++ b/client/src/shared_types.d.ts @@ -104,6 +104,7 @@ export interface Settings { internalDebug: boolean; /** Determine if the extension should be providing linting diagnostics. */ lint: boolean; + logFile: boolean; /** Specify an explicit path to the `deno` binary. */ path: string | null; // TODO(nayeemrmn): Deprecate the `Suggest` part of this in favour of diff --git a/package.json b/package.json index 0264f39c..18278fe6 100644 --- a/package.json +++ b/package.json @@ -475,6 +475,16 @@ false ] }, + "deno.logFile": { + "type": "boolean", + "default": false, + "markdownDescription": "Write logs to a file in a project-local directory.", + "scope": "window", + "examples": [ + true, + false + ] + }, "deno.defaultTaskCommand": { "type": "string", "enum": [ diff --git a/typescript-deno-plugin/src/index.ts b/typescript-deno-plugin/src/index.ts index 98191237..8dd20a86 100644 --- a/typescript-deno-plugin/src/index.ts +++ b/typescript-deno-plugin/src/index.ts @@ -45,6 +45,7 @@ const defaultSettings: Settings = { inlayHints: null, internalDebug: false, lint: false, + logFile: false, path: null, suggest: { autoImports: true,