From bd3bcb33deb67bbd651118169d28f02bc59eea30 Mon Sep 17 00:00:00 2001 From: Walter Jenkins Date: Tue, 9 Sep 2025 10:05:56 -0500 Subject: [PATCH] update none-ls --- lua/plugins/lsp.lua | 12 ++++++++++++ lua/plugins/none-ls.lua | 21 +++++---------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 08a6df5e..7ca07c8d 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -17,6 +17,16 @@ return { return util.root_pattern("go.work", "go.mod", ".git")(fname) or util.path.dirname(fname) end, + handlers = { + -- Suppress signature help errors that are common with incomplete Go code + ["textDocument/signatureHelp"] = function(err, result, ctx, config) + if err and string.find(err.message, "cannot get type") then + -- Silently ignore "cannot get type" errors for signature help + return nil + end + return vim.lsp.handlers["textDocument/signatureHelp"](err, result, ctx, config) + end, + }, settings = { gopls = { gofumpt = true, @@ -54,6 +64,8 @@ return { -- Performance optimizations for large repositories memoryMode = "DegradeClosed", symbolMatcher = "FastFuzzy", + -- Reduce signature help noise + ["ui.completion.experimentalPostfixCompletions"] = false, }, }, }) diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua index cf75d956..950c3362 100644 --- a/lua/plugins/none-ls.lua +++ b/lua/plugins/none-ls.lua @@ -3,27 +3,16 @@ return { 'nvimtools/none-ls.nvim', dependencies = { 'nvimtools/none-ls-extras.nvim', - 'jayp0521/mason-null-ls.nvim', -- ensure dependencies are installed + 'gbprod/none-ls-shellcheck.nvim', }, config = function() local null_ls = require 'null-ls' local formatting = null_ls.builtins.formatting -- to setup formatters local diagnostics = null_ls.builtins.diagnostics -- to setup linters - -- list of formatters & linters for mason to install - require('mason-null-ls').setup { - ensure_installed = { - 'checkmake', - 'prettier', -- ts/js formatter - 'stylua', -- lua formatter - 'eslint_d', -- ts/js linter - 'shfmt', - 'ruff', - 'goimports' - }, - -- auto-install configured formatters & linters (with null-ls) - automatic_installation = true, - } + + -- Note: Use Mason to manually install tools: + -- :MasonInstall checkmake prettier stylua eslint_d shfmt ruff goimports local sources = { diagnostics.checkmake, @@ -37,7 +26,7 @@ return { local augroup = vim.api.nvim_create_augroup('LspFormatting', {}) null_ls.setup { - -- debug = true, -- Enable debug mode. Inspect logs with :NullLsLog. + debug = false, -- Disable debug mode to reduce log spam sources = sources, -- you can reuse a shared lspconfig on_attach callback here on_attach = function(client, bufnr)