don't display diagnostics by default
This commit is contained in:
parent
6ebd6e83c6
commit
aa745901c6
22
vimrc.lua
22
vimrc.lua
@ -99,28 +99,6 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Function to check if a floating dialog exists and if not
|
|
||||||
-- then check for diagnostics under the cursor
|
|
||||||
function OpenDiagnosticIfNoFloat()
|
|
||||||
for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do
|
|
||||||
if vim.api.nvim_win_get_config(winid).zindex then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- THIS IS FOR BUILTIN LSP
|
|
||||||
vim.diagnostic.open_float(0, {
|
|
||||||
scope = "cursor",
|
|
||||||
focusable = false,
|
|
||||||
close_events = {
|
|
||||||
"CursorMoved",
|
|
||||||
"CursorMovedI",
|
|
||||||
"BufHidden",
|
|
||||||
"InsertCharPre",
|
|
||||||
"WinLeave",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = false, -- Turn off inline diagnostics
|
virtual_text = false, -- Turn off inline diagnostics
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user