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

lsp-lens.nvim does not display anything when there is a declaration on the first line #31

Closed kyu08 closed 7 months ago

kyu08 commented 7 months ago

Hi! Thank you for creating nice plugin! I love your project.

Problem

As the title says, lsp-lens.nvim does not display anything when there is a declaration on the first line.

image

When I add comment above the declaration, References and Implements is shown.

image

Here is the code I used to reproduce it.

What I expect

I would like to see References and Implements displayed even if there is a declaration on the first line.

I would be very happy if you could consider this when you have time.

VidocqH commented 7 months ago

Hi, this is a well-known bug of neovim's virt_lines_above, it does not scroll down automatically when the target line is the first line, you can refer to this issue. neovim/neovim#16166 😊

kyu08 commented 7 months ago

@VidocqH I didn't know this behavior is caused by neovim's bug. Thank you for letting me know that! (Also, I'm sorry that I didn't notice it was written in the README.md. 😣)