~whynothugo/lsp_lines.nvim#35: 
Error on toggling diagnostics

On re-enabling vim.diagnostics after disabling:

E5108: Error executing lua .../share/nvim/lazy/lsp_lines.nvim/lua/lsp_lines/render.lua:191: Invalid 'line': out of range
stack traceback:
	[C]: in function 'nvim_buf_set_extmark'
	.../share/nvim/lazy/lsp_lines.nvim/lua/lsp_lines/render.lua:191: in function 'show'
	...al/share/nvim/lazy/lsp_lines.nvim/lua/lsp_lines/init.lua:45: in function 'show'
	/usr/share/nvim/runtime/lua/vim/diagnostic.lua:1211: in function 'show'
	/usr/share/nvim/runtime/lua/vim/diagnostic.lua:1167: in function 'show'
	/usr/share/nvim/runtime/lua/vim/diagnostic.lua:1161: in function 'show'
	/usr/share/nvim/runtime/lua/vim/diagnostic.lua:1583: in function 'enable'
	[string ":lua"]:1: in main chunk

#Reproduction

  • Setup lsp_lines
  • Disable diagnostics entirely with vim.diagnostics.disable()
  • Enable them again at any time with vim.diagnostics.enable()
Status
REPORTED
Submitter
~ditsuke
Assigned to
No-one
Submitted
1 year, 29 days ago
Updated
3 months ago
Labels
No labels applied.

~whynothugo 1 year, 26 days ago

I can't reproduce this. Does this happen with any LSP or with one in particular? Any particular file with which this happens?

~ditsuke 1 year, 22 days ago

Odd, I can't reliably reproduce this either. The last time it happened on lua_ls

~whynothugo 1 year, 22 days ago

Let me know when you have a clear reproduction example.

~fabrice-bernes 3 months ago

Hi. I can reproduce this error with coc-lua. It happens only when there is virtual text at the very end of a buffer and it gets quickly added or deleted.

To get this error:

* Open a new lua file and type a line that makes no sense: "ilorem ipsum<Esc>".

* Yank it and paste it many times:  "yy50p".

* Undo that paste: "u"

Hope this helps, and thank you for making this plugin.

Register here or Log in to comment, or comment via email.