techee / geany-lsp

LSP plugin for the Geany editor
GNU General Public License v2.0
11 stars 1 forks source link

Find references output could be more useful #21

Open elextr opened 9 months ago

elextr commented 9 months ago

Find references on a function name gives a list of the files:lines where it occurs, would be good if the line content could be included to help select which to click on to goto, ie file:line: the line.

For extra credits you could generate the inset subwindow showing the list and the context of the selected item a la Vscode ... what Scintilla won't do that ... bah!!!

Screenshot from 2023-11-13 14-57-00

techee commented 9 months ago

Find references on a function name gives a list of the files:lines where it occurs, would be good if the line content could be included to help select which to click on to goto, ie file:line: the line.

Well, yeah, but it's not so simple. That would require opening each file (if not open already), dealing with various line endings to get to the correct line (or possibly feeding it to an invisible Scintilla editor) and getting those lines.

For extra credits you could generate the inset subwindow showing the list and the context of the selected item a la Vscode ... what Scintilla won't do that ... bah!!!

That one is waiting for Colomban :-).

elextr commented 9 months ago

That would require opening each file (if not open already), dealing with various line endings to get to the correct line (or possibly feeding it to an invisible Scintilla editor)

I bet thats what Vscode does, that inset is a little view on the whole file that contains the selected definition, even though that file is not open in any tabs, see the yellow compile warnings markers in the scrollbar, way below the grey line that marks current line position.

Well, that makes it much easier, just a Scintilla view inside a Scintilla view, just make annotations able to take a widget as their content, Columban would knock that up in a jiffy ;-P.

techee commented 9 months ago

So yeah, done in the non-Colomban way ;-).