Sublime Forum

Difference between settings showInSymbolList and showInIndexedSymbolList

#1

Some examples of the difference would be helpful.

showInSymbolList

Optional. Links symbols to the local symbol list. Valid values are 0 or 1. If 0, the corresponding symbols will not be displayed.

<key>showInSymbolList</key>
<integer>1</integer>

showInIndexedSymbolList

Optional. Links symbols to the global symbol list. Valid values are 0 or 1. If 0, the corresponding symbols will not be displayed.

<key>showInIndexedSymbolList</key>
<integer>1</integer>

Reference: http://docs.sublimetext.info/en/latest/reference/symbols.html#settings-subelements

1 Like

#2

Local (i.e. current file): Ctrl+R

Global (i.e. project-wide): Ctrl+Shift+R

2 Likes

#3

Thanks. That’s what I figured. I just could see why my symbols were showing in both. Turns out the default package defines some generic settings.

Packages/Default/Indexed Synbol List.tmPreferences

<?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">
<plist version="1.0">
<dict>
    <key>scope</key>
    <string>entity.name.function, entity.name.type</string>
    <key>settings</key>
    <dict>
        <key>showInIndexedSymbolList</key>
        <string>1</string>
    </dict>
</dict>
</plist>

Those defaults probably need to be updated to reflect the new changes in syntaxes.

Thanks.

0 Likes

#4

Which default syntax are you running into problems with using the default settings?

0 Likes

#5

It wasn’t so much a problem, I was just puzzled a bit.

I have a custom syntax, PHP Grammar, and I saw that there was an issue with the goto definition of the default PHP package, which you fixed by defining “showInIndexedSymbolList” settings. The php-grammar didn’t define those and yet the goto wasn’t broken. I couldn’t understand why until I found that the Default package defined generic settings.

0 Likes

#6

entity.name.class and entity.name.interface should very likely be added to the general indexed symbol list preference file, too, thus making two of the php-specific scopes (+ the already redundant entity.name.function) obsolete.

0 Likes

#7

Probably entity.name.struct, entity.name.trait also. Those are also used by multiple other languages (trait is PHP and Rust, struct is Go and C/C++).

0 Likes