VidocqH / lsp-lens.nvim

Neovim plugin for displaying references and difinition infos upon functions like JB's IDEA.
MIT License
252 stars 15 forks source link

Protect against v.range being nil #17

Closed dsully closed 1 year ago

dsully commented 1 year ago

Otherwise this error can be emitted:

Error executing vim.schedule lua callback: ...share/nvim/lazy/lsp-lens.nvim/lua/lsp-lens/lens-util.lua:47: attempt to index field 'range' (a nil value)
stack traceback:
        ...share/nvim/lazy/lsp-lens.nvim/lua/lsp-lens/lens-util.lua:47: in function 'get_functions'
        ...share/nvim/lazy/lsp-lens.nvim/lua/lsp-lens/lens-util.lua:61: in function 'get_cur_document_functions'
        ...share/nvim/lazy/lsp-lens.nvim/lua/lsp-lens/lens-util.lua:261: in function 'callback'
        ...w/Cellar/neovim/0.9.0/share/nvim/runtime/lua/vim/lsp.lua:2021: in function 'handler'
        ...w/Cellar/neovim/0.9.0/share/nvim/runtime/lua/vim/lsp.lua:1394: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
VidocqH commented 1 year ago

Thanks, I fixed it a few days ago and planned to test for a while before push, however I completely forgot about it. 😂