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

Post bug reports when testing beta versions here.
Post Reply
User avatar
pjj
Posts: 2108
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

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

Post 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.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
User avatar
Rickard Johansson
Site Admin
Posts: 6575
Joined: 19 Jul 2006 14:29

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

Post 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.
User avatar
pjj
Posts: 2108
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

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

Post 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.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
User avatar
Rickard Johansson
Site Admin
Posts: 6575
Joined: 19 Jul 2006 14:29

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

Post 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.
Post Reply