kotlin-language-server icon indicating copy to clipboard operation
kotlin-language-server copied to clipboard

Definition not working on some declaration sites

Open daplf opened this issue 2 years ago • 0 comments

While I was working on https://github.com/fwcd/kotlin-language-server/pull/319 I noticed that requesting a definition on the declaration site of a property, a method or a method argument doesn't work. Note that this works for classes, for example.

When you "Ctrl + Click" on a symbol in VSCode, a definition request is made. If the definition returned is the exact same symbol we requested a definition for, it means we are already at the definition of the symbol. When this happens, VSCode immediately requests references of that same symbol. This allows "Ctrl + click" to work with definition and references. This is currently working fine with classes, because the definition request on the declaration site of a class works. But for other symbols, it's broken.

The rename is also affected by this issue.

daplf avatar Nov 27 '21 11:11 daplf