When navigating through a file in Geany, the highlighted function in the side panel (Symbols) could change to reflect the function our cursor is inside. I think this could help a lot while debuging, and doesn't seem too hard to do. I'm not sure if this is the place to ask for it, though. Thank you all for the great software! :)
I'm fairly new to this repository but would like to contribute for this feature. I think that such a feature would need to be implemented around the tags manager. Right now, I think it has an explicit mapping between symbol names and start position. A little challenge would be to be efficient in resolving the end of the current symbol. What do you think?
I think it would be very useful, even if using only the start position of the present function and the start position of the next function.
I mean, I'd like to wait for an experienced committer here to say what he has in mind for that. There are many ways to implement something like that, and many wrong ways too. If that's a good feature it needs to be fully done, not like a quick workaround.
@frederik-labbe currently the "scope" information on the status bar is computed with `symbols_get_current_scope()`. It's kind of tricky/hacky because no, currently there is no information as to where the tag ends in the CTags side. Universal-CTags is improving this, but we don't use it yet, and it's not supported for every languages at all either. What we currently do is a mix of "between 2 tags starts" and looking at Scintilla's fold points to see if we're inside the right thing.
It would probably be possible, or maybe even fairly easy, to slightly alter this code so it properly gives out a tag structure if it can find one.
As to the feature, I think it sounds nice. I didn't investigate if it would have downsides yet though, but well it can always be an option.
Hum, I thought we merged #1280 already, but well, as we didn't yet: currently there's a bug with signatures spanning multiple lines, the mentioned PR fixes it. I'll clean it up and merge it soon.
Currently the status bar scope does not show the function if the cursor is on a line of the prototype (thats ok, since its not inside the scope, (@b4n, does #1280 change that?)) but clicking on a symbol in the symbols pane takes you to that line, so clicking on a symbol to go to a function would not highlight the function in the symbol pane if using the status bar scope definition.
Interesting consideration, I think that a distinction needs to be made between the user updating the caret position and the user clicking on a symbol to implicitly update it. Scintilla seems to be notifying through an update event but the *line click* event is up to us to figure out.
Maybe the prototype could highlight the symbol in the treeview, but status bar would continue to say that it's not in scope. IMO it would make sense for the prototype to be relevant to the symbol, as long as it don't say it's in scope.
Sure, its just a mere matter of programming, all it needs is somebody to do it.
github-comments@lists.geany.org