fix: nvim sops error
This commit is contained in:
parent
d50ed9858c
commit
cfdb8d8474
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue