-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Go to Tag menu #3542
Improve Go to Tag menu #3542
Conversation
Fallback to file & line if no signature. Show tooltip with file & line.
Also, regarding the ellipsize, I think it would be useful to split it into two parts:
and then join them for the resulting string. This way you'll always have the file name preserved and only the leading path truncated (which isn't so interesting I think). |
@techee The list of variables would be much more useful if it showed the scope, e.g.: I'll add that. |
What one IDE does that seems to work for autocomplete (its goto is precise AFAICT so no list needed for that) is to display the list of unique names only and then for the selected one a fixed width multiline subwindow shows one of the the overloads with full file, line, and signature and an up/down arrow to cycle them. I expect it does not simply use a second level menu showing all the overloads is that for the example I tried Maybe a calltip can be used for the second level to simplify implementation? |
@eht16 the windows CI appears to be broke again. |
The file is absolutely necessary information for me. I typically edit multiple checkouts of the same code (managing different features/bugs/tasks simultaneously, so I can work on one thing while waiting on review for the others things). Often this involves the same files. So I quickly need to know the location where to jump or I will edit in the wrong checkout (happens often enough already, please don't make it even harder). |
I can make it configurable. @techee how are you getting those text declarations? It seems like there should be some scope info probably. What about a hybrid where if there's no parameter list and no scope info then show file and line. |
BTW this pull only adds info to the menu so I'd like to merge it. Though maybe you want the configuration option before going ahead with refinements to the merged pull that shows signatures. |
Nobody will understand that. For users it will just confusing why they sometimes see filenames and sometimes the signature. And as for me (and apparently @kugel- and @elextr too), always seeing file names is just necessary.
Frankly, I did't properly updated your branch on my machine, they are present now, sorry. But the goto popup has to work reasonably well for all languages, such as Python where you don't have the type information or some other parsers that don't support scope parsing (or there's no concept of scope in the languages themselves).
No, it doesn't - this PR removes the file name from the popup which simply isn't good and would have to be fixed by any subsequent PR. Also, modifying Rather than this PR, even though @b4n maybe thinks otherwise, it would be better to apply #3495 (just ellipsizing in a smarter way) and avoid the configuration altogether.
Would you wait for a few days? I'd like to play with this a bit and see what works and what not. |
Closing now #3547 has been merged. Feel free to open further adjustments again 😉 |
As a last minute patch just before the release :-). |
Limit width and ellipsize like #3495.
Fallback to file & line if no signature.
Show tooltip with file & line.
For screenshots and code by @b4n (unchanged), see: #3475 (comment)