Change diagnostic window appareance
This commit is contained in:
parent
0556e2f742
commit
6faace4a0c
1 changed files with 8 additions and 2 deletions
|
@ -40,14 +40,20 @@ vim.cmd('au BufWinEnter *.* silent! loadview')
|
||||||
-- diagnostic windows must be float
|
-- diagnostic windows must be float
|
||||||
vim.diagnostic.config {
|
vim.diagnostic.config {
|
||||||
virtual_text = false,
|
virtual_text = false,
|
||||||
signs = false,
|
signs = true,
|
||||||
underline = 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
|
-- You will likely want to reduce updatetime which affects CursorHold
|
||||||
-- note: this setting is global and should be set only once
|
-- note: this setting is global and should be set only once
|
||||||
vim.o.updatetime = 250
|
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
|
-- Autotype
|
||||||
vim.cmd('au BufRead,BufNewFile *.md setlocal textwidth=80')
|
vim.cmd('au BufRead,BufNewFile *.md setlocal textwidth=80')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue