diff --git a/src/goOutline.ts b/src/goOutline.ts index 05d902430..df3d1ef2e 100644 --- a/src/goOutline.ts +++ b/src/goOutline.ts @@ -110,12 +110,17 @@ export class GoDocumentSymbolProvider implements vscode.DocumentSymbolProvider { symbols: vscode.SymbolInformation[], containerName: string, byteOffsetToDocumentOffset: (byteOffset: number) => number): void { - + const ignoredSymbols = ['_']; let gotoSymbolConfig = vscode.workspace.getConfiguration('go', document.uri)['gotoSymbol']; let includeImports = gotoSymbolConfig ? gotoSymbolConfig['includeImports'] : false; + (decls || []).forEach(decl => { if (!includeImports && decl.type === 'import') return; + let label = decl.label; + + if (ignoredSymbols.indexOf(label) !== -1) return; + if (decl.receiverType) { label = '(' + decl.receiverType + ').' + label; }