fix: Add diagnostic open_float focus option

Made the floating window not focusable to avoid mistakes.
This commit is contained in:
Dionisio E Alonso 2022-08-07 23:28:24 -03:00
parent 314b10e343
commit 099f247c2e
1 changed files with 2 additions and 2 deletions

View File

@ -46,11 +46,11 @@ lua << EOF
local nvim_lsp = require("lspconfig")
local on_attach = function(client, bufnr)
vim.api.nvim_command("autocmd CursorHoldI <buffer> lua vim.diagnostic.open_float({header = ''})")
vim.api.nvim_command("autocmd CursorHoldI <buffer> lua vim.diagnostic.open_float({focusable = false, header = ''})")
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
update_in_insert = true,
virtual_text = false
virtual_text = { spacing = 24 }
}
)