Skip to content

Commit bd3bcb3

Browse files
committed
update none-ls
1 parent 553935a commit bd3bcb3

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

lua/plugins/lsp.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ return {
1717
return util.root_pattern("go.work", "go.mod", ".git")(fname)
1818
or util.path.dirname(fname)
1919
end,
20+
handlers = {
21+
-- Suppress signature help errors that are common with incomplete Go code
22+
["textDocument/signatureHelp"] = function(err, result, ctx, config)
23+
if err and string.find(err.message, "cannot get type") then
24+
-- Silently ignore "cannot get type" errors for signature help
25+
return nil
26+
end
27+
return vim.lsp.handlers["textDocument/signatureHelp"](err, result, ctx, config)
28+
end,
29+
},
2030
settings = {
2131
gopls = {
2232
gofumpt = true,
@@ -54,6 +64,8 @@ return {
5464
-- Performance optimizations for large repositories
5565
memoryMode = "DegradeClosed",
5666
symbolMatcher = "FastFuzzy",
67+
-- Reduce signature help noise
68+
["ui.completion.experimentalPostfixCompletions"] = false,
5769
},
5870
},
5971
})

lua/plugins/none-ls.lua

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,16 @@ return {
33
'nvimtools/none-ls.nvim',
44
dependencies = {
55
'nvimtools/none-ls-extras.nvim',
6-
'jayp0521/mason-null-ls.nvim', -- ensure dependencies are installed
6+
'gbprod/none-ls-shellcheck.nvim',
77
},
88
config = function()
99
local null_ls = require 'null-ls'
1010
local formatting = null_ls.builtins.formatting -- to setup formatters
1111
local diagnostics = null_ls.builtins.diagnostics -- to setup linters
1212

13-
-- list of formatters & linters for mason to install
14-
require('mason-null-ls').setup {
15-
ensure_installed = {
16-
'checkmake',
17-
'prettier', -- ts/js formatter
18-
'stylua', -- lua formatter
19-
'eslint_d', -- ts/js linter
20-
'shfmt',
21-
'ruff',
22-
'goimports'
23-
},
24-
-- auto-install configured formatters & linters (with null-ls)
25-
automatic_installation = true,
26-
}
13+
14+
-- Note: Use Mason to manually install tools:
15+
-- :MasonInstall checkmake prettier stylua eslint_d shfmt ruff goimports
2716

2817
local sources = {
2918
diagnostics.checkmake,
@@ -37,7 +26,7 @@ return {
3726

3827
local augroup = vim.api.nvim_create_augroup('LspFormatting', {})
3928
null_ls.setup {
40-
-- debug = true, -- Enable debug mode. Inspect logs with :NullLsLog.
29+
debug = false, -- Disable debug mode to reduce log spam
4130
sources = sources,
4231
-- you can reuse a shared lspconfig on_attach callback here
4332
on_attach = function(client, bufnr)

0 commit comments

Comments
 (0)