From 43998c873659e0d2d2df2eac8725db4c43f5446b Mon Sep 17 00:00:00 2001 From: David Czihak Date: Fri, 8 May 2026 18:19:59 +0200 Subject: Refactor: Delete issue assistant class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The issue assistant was used to suppress the warning that no extension supports issue reporting for zig files. Let’s see if it looks fine without – maybe I will bring it back later. For now, less code. --- Scripts/main.js | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/Scripts/main.js b/Scripts/main.js index 8515873..a98dfef 100644 --- a/Scripts/main.js +++ b/Scripts/main.js @@ -20,14 +20,12 @@ const CONFIG_KEYS = { let languageServer = null; let taskAssistant = null; -let issueAssistant = null; let commandRegistrations = []; exports.activate = function activate() { registerCommands(); taskAssistant = new ZigTaskAssistant(); languageServer = new ZigLanguageServer(); - issueAssistant = new ZigIssueAssistant(); }; exports.deactivate = function deactivate() { @@ -41,11 +39,6 @@ exports.deactivate = function deactivate() { taskAssistant = null; } - if (issueAssistant) { - issueAssistant.dispose(); - issueAssistant = null; - } - commandRegistrations.forEach((disposable) => { if (disposable && typeof disposable.dispose === "function") { disposable.dispose(); @@ -1162,31 +1155,3 @@ class ZigTaskAssistant { return action; } } - -class ZigIssueAssistant { - constructor() { - this.disposable = nova.assistants.registerIssueAssistant( - [{ syntax: "zig" }], - this, - { event: "onChange" } - ); - } - - dispose() { - if (this.disposable && typeof this.disposable.dispose === "function") { - this.disposable.dispose(); - this.disposable = null; - } - } - - provideIssues(editor) { - if (!editor || !editor.document) { - return []; - } - - // Nova's LanguageClient already owns core LSP publishDiagnostics handling. - // Registering an issue assistant here tells Nova that Zig supports live - // checking, so the Problems UI doesn't show a misleading empty-state banner. - return []; - } -} -- cgit v1.3