FIXED: [14.90b1] Find definition (LSP Client)
FIXED: [14.90b1] Find definition (LSP Client)
"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
- Rickard Johansson
- Site Admin
- Posts: 6783
- Joined: 19 Jul 2006 14:29
Re: [14.90b1] Find definition (LSP Client)
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.
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)
Let me not create new thread and reply you here:
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.
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.)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.
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
- Rickard Johansson
- Site Admin
- Posts: 6783
- Joined: 19 Jul 2006 14:29
Re: FIXED: [14.90b1] Find definition (LSP Client)
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.
I also added line numbers: Line: 263: C:\MyFiles\...
E.g. Find Implementation may find several items in the same file.