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 50209346d52f60ca3ac6e03a142aa7edbeca7d53 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Wed, 10 Sep 2025 08:49:42 -0500 Subject: [PATCH 2/2] typo in changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b7a7b4..746621e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -183,5 +183,5 @@ All notable changes to the "vscode-nushell-lang" extension will be documented in - 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) + - 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)