1
0

Add diag at end of every line

This commit is contained in:
2025-03-31 21:33:08 +01:00
parent 19549b35c9
commit 0150632fc4

View File

@@ -76,8 +76,20 @@ vim.keymap.set("n", "<leader>Y", "\"+Y")
-- --
-- Disable built-in -- Disable built-in
vim.diagnostic.config({ virtual_text = false } ) -- vim.diagnostic.config({ virtual_text = false } )
-- Enable for the current line only -- End of line diagnostic for every error
vim.diagnostic.config({
virtual_text = {
format = function(diagnostic)
local lines = vim.split(diagnostic.message, '\n')
return lines[1]
end,
virt_text_pos = 'right_align',
suffix = ' ',
},
})
-- Enable all errors for the current line only
vim.diagnostic.config({ virtual_lines = { only_current_line = true } }) vim.diagnostic.config({ virtual_lines = { only_current_line = true } })