mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02:00
fix(lsp): sometimes lsp client is not fully initialized and doesnt yet have client.supports_method on 0.9.5. Fixes #3263
This commit is contained in:
parent
d19a004136
commit
8c94842b4a
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,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(method, { bufnr = buffer }) then
|
if client.supports_method and client.supports_method(method, { bufnr = 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",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue