A Visual Studio Code symbols provider based on Ctags. This extension provides the following capabilities:
- Go to Definition (F12)
- Go to Symbol in File (⇧⌘O) as well as the Outline
- Go to Symbol in Workspace (⌘T)
First of all, make sure you have Universal Ctags installed.
In order to provide symbol definitions a tags file must be present. You can generate it using the "Rebuild Ctags" command via the Command Palette (⇧⌘P). It will run ctags and generate a tags file inside your project directory. The extension will then use readtags to perform symbol definition lookup.
Default: "ctags -R --fields=+nKz"
Command to generate the tags file. This command is used by the Terminal > Run Task... > Ctags Companion: rebuild tags task.
"ctags-companion.command": "ctags -R --fields=+nKz"Default: {"scheme": "file"}
Document selector object used when registering symbol providers, read more at https://code.visualstudio.com/api/references/vscode-api#DocumentSelector.
"ctags-companion.documentSelector": {"scheme": "file"}Default: "readtags -en"
The command used for the "go to definition" feature (i.e. F12 or Ctrl+click).
"ctags-companion.readtagsGoToDefinitionCommand": "readtags -en"Default: "readtags -enpi"
The command used for the "go to symbol in workspace" feature (i.e. Ctrl+T).
"ctags-companion.readtagsGoToSymbolInWorkspaceCommand": "readtags -enpi"Default: "ctags --fields=+nKz -f -"
The command used for the outline and the "go to symbol in editor" feature (i.e. Ctrl+Shift+O).
"ctags-companion.ctagsGoToSymbolInEditorCommand": "ctags --fields=+nKz -f -"- macOS:
brew install universal-ctags - Ubuntu:
apt install universal-ctagsorbrew install universal-ctags - Windows:
winget install 'Universal Ctags'