I have this repeatable error running Neovim 0.8 with dartls.

It occurs if I :-

  1. open a dart file
  2. make a change, eg add a blank line
  3. :w to save it
  4. immediately :e!
  5. on the next change attempt, I get the above error message and the dartls process terminates

Looking at the lsp.log file with debug set, I can see the :e! causes LSP didOpen with version=0 and then, when I make the change, at step 5, I see didChange with version=nnn where nnn is a positive integer.

At a guess, it's the disparity between the file open with version=0 and then an edit with version=nnn which causes dartls to respond with the error and then terminate. Is this a Dart issue or Neovim LSP issue?

For anybody else with this problem, the workaround is to do a fresh :e! which restarts the dartls process.

  • Titular question: probably NeoVim LSP team, unless you're using some plugin on top of that? Possibly also engage the dartls team.
    – D. Ben Knoble
    Mar 18 at 15:21


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.