-
Notifications
You must be signed in to change notification settings - Fork 15
Error executing vim.schedule lua callback: diagnostic-nvim/lua/diagnostic/util.lua:155: index out of range #46
Comments
Have you updated diagnostic-nvim? I think #38 fixes it. |
I just tried again with the latest commit, and I still get the same errors. |
I can't reproduce on my side, so let see if the PR fixes it. |
I found I had the same issue while using the python-language-server. Specifically, one of my linters (pyflakes) would label the starting positions of particular errors as -1, which caused an index-out-of-bounds error. I added these lines at line 91 of diagnostic-nvim/lua/diagnostic.lua
and it has fixed my issues. @haorenW1025, if I can tidy up the implementation a little would you consider this a good pull-request? If so I can put it together (I'll also check to make sure the end-character doesn't exceed the length of the line in case some other language-servers do that). |
Apologies - I'm not completely up-to-date so it may not be at line 91 of diagnostic-nvim/lua/diagnostic.lua (I was previously on f8b312d) |
I get this error every now and then. I think it occurs when there's a large number of diagnostics in the same buffer from a language server. I'm now able to consistently reproduce this error in a Julia file.
If I hit enter the error message continues popping up.
The text was updated successfully, but these errors were encountered: