The document symbol provider interface defines the contract between extensions and the go to symbol-feature.

Fields

provideDocumentSymbols(document:TextDocument, token:CancellationToken):ProviderResult<EitherType<Array<SymbolInformation>, Array<DocumentSymbol>>>

Provide symbol information for the given document.

Parameters:

document

The document in which the command was invoked.

token

A cancellation token.

Returns:

An array of document highlights or a thenable that resolves to such. The lack of a result can be signaled by returning undefined, null, or an empty array.