-
Notifications
You must be signed in to change notification settings - Fork 270
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
projectorganizer: Add popup panel for navigation #1341
Conversation
aae768b
to
60b4c81
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, see inline comments.
Apart from that, I was kind of disappointed that the "goto file" only lists Geany open documents rather than the project's documents -- maybe you'd like to add that?
Also, I hoped to be able to go to a specific file's line, not only in the current file -- but that's probably less useful in practice.
geany_icons[i].pixbuf = get_tag_icon(geany_icons[i].icon_name); | ||
} | ||
|
||
if (icon < _N_ICONS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (icon < _N_ICONS) | |
if (icon < G_N_ELEMENTS(geany_icons)) |
maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if geany/geany@1931fcc from geany/geany#3849 could be merged and used here. While the icons can be accessed this way, if someone reorganizes something in Geany, it will break. So better have some proper API for accessing these icons.
@b4n Thanks for having a look at it - I'll address the changes you suggested.
Definitely makes sense for projectorganizer which knows what files belong to the project. So yes, I should add that. This isn't possible in the LSP plugin from which this feature was taken because the plugin itself doesn't know what files belong to the project (this is only known to the server). Maybe I could also re-introduce the fuzzy search you use in the Commander plugin so one doesn't have to type the searched query exactly. In the LSP plugin it didn't make sense for the workspace symbols where the server did something like that already but e.g. for file names or file's symbols it could be useful (still we probably shouldn't use it for workspace symbols because there's way too many of them and filtering them could take too long because of this).
Probably not hard to add something like |
Done in the last commit - open files are sorted before project files and also non-open project files don't have any icon in front of them to distinguish them from the open files.
Not done now, possibly in the future. |
I've updated this PR to use geany/geany#3916. What's still missing is updating the required Geany API once we bump it in Geany. |
Done now. This PR is complete from my point of view. Unless there are any objections, I'll squash all the commits into one and merge this PR in about a week. |
This feature allows quick navigation do document/workspace symbols based on their names, open files, and line numbers. The panel's code is mostly stolen from the LSP plugin which in turn stole it from the Colomban Wendling's Commander plugin.
c00e96f
to
d9b714d
Compare
This feature allows quick navigation do document/workspace symbols based on their names, open files, and line numbers.
The panel's code is mostly stolen from the LSP plugin which in turn stole it from the Colomban Wendling's Commander plugin.