mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-03-10 09:27:25 +00:00
fix(lsp): buffer should be second arg for supports_method
This commit is contained in:
@@ -64,7 +64,7 @@ function M._check_methods(client, buffer)
|
|||||||
for method, clients in pairs(M._supports_method) do
|
for method, clients in pairs(M._supports_method) do
|
||||||
clients[client] = clients[client] or {}
|
clients[client] = clients[client] or {}
|
||||||
if not clients[client][buffer] then
|
if not clients[client][buffer] then
|
||||||
if client.supports_method and client:supports_method(method, { bufnr = buffer }) then
|
if client.supports_method and client:supports_method(method, buffer) then
|
||||||
clients[client][buffer] = true
|
clients[client][buffer] = true
|
||||||
vim.api.nvim_exec_autocmds("User", {
|
vim.api.nvim_exec_autocmds("User", {
|
||||||
pattern = "LspSupportsMethod",
|
pattern = "LspSupportsMethod",
|
||||||
@@ -107,7 +107,7 @@ function M.on_supports_method(method, fn)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
---@return _.lspconfig.options
|
---@return vim.lsp.Config
|
||||||
function M.get_config(server)
|
function M.get_config(server)
|
||||||
local configs = require("lspconfig.configs")
|
local configs = require("lspconfig.configs")
|
||||||
return rawget(configs, server)
|
return rawget(configs, server)
|
||||||
|
|||||||
Reference in New Issue
Block a user