Page 1 of 1

FIXED: [14.90b1] Find definition (LSP Client)

Posted: 08 Jun 2021 10:47
by pjj
"Find definition" works very well -- generally speaking I see adding LSP Client as a huge boost for RJ TE -- but if I have two definitions of two functions with the same name (obviously in two files, A.php and B.php, both added to my project), files are searched in the same order (that's my guess) as they are displayed in Document Symbols panel (or Find references list). This is logical and fine most of the time, but when you search for the definition of a function used somewhere in B.php, function instance in the same file should be returned. In other words: first search for the function definition in the current file.

Re: [14.90b1] Find definition (LSP Client)

Posted: 09 Jun 2021 18:16
by Rickard Johansson
The language server might find several instances in different files. In v14.90 beta 2 I've added a list (of file names) that appear if the server finds more than one item. Just select the one you want to open.

This applies to all Goto functions.

Note that finding definitions/implementations etc. is handled by the language server. The program itself doesn't search for anything.

Re: FIXED: [14.90b1] Find definition (LSP Client)

Posted: 10 Jun 2021 17:10
by pjj
Let me not create new thread and reply you here:
Rickard Johansson wrote: 09 Jun 2021 18:16 In v14.90 beta 2 I've added a list (of file names) that appear if the server finds more than one item. Just select the one you want to open.
Thank you! Could you please make the list clickable? Right now function instance can be only selected with a keyboard. (I right-click the function name, then pick "Find definition" from the menu -- still with the mouse -- and then need to move my hand to use keyboard. Not exactly the best UX, I daresay.)

Btw, I think that placing caret into the first line of found function -- instead of selecting its entire body -- would be more user-friendly, too.

Re: FIXED: [14.90b1] Find definition (LSP Client)

Posted: 10 Jun 2021 18:04
by Rickard Johansson
Fixed in final version.

I also added line numbers: Line: 263: C:\MyFiles\...

E.g. Find Implementation may find several items in the same file.