Replies: 1 comment 2 replies
-
I mean, if you're searching for definitions or references, doesn't that usually mean you're not looking for the one your cursor is already on? Similar discussion: #1857 (comment) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm developing a language server and using Neovim/LazyVim for testing. I noticed that when a definition and its reference are on the same line, neither
lsp_definitions
norlsp_references
could find any results.This can be easily reproduced by creating the following Lua file
test.lua
:Moving the cursor to the first
x
and pressinggr
doesn't bring me to the secondx
. (My language server is for Jsonnet, but I believe this issue applies to all LS.)I thought my language server was buggy, but later, I realized this was due to
include_current
set tofalse
by default. Flipping it to true for both pickers fixed this behavior.The semantics of the
include_current
option isn't documented in picker.md. IIUC, it means "include the current line in the picker result". Shall we turn it to true by default forlsp_definitions
andlsp_references
?Beta Was this translation helpful? Give feedback.
All reactions