Closed sim590 closed 3 years ago
I think this may be an issue with the server. The publishDiagnostics notification is sent from the server and the character and line values you get there should be greater or equal to zero, as it doesn't make sense for them to be anything else.
The spec even says that there are no special values like -1 to denote EOL or anything like that.
Position in a text document expressed as zero-based line and zero-based character offset. A position is between two characters like an ‘insert’ cursor in a editor. Special values like for example -1 to denote the end of a line are not supported.
Closing this as it seems to be stale and a server issue. Feel free to re-open if that's not the case.
bin/languageclient --version
to get its version number. Yes:checkhealth LanguageClient
? N/ADescribe the bug
Error on certain instances of valid code with Haskell files which breaks the syntax error report in Vim:
This happens when editing the following file:
Environment
neovim/vim version (
nvim --version
orvim --version
): Vi IMproved 8.2This plugin version (
git rev-parse --short HEAD
): d6d6d08This plugin's binary version (
bin/languageclient --version
): languageclient 0.1.160Minimal vimrc content (A minimal vimrc is the smallest vimrc that could reproduce the issue. Refer to an example here): the suggested
min-vimrc.vim
file was used with the following appended:let g:LanguageClient_serverCommands = { 'haskell': ['hie-wrapper', '--lsp', '-l', '/tmp/hie-wrapper.log'] }
Language server link and version:
Steps to Reproduce and current behaviour
Steps to reproduce the behavior:
Tata.hs
file with Vim.Have a look at the LanguageClient log file for the client and notice the following:
The full log file is attached here.
While the error by itself doesn't indicate a bad behaviour, notice that when triggering an error by changing the following line:
to for instance:
will show the syntax error on the right. However, if when undoing the change with the
u
key (and saving the file), one can clearly see that the syntax error message doesn't go away on the right no matter how many times we write the file on the disk. Actually, the whole syntax error report is not listed in the location list (or quickfix list, depending on configuration), i.e. the syntax error report is not updated in Vim since the plugin seems to have abandoned to do so even though a syntax warning message was available according to the client log.Expected behavior
The error message about the invalid integer should not happen and syntax errors should disappear when resolved in the file.
Additional context
The strange thing is that changing the source file to the following does go around the issue ...
It seems like the
:list
part of the expression is not liked by some linter. May be the issue is with the server, but I can't tell.EDIT: Actually, it seems like simply removing the parentheses does the trick... i.e.: