Merge branch 'diagnostics-config'

This commit is contained in:
Dionisio E Alonso 2022-08-07 23:48:08 -03:00
commit 4a6169c670
1 changed files with 8 additions and 2 deletions

View File

@ -46,11 +46,17 @@ 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({show_header = false})")
vim.api.nvim_create_autocmd("CursorHoldI", {
buffer = bufnr,
callback = function()
vim.diagnostic.open_float({ focusable = false, header = "" })
end
})
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 }
}
)