Skip to content
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

Feature request: use split window for "Go to Symbol Definition" #1394

Open
Dfred opened this issue Feb 15, 2017 · 4 comments
Open

Feature request: use split window for "Go to Symbol Definition" #1394

Dfred opened this issue Feb 15, 2017 · 4 comments

Comments

@Dfred
Copy link

Dfred commented Feb 15, 2017

When a quick glance at a definition is needed often, going back an forth (Alt+left / Alt+right) in the same window appears less useful than using the split window to view that symbol definition for as many glances as needed.

Is it reasonable to extend splitwindow.c with such a feature?
If yes, would a widget (checkbox/toogle icon?) in the split window toolbar be enough to show this behaviour is active?

@codebrainz
Copy link
Member

I would use this feature but I'm not fond of putting a preference in the main UI like that. It would probably fit better in a plugin preferences tab.

More importantly though I think it would be hard to implement cleanly/easily as the core of Geany would have to try and let plugins handle going to definition and if none did then it would have to fall back to the original behaviour. This sort of sound like the "providers" API that was previously discussed for plugins on the mailing list (TLDR; allowing plugins to hook in to builtin features like this).

@Dfred
Copy link
Author

Dfred commented Feb 16, 2017

Agreed: the setting resides best in a plugin preference tab. An explicit visual shouldn't be needed.

Is the mailing list the best place to describe a design feature? Wouldn't a document such as Python's PIP be more suited? My first guess for this was to look in the wiki, with no luck.

Design wise, my first try would be to let a plugin register a hook checked for in cb_func_goto_action() or something conceptually similar. The code is still largely unknown to me so far, so this proposition might not be relevant.

@elextr
Copy link
Member

elextr commented Feb 17, 2017

@Dfred Geany is a small project, the workflow tends to be left to the contributors, not all of whom are professional programmers following a formal requirements/design/code process (and even the professionals want a break from it from time to time), and many changes just turn up as PRs so the robust discussion is post-coding much to the proposer's chagrin. @codebrainz use of the mailing list for a proposal was laudable, but that particular one didn't get enough traction, but did save him wasting time coding.

Of course Gmane's searchable mailing list being down doesn't help make it discoverable either.

The way plugins currently tap into Geany features is for Geany to emit a signal (such as file-open and file-close) and the plugins can connect to those. It depends on the functionality involved whether the plugin adds to the Geany functionality or replaces it, most currently add functionality, but there is no reason that they cannot replace it in your case.

@Dfred
Copy link
Author

Dfred commented Feb 17, 2017

Thanks for these pointers. I shall get back to you eventually with a patch then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants