From 4c4a3487d665d1f92b0986f35f2ceedea2c7bb90 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Tue, 9 Sep 2025 15:05:32 -0500 Subject: [PATCH 1/2] rudimentary logging --- client/src/extension.ts | 13 +++++++++++++ package.json | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/client/src/extension.ts b/client/src/extension.ts index 728e7b5..7934c14 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -6,6 +6,7 @@ import * as vscode from 'vscode'; import * as which from 'which'; +import { window, type OutputChannel } from 'vscode'; import { LanguageClient, @@ -15,6 +16,7 @@ import { import { time } from 'console'; let client: LanguageClient; +let outputChannel: OutputChannel; function findNushellExecutable(): string | null { try { @@ -48,6 +50,8 @@ function startLanguageServer( context: vscode.ExtensionContext, found_nushell_path: string, ): void { + outputChannel = window.createOutputChannel('Nushell LSP Output', 'log'); + // Use Nushell's native LSP server const serverOptions: ServerOptions = { run: { @@ -62,6 +66,11 @@ function startLanguageServer( // Options to control the language client const clientOptions: LanguageClientOptions = { + outputChannelName: 'Nushell Language Server', + markdown: { + isTrusted: true, + supportHtml: true, + }, initializationOptions: { timeout: 10000, // 10 seconds }, @@ -168,6 +177,10 @@ export function activate(context: vscode.ExtensionContext) { return; } + context.subscriptions.push(outputChannel); + console.log(`Found nushell executable at: ${found_nushell_path}`); + console.log('Activating Nushell Language Server extension.'); + // Start the language server when the extension is activated startLanguageServer(context, found_nushell_path); diff --git a/package.json b/package.json index da59a55..c1c0fbf 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "vscode-nushell-lang", "description": "nushell language for vscode", "author": "The Nushell Project Developers", - "version": "2.0.1", + "version": "2.0.2", "preview": false, "license": "MIT", "publisher": "TheNuProjectContributors", From ab6663e4b24f9393fed4a3c18066c664d9bb5d94 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Wed, 10 Sep 2025 08:40:38 -0500 Subject: [PATCH 2/2] update changelog for 2.0.3 pre-release --- CHANGELOG.md | 6 +++++- client/package.json | 2 +- package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5ca534..7b7a7b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -171,7 +171,7 @@ All notable changes to the "vscode-nushell-lang" extension will be documented in - Remove / and \ from wordPattern [#186](https://github.com/nushell/vscode-nushell-lang/pull/186) - Add support for def my-function syntax highlighting and add tests to it [#182](https://github.com/nushell/vscode-nushell-lang/pull/182) - add prettier to dev deps [#181](https://github.com/nushell/vscode-nushell-lang/pull/181) -- 2.0-pre-release +- 2.0.0 Pre-Release - Syntax highlighting in markdown code blocks [#195](https://github.com/nushell/vscode-nushell-lang/pull/195) - Fix vulnerabilities detected by npm audit [#193](https://github.com/nushell/vscode-nushell-lang/pull/193) - Add CONTRIBUTING.md [#194](https://github.com/nushell/vscode-nushell-lang/pull/194) @@ -181,3 +181,7 @@ All notable changes to the "vscode-nushell-lang" extension will be documented in - Add operators 'has' & 'has-not', and shorten operators-word regex [#201](https://github.com/nushell/vscode-nushell-lang/pull/201) - Support floats, binary & octal literals (with underscores) [#200](https://github.com/nushell/vscode-nushell-lang/pull/200) - Use LSP instead of legacy --ide-\* parameters [#207](https://github.com/nushell/vscode-nushell-lang/pull/207) +- 2.0.3 Pre-Release + - Add ability to start and stop lsp [#210](https://github.com/nushell/vscode-nushell-lang/pull/210) + - Better JSONRPC logging [#211]((https://github.com/nushell/vscode-nushell-lang/pull/211) + - Fix some lints [#213]((https://github.com/nushell/vscode-nushell-lang/pull/213) diff --git a/client/package.json b/client/package.json index 1e172cb..58c11f3 100644 --- a/client/package.json +++ b/client/package.json @@ -3,7 +3,7 @@ "description": "VSCode part of the nushell language server", "author": "Nushell Maintainers", "license": "MIT", - "version": "2.0.1", + "version": "2.0.3", "publisher": "TheNuProjectContributors", "repository": { "type": "git", diff --git a/package.json b/package.json index 76bb311..586ffd3 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "vscode-nushell-lang", "description": "nushell language for vscode", "author": "The Nushell Project Developers", - "version": "2.0.2", + "version": "2.0.3", "preview": false, "license": "MIT", "publisher": "TheNuProjectContributors",