Code Outline tree provider for Visual Studio Code

July 11, 2018 ยท View on GitHub

:warning: DEPRECATED. Please use the Outline view that comes with Visual Studio Code.

Features

Displays a code outline tree in the explorer pane.

To activate find and expand the "Code Outline" section near the bottom of the Explorer tab.

Language Support

For the outline to work, the language support plugins need to support symbol information.

For the outline to form a tree structure, the language support plugins need to report the entire definition range as part of symbol.

See VS Code issue #34968 and language server protocol issue #132 for a discussion.

Here is a list of languages known to work with Code Outline:

Language/FormatExtension
CC/C++
C++C/C++, cquery
DockerDocker
HTMLComes with VS Code
GoGo
JavaLanguage Support for Java(TM) by Red Hat
JavaScriptComes with VS Code
JSONComes with VS Code
MarkdownComes with VS Code
PerlPerl
PHPPHP Symbols
PowershellPowerShell
PythonPython
RustRust (rls)
TypeScriptComes with VS Code
YAMLYAML Support by Red Hat

Please report any missing extensions and I'll update the list.

Extension Settings

Default settings:

{
  "symbolOutline.doSort": false,
  "symbolOutline.sortOrder": [
    "Class",
    "Module",
    "Constant",
    "Interface",
    "*",
    "Constructor",
    "Function",
    "Method"
  ],
  "symbolOutline.expandNodes": [
    "Module",
    "Class",
    "Interface",
    "Namespace",
    "Object",
    "Package",
    "Struct"
  ],
  "symbolOutline.topLevel": [
    "*"
  ]
}
  • doSort: sort the outline.
  • expandNodes: kinds of nodes to be expanded automatically.
  • sortOrder: order to the sort symbols.
  • topLevel: wich symbols include at the topmost scope.

Known Issues

Depending on other extensions you have installed the symbol list may initially return an empty list. Use the "Refresh" button next to the title to fix this.