[update] removed the depercated LazyVim.lsp.on_attach(**) method Snacks.util.lsp.on(**)
This commit is contained in:
@@ -44,7 +44,7 @@ return {
|
|||||||
gopls = function(_, opts)
|
gopls = function(_, opts)
|
||||||
-- workaround for gopls not supporting semanticTokensProvider
|
-- workaround for gopls not supporting semanticTokensProvider
|
||||||
-- https://github.com/golang/go/issues/54531#issuecomment-1464982242
|
-- 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
|
if not client.server_capabilities.semanticTokensProvider then
|
||||||
local semantic = client.config.capabilities.textDocument.semanticTokens
|
local semantic = client.config.capabilities.textDocument.semanticTokens
|
||||||
client.server_capabilities.semanticTokensProvider = {
|
client.server_capabilities.semanticTokensProvider = {
|
||||||
@@ -56,7 +56,7 @@ return {
|
|||||||
range = true,
|
range = true,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end, "gopls")
|
end)
|
||||||
-- end workaround
|
-- end workaround
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -41,11 +41,17 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
-- setup = {
|
||||||
|
-- basedpyright = function()
|
||||||
|
-- LazyVim.lsp.on_attach(function(client, _)
|
||||||
|
-- client.server_capabilities.hoverProvider = true
|
||||||
|
-- end, "basedpyright")
|
||||||
|
-- },
|
||||||
setup = {
|
setup = {
|
||||||
basedpyright = function()
|
basedpyright = function()
|
||||||
LazyVim.lsp.on_attach(function(client, _)
|
require("snacks").util.lsp.on({ name = "basedpyright" }, function(_, client)
|
||||||
client.server_capabilities.hoverProvider = true
|
client.server_capabilities.hoverProvider = true
|
||||||
end, "basedpyright")
|
end)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user