Change diagnostic window appareance

This commit is contained in:
Yorick Barbanneau 2022-08-06 02:08:40 +02:00
parent 0556e2f742
commit 6faace4a0c

View file

@ -40,14 +40,20 @@ vim.cmd('au BufWinEnter *.* silent! loadview')
-- diagnostic windows must be float
vim.diagnostic.config {
virtual_text = false,
signs = false,
signs = true,
underline = true,
}
local signs = { Error = "", Warn = "", Hint = "", Info = "" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
-- You will likely want to reduce updatetime which affects CursorHold
-- note: this setting is global and should be set only once
vim.o.updatetime = 250
vim.cmd [[autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
vim.cmd [[autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {scope='cursor', border = "single", header = "", prefix = "", focus=false})]]
-- Autotype
vim.cmd('au BufRead,BufNewFile *.md setlocal textwidth=80')