Is anyone here using Neovim? I've got tree-sitter-based syntax highlighting working and I believe I have the LSP stuff wired up mostly correct.
However, when I make a syntax error while writing a file, I can see in Neovim there is an error because it says 'E:1' in the status line but the error isn't actually printed out in the editor. If I open the file from the command line, then the error is printed out.
I realise troubleshooting someone else's Neovim is like pulling teeth but does anyone here use Neovim and can point me at their configuration so I can see how they're doing it?
I don't experience this problem. Isn't it the case that the error message is at the very top of the file?
You can look at my nvim config. Nothing exotic there. I have roc_language_server
as an executable in path, compiled from source. I have the treesitter module installed for Roc, but that was done the easy way (not through compiling the treesitter grammar, I think it is in some kind of central repository I could just install from nvim).
Also, my language server is not very up to date. I last recompiled when module params got introduced.
@Norbert Hajagos Thanks for the reply (and the link to your config)! I think part of the issue might have been expectations. I intentionally wrote imort
rather than import
in a test file and expected the error to be visible on the line with imort
. I do see it on the top line (and see that that's how it works in Zed, too).
With pleasure! Yes, where the error is displayed depends on the language server's response, which is kinda shaped like
{
message: "unexpected token 'imort', maybe you intended 'import'?",
range: {
start: {
line: 0, column: 0
} ,
end: {
line: 0: column: 5
}
}
}
So it is not nvim's job to decide if that is in the right place. Also, the lang server right now can only do analysis on source code without errors, which might be why it defaults to the beginning of the file .
Last updated: Jul 06 2025 at 12:14 UTC