~ditsuke


#35 Error on toggling diagnostics 1 year, 22 days ago

Comment by ~ditsuke on ~whynothugo/lsp_lines.nvim

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

#35 Error on toggling diagnostics 1 year, 29 days ago

Ticket created by ~ditsuke on ~whynothugo/lsp_lines.nvim

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()