In Sublime Text, I'm used to accessing function names through the @
symbol list. However, when using a project established from vue-templates, all the function names and data attributes in .vue
files do not appear in this list.
This makes navigating .vue
files tedious. I have installed all vue-related Sublime packages but none of them seem to fix this.
How can I get symbol indexing working properly with Vue files? Or, do you have any experience with other text editors that do this properly?
The symbol list in Sublime (visible via Goto > Goto Symbol...
or Goto > Goto Symbol in Project...
) is controlled primarily by the syntax definition for the language in question and secondarily by configuration metadata that tells Sublime what parts of the syntax are actually symbols that should be displayed in the symbol list.
In general:
scopes
that describe the purpose of each bit of text (e.g. "This is a string", "this is a method call", etc)scopes
are considered symbols, both for the current file as well as project wideThe two parts of this need to work hand in hand in order for the symbol lists to populate correctly (as Sublime can't guess on its own), and both parts should be provided by the package or packages that are providing Vue support to Sublime.
The best course of action would be to raise an issue with the developers for the Vue package that's providing the Syntax definition. It's possible that the simple inclusion of an appropriate Symbol List.tmPreferences
file by the syntax author would be enough to fix the issue.
It's also possible that the symbol list is not fully populated because sublime is still indexing all of the files in the project and so the data is not available yet.
You can check the status of the indexer in recent builds of sublime by selecting Help > Indexing Status...
from the menu to see if that's the issue. However unless you have an extremely large set of files this is likely not the issue.