0

In sublime text 4, now go to symbol will show mixed symbols. For example. if I have a markdown file, and inside the file there is some go snippet code, go to symbol will show both markdown source’s symbol and go source’s symbol mixed, and the mixed mess make go to symbol help less to show the markdown’s structure.

So is there a way to restrict the go to symbol only show symbol from the main source? like inside a *.md file, only show markdown’s symbol? Like the old days?

unifreak
  • 773
  • 6
  • 17

1 Answers1

0

See: https://forum.sublimetext.com/t/how-to-restrict-go-to-symbol-only-show-symbol-from-one-source/64066

There is a patch to do this: https://github.com/deathaxe/sublime-packages/blob/838d21fe511b993ccaff86daa7dac663b58ecf91/Markdown/Symbol%20List%20-%20Hide.tmPreferences

But it's not released yet. You can manually create a Symbol List - Hide.tmPreferences file under sublime text's Pacakges/Markdown/ folder with the content:

<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
    <key>scope</key>
    <string>
        text.html.markdown markup.raw.code-fence,
        text.html.markdown meta.toc-list.id
    </string>
    <key>settings</key>
    <dict>
        <key>showInSymbolList</key>
        <integer>0</integer>
        <key>showInIndexedSymbolList</key>
        <integer>0</integer>
    </dict>
</dict>
</plist>

To do this, you may need install PacakgeSourceViewer package, and extract the Markdown package first.

unifreak
  • 773
  • 6
  • 17