In sublime text 3, tmLanguage files are located in
C:\prog files\Sublime Text 3\Packages\language.sublime-package
or
/opt/sublime-text-3/packages/language.sublime-package on linux.
Not sure about mac.
There’s files called ‘Symbol List.tmPreferences’
The default, for example is:
[code]<?xml version="1.0" encoding="UTF-8"?>
name
Symbol List
scope
entity.name.function, entity.name.type, meta.toc-list
settings
showInSymbolList
1
uuid
0A0DA1FC-59DE-4FD9-9A2C-63C6811A3C39
[/code]
The scope section determines what get indexed. Many languages override this default with their own. It does use tmLanguage files (the same files that dictate syntax highlighting) to do indexing. So macro expansion would not be possible through these default channels, and no there is no exposed API as of yet to define custom rules or symbols for indexing. As of right now, you would be better off writing your own indexer and leveraging the limited capabilities of the current indexer.
The window class has lookup_symbol_in_index(symbol) and lookup_symbol_in_open_files(symbol) and you could use view.scope_name(point) to determine a word’s type in the file to determine if you should run your macro-expander or not.
Just a thought.