From 5df4a640634ee57d5452228899ad84f01668df24 Mon Sep 17 00:00:00 2001 From: salkin-mada Date: Fri, 12 Jun 2026 23:17:21 +0200 Subject: [PATCH 1/2] fix(help): pretty guard against nil input_path Handle help lookup for non-existent classes --- lua/scnvim/help.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/scnvim/help.lua b/lua/scnvim/help.lua index 0f47b1ff..c3f498f9 100644 --- a/lua/scnvim/help.lua +++ b/lua/scnvim/help.lua @@ -81,6 +81,10 @@ end local function render_help_file(subject, on_done) local cmd = string.format('SCNvim.getHelpUri("%s")', subject) sclang.eval(cmd, function(input_path) + if not input_path then + utils.print(string.format('The class %s does not exist', subject)) + return + end local basename = input_path:gsub('%.html%.scnvim', '') local output_path = basename .. '.txt' local args = get_render_args(input_path, output_path) From e2dcd63bdd120a1265ad27e392419d0088785e5b Mon Sep 17 00:00:00 2001 From: salkin-mada Date: Fri, 12 Jun 2026 23:45:32 +0200 Subject: [PATCH 2/2] fix(help): styling unification --- lua/scnvim/help.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/scnvim/help.lua b/lua/scnvim/help.lua index c3f498f9..b3d228f6 100644 --- a/lua/scnvim/help.lua +++ b/lua/scnvim/help.lua @@ -82,7 +82,7 @@ local function render_help_file(subject, on_done) local cmd = string.format('SCNvim.getHelpUri("%s")', subject) sclang.eval(cmd, function(input_path) if not input_path then - utils.print(string.format('The class %s does not exist', subject)) + utils.print(string.format('The class %s does not exist', subject), 'WarningMsg') return end local basename = input_path:gsub('%.html%.scnvim', '') @@ -134,7 +134,7 @@ end ---@param results Table with results M.on_select = action.new(function(err, results) if err then - print(err) + utils.print(err, 'WarningMsg') return end local id = api.nvim_create_augroup('scnvim_qf_conceal', { clear = true })