[update] removed the depercated LazyVim.lsp.on_attach(**) method Snacks.util.lsp.on(**)

This commit is contained in:
Daveanand Mannie
2026-01-12 10:44:52 -05:00
parent 04b8487bab
commit 301a265080
2 changed files with 10 additions and 4 deletions

View File

@@ -44,7 +44,7 @@ return {
gopls = function(_, opts)
-- workaround for gopls not supporting semanticTokensProvider
-- https://github.com/golang/go/issues/54531#issuecomment-1464982242
LazyVim.lsp.on_attach(function(client, _)
Snacks.util.lsp.on({name="gopls"}, function (_, client)
if not client.server_capabilities.semanticTokensProvider then
local semantic = client.config.capabilities.textDocument.semanticTokens
client.server_capabilities.semanticTokensProvider = {
@@ -56,7 +56,7 @@ return {
range = true,
}
end
end, "gopls")
end)
-- end workaround
end,
},

View File

@@ -41,11 +41,17 @@ return {
},
},
},
-- setup = {
-- basedpyright = function()
-- LazyVim.lsp.on_attach(function(client, _)
-- client.server_capabilities.hoverProvider = true
-- end, "basedpyright")
-- },
setup = {
basedpyright = function()
LazyVim.lsp.on_attach(function(client, _)
require("snacks").util.lsp.on({ name = "basedpyright" }, function(_, client)
client.server_capabilities.hoverProvider = true
end, "basedpyright")
end)
end,
},
},