[quote=“jboner”]Yeah. That is what is happening. The Goto Symbol works fine as usual, but Goto Definition returns: ‘Unable to find X’
How can I make this work?[/quote]
Firstly, you can see what symbols will be indexed for the current file via entering this in the console:
view.indexed_symbols()
You can also do view.symbols() to see what will be shown in the regular symbol view.
Indexed symbols are controlled by the showInIndexedSymbolList preference, which is defined in .tmPreferences files. Most syntax definitions are covered by the contents of Default/Symbols.tmPreferences, but the scala syntax definition appears to assign scope names differently.
In short, you need to edit “Packages/Scala/Symbols.tmPreferences” and change it to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List</string>
<key>scope</key>
<string>entity.name.function.declaration, entity.name.class.declaration, entity.name.val.declaration, entity.name.type.declaration</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>showInIndexedSymbolList</key>
<integer>1</integer>
</dict>
<key>uuid</key>
<string>31262BFB-520A-4253-A81C-60023C0CFC8B</string>
</dict>
</plist>
The changed lines above are just adding the value for showInIndexedSymbolList. I’ll make this change for the next build, but you can make it locally in the mean time. You’ll need to save the above contents into the Packages/Scala/Symbols.tmPreferences file. This will then override the version that’s stored in Scala.sublime-package.