fix: nvim sops error
This commit is contained in:
@@ -32,7 +32,7 @@ end
|
|||||||
-- Helper function to detach all LSP clients from a buffer
|
-- Helper function to detach all LSP clients from a buffer
|
||||||
-- This prevents LSP sync errors when SOPS replaces the entire buffer content
|
-- This prevents LSP sync errors when SOPS replaces the entire buffer content
|
||||||
local function detach_lsp_clients(bufnr)
|
local function detach_lsp_clients(bufnr)
|
||||||
local clients = vim.lsp.get_active_clients({ bufnr = bufnr })
|
local clients = vim.lsp.get_clients({ bufnr = bufnr })
|
||||||
for _, client in ipairs(clients) do
|
for _, client in ipairs(clients) do
|
||||||
vim.lsp.buf_detach_client(bufnr, client.id)
|
vim.lsp.buf_detach_client(bufnr, client.id)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user