Home Download Buy Blog Forum Support

Is there an API for goto_symbol_in_project?

Is there an API for goto_symbol_in_project?

Postby xeno.by on Sat Jul 27, 2013 5:41 pm

I'd like to roll my own implementation of Goto Symbol in Project that displays previews of currently selected symbols in the list. However in the docs I can only see lookup_symbol_in_index and lookup_symbol_in_open_files, but not something like list_symbols_in_index. Am I overlooking something?
xeno.by
 
Posts: 104
Joined: Mon Jan 30, 2012 10:03 am
Location: Lausanne, Switzerland

Re: Is there an API for goto_symbol_in_project?

Postby mgaitan on Tue Jul 30, 2013 2:53 am

I craft this plugin https://github.com/dbousamra/sublime-rst-completion to write restructuredtext easily with ST2/3. I've already done a parser to get headers and its (getting the raw heeder, its line, level and associated region) and I want to feed the "Go to symbol" finder with this information in order to move beetwen them in a fuzzymatch way.

Any example on this?
mgaitan
 
Posts: 5
Joined: Tue Jul 30, 2013 12:49 am

Re: Is there an API for goto_symbol_in_project?

Postby xeno.by on Tue Jul 30, 2013 9:24 pm

This should be doable with show_quick_panel. ST3 defines the on_highlighted callback that can be used to open temporary views into the thing you're currently focused at (using open_file with sublime.TRANSIENT). In ST2 you could achieve the same thing with a bit more hassle by intercepting on_selection_modified of the quick_panel view (yes, it's a view!).
xeno.by
 
Posts: 104
Joined: Mon Jan 30, 2012 10:03 am
Location: Lausanne, Switzerland

Re: Is there an API for goto_symbol_in_project?

Postby mgaitan on Thu Aug 01, 2013 12:00 am

Thanks. Do you know any real code example to see?
mgaitan
 
Posts: 5
Joined: Tue Jul 30, 2013 12:49 am

Re: Is there an API for goto_symbol_in_project?

Postby xeno.by on Thu Aug 01, 2013 7:26 am

Sorry, not really. That's just what comes from memory from my former experiments.
xeno.by
 
Posts: 104
Joined: Mon Jan 30, 2012 10:03 am
Location: Lausanne, Switzerland

Re: Is there an API for goto_symbol_in_project?

Postby xeno.by on Sun Aug 04, 2013 7:41 am

Bump
xeno.by
 
Posts: 104
Joined: Mon Jan 30, 2012 10:03 am
Location: Lausanne, Switzerland


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 4 guests