In sublime text 3, tmLanguage files are located in
C:\prog files\Sublime Text 3\Packages\language.sublime-package
/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: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<string>entity.name.function, entity.name.type, meta.toc-list</string>
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.