Sublime Forum

Is there an API for goto_symbol_in_project?

#1

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?

0 Likes

#2

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?

0 Likes

#3

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!).

0 Likes

#4

Thanks. Do you know any real code example to see?

0 Likes

#5

Sorry, not really. That’s just what comes from memory from my former experiments.

0 Likes

#6

Bump

0 Likes