add inline error messages
This commit is contained in:
parent
8d3a9a1774
commit
0ace78175a
2
init.lua
2
init.lua
|
@ -599,6 +599,8 @@ require('lazy').setup({
|
|||
},
|
||||
}
|
||||
|
||||
require('custom.diagnostics').setup()
|
||||
|
||||
-- Ensure the servers and tools above are installed
|
||||
-- To check the current status of installed tools and/or manually install
|
||||
-- other tools, you can run
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
-- Custom LSP diagnostic configuration
|
||||
local M = {}
|
||||
|
||||
M.setup = function()
|
||||
vim.diagnostic.config {
|
||||
virtual_text = {
|
||||
prefix = '●', -- Change symbol if needed
|
||||
spacing = 4,
|
||||
},
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
severity_sort = true,
|
||||
float = {
|
||||
source = 'always',
|
||||
},
|
||||
}
|
||||
|
||||
-- Show diagnostics in a floating window when hovering
|
||||
vim.o.updatetime = 250
|
||||
vim.api.nvim_create_autocmd('CursorHold', {
|
||||
callback = function()
|
||||
vim.diagnostic.open_float(nil, { focusable = false })
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
Loading…
Reference in New Issue