-
Notifications
You must be signed in to change notification settings - Fork 1
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
That aggressive popup (again) #26
Comments
Something similar I think - I check whether Scintilla has focus and if not, don't perform the hover request. But once the request was sent, I didn't check if Scintilla had focus when the asynchronous response arrived and just displayed it. So if you manage to trigger the context menu between sending the request and receiving the response, you get this problem. I hope it's fixed now (but it's so hard to trigger that I'm not sure). And this thing is keybindingable now so you can disable the annoying hover popup, sacrifice Geany documentation, and assign it to F1. This is the right way to use this feature ;-). By the way, I implemented symbol highlighting in the latest version. But I also made an incompatible change in the config file where I prepend Scintilla indicator index in front of these lines so you'll have to add them to your user config file, e.g. by copying them from the global config file: geany-lsp/plugins/lsp/data/lsp.conf Lines 26 to 31 in bf1c5f8
|
Can't, the Oh wait they are there just buried. Why add all those window specific functions to that menu? I guess it doesn't hurt, but I doubt anybody will use it. |
Will keep an eye out for it. |
erm, what do you mean, can't see any difference |
I'll probably move them somewhere else. This is mainly for discoverability of the particular features, people will assign keybindings for the more frequently used ones. |
ok, doesn't work on "invert syntax colours" (the lazy mans dark theme :-) ok, copied setting and changed |
I've just added renaming based on the highlighting info (using Scintilla's support of multiple cursors). This works for renaming inside single file only, I'll add a full-blown project-wide rename later. |
Ok, seems to work with single test :-)
A comment for that which even applies to the single file version. Since it can edit things the user can't see maybe best to do as Vscode does, show a "Colomban inset":tm: (or just a boring popup/dialog) with a list of the files to be changed and the lines to be changed in them and highlight the change and have a checkbox in front of each file and line so the user can verify they want that file/line changed and then click apply or discard. Vscode calls this a "Refactor Preview". The use-case for this is to change only some instances to reference a different name instead. |
Back to the OP topic, we gotta think of something easy(ish) to do with that popup, I just put the cursor on PS thats a 27" QHD display Edit: And if I put the cursor on |
I don't think it's necessary for single-file rename because it's easily undoable. In vscode it corresponds to "change all occurrences" and behaves the same way
So I just implemented the rename but only used a (hopefully scary enough) dialog warning users about how terrible things might happen and that they should have all changes committed in VCS. In my experience, you can't really review the whole change in the simple GUI you propose anyway and it's really best to do it on top of a committed state and see the differences against the last commit. In any case, at least showing the affected files would be good because sometimes one expects the rename to have just a local scope and it turns out to be much bigger afterwards. Regarding the LSP implementation, I'm now doing just a "shallow" implementation of the individual LSP features to have the basic communication with LSP servers done and don't want to get stuck on one feature for too long - I'll possibly improve various things later (and global renaming isn't something I use too frequently so it will rather have lower priority for me). |
Keep the feature disabled, simple :-). OK, but for other popups like signature help or diagnostics I stole The other things I can think of - have a config file option setting the max line number of the hover popup and display I was thinking in the future to implement our own popup - the one provided by Scintilla is extremely limited, it can only show plain text. For instance for function calltip it would be nice to show the currently typed parameter in bold. The popup could be scrollable for hints which would solve the problem I think. |
AFAICT it when using "Rename Symbol" it shows the refactor preview if any of the occurrences are off screen, it only does it automatically if all changes are visible. And if the symbol exists outside the current scope all those are shown in the refactor preview as well, but with the check boxes not checked.
sh-sh-sh-udddddddd-er, @elextr is scared. 😉 But really thats not a good answer, encouraging committing of half done changes to see diffs due to refactor is a bad idea:tm:.
For vscode the "Refactor Preview" is shown in the equivalent of the Geany message pane, not as a popup. That seems to have changed very recently AFAIK, with the addition of the check boxes and accept/dismiss buttons. That would be easier for Geany too.
Thats a start,then just add line numbers and line contents and highlight changes and checkboxes ... ahem, yes well, lets at least start with files.
Ok, so long as it works when its disabled ;-P
Yeah, if it accepted Pango markup for eg. Neil can't do that since its not portable to non-GTK, but its ok for us. Or maybe Markdown.
Of course the answer is another option, this is Geany after all 😉, maybe only show the first line/part, it seems to be intended as a heading, and have a keybinding to show the whole war and peace. But don't know how that will work with other not clangd LSPs, guess its a per language setting. |
hehe, I tried Python, open |
|
Better :-), can we have a "show to first blank line only" option to see how well it works? Both pylsp and clangd seem to put a summarised version first followed by a blank line. |
OK, I added |
I'm closing this one as I believe/hope the OP is fixed and that there are some workaround settings now to make this feature more useful. Feel free to reopen if there's something else left. The right long-term fix here is #28. |
Put the cursor on a symbol, delay for a moment, right click, the symbol popup overwrites the menu making it impossible to select some of the items in the menu. And once its there its persistent, have to go to another symbol to get rid of it, also of course closing the menu.
Its very timing dependent, only happened once or twice. Maybe something like the right click happening after the popup has been idle queued, but not rendered yet (wild ass guess).
The text was updated successfully, but these errors were encountered: