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

line value outside range #4

Closed xiantang closed 1 year ago

xiantang commented 1 year ago
image

i'm willing to fix this issue

xiantang commented 1 year ago

https://github.com/xiantang/nvim-conf/blob/e3dec5e934250c1a77d5cd2af0d7d5e73f9f5214/lua/nerdtree.lua#L1-L3 it due to my function define in line 1, but ur code https://github.com/xiantang/lsp-lens.nvim/blob/086d0d93cdb578fc740bcc467d7dbfa1d0f4b953/lua/lsp-lens/lens-util.lua#L100-L101 use query.rangeStart.line - 1, and the line number arg of nvim_buf_set_extmark accept only 0-based.