fix(fugitive): disable lsp in diff buffers
This commit is contained in:
parent
d54bff58d4
commit
1b295597f4
1 changed files with 13 additions and 0 deletions
|
|
@ -72,3 +72,16 @@ vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Disable LSP in fugitive buffers
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
callback = function(args)
|
||||||
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
|
local bufnr = args.buf
|
||||||
|
if vim.api.nvim_buf_get_name(bufnr):match("^fugitive://") then
|
||||||
|
if client then
|
||||||
|
vim.lsp.stop_client(client.id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue