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

wrong number of references #8

Closed xiantang closed 1 year ago

xiantang commented 1 year ago
image

How to reproduce:

  1. find a Lua function defined with a module, e.g.: function lsplens:lsp_lens_toggle()
  2. check the references count

should lsp_lens_toggle references count not be lsplens references count

VidocqH commented 1 year ago

I also noticed that. Seems like it is caused by the bad request params when perform "textDocument/references". I will look at it later.

bad request params exemple

{
  context = {
    includeDeclaration = false
  },
  position = {
    character = 9,
    line = 34
  },
  textDocument = {
    uri = "file:///Users/vidocq/nvim_plugs/lens-nvim/lua/lsp-lens/utils.lua"
  }
}