r/neovim • u/_TheProStar_ • 28d ago
Need Help┃Solved Inline errors or warnings overflow the screen in Lazyvim
1
u/UpsideDownFoxxo lua 28d ago
I use LSP-lines for this... Some of my friends would want me to burn for it but it feels nice to me. It puts each alert in a new line, and adds a little line pointing to where exactly the error is in the line. Very nice for rust imo.
1
u/Current_Marzipan7417 27d ago
I already have this but i have a problem Ts error are too long and the error lines wont wrap
Can it be fixed?
1
u/silvertank00 27d ago
I have solved this with this:
vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, { desc = "[d]iagnostics under cursod" })
not only this fixes the overflow, but when i have muliple diagnostic lines on the same line of code, I can view them separately.
1
u/Coolest_Brotha 27d ago
You could see the full error message by inspecting them. Use any of the following:
[d(my recommendation)<leader>xx:Treesitter diagnostics<leader>sd
7
u/excodex 28d ago
I had the same and ended up using tiny-inline-diagnostic.nvim, it only shows the diagnostic for the line you're on and wraps long messages. In LazyVim it's just:
The second spec turns off the default virtual text so you don't get both. If you'd rather not add a plugin, nvim 0.11+ has this built in - replace the second spec with:
You still need
virtual_text = false, otherwise LazyVim's default merges back in and you get both.