From f219a8662fa6bab5c2ddeb96809d0fee94960fef Mon Sep 17 00:00:00 2001 From: Lazar Bulovan Date: Fri, 24 Jul 2026 12:35:36 +0200 Subject: [PATCH] fix: guard vim.lsp.diagnostics.refresh() against nil Neovim 0.12+ restructured LSP internals; vim.lsp.diagnostics no longer exists as a submodule. Guard the call so :SCLRescanWorkspaceTypes doesn't crash on startup. --- lua/tia_lsp/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/tia_lsp/init.lua b/lua/tia_lsp/init.lua index 6bbcaaf..c23d107 100644 --- a/lua/tia_lsp/init.lua +++ b/lua/tia_lsp/init.lua @@ -338,7 +338,9 @@ function M.rescan_workspace_types() end, 0) end - vim.lsp.diagnostics.refresh() + if vim.lsp.diagnostics then + vim.lsp.diagnostics.refresh() + end end function M.create_commands()