mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
fix(lsp): resolve keymap capabilities over all buffer clients
This commit is contained in:
parent
d0bc8b7dce
commit
36774c6058
1 changed files with 11 additions and 0 deletions
|
@ -66,6 +66,17 @@ function M.get()
|
|||
end
|
||||
|
||||
function M.on_attach(client, buffer)
|
||||
---@param method string
|
||||
function M.has(buffer, method)
|
||||
method = method:find("/") and method or "textDocument/" .. method
|
||||
local clients = vim.lsp.get_active_clients({ bufnr = buffer })
|
||||
for _, client in ipairs(clients) do
|
||||
if client.supports_method(method) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
local Keys = require("lazy.core.handler.keys")
|
||||
local keymaps = {} ---@type table<string,LazyKeys|{has?:string}>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue