Skip to content

outline lacks section-heading detection (#region, docstrings, markdown headers) #1636

Description

@Widthdom

Summary

The outline tool emits symbol-kind structure (classes, methods, fields) but does not detect language-level section markers: C# #region blocks, Python module-level docstrings, JS/TS JSDoc @module, or markdown # heading lines. For long files these markers are the human-authored structure that a "table of contents" call should surface — without them, outline of a 2000-line file is a flat list of 80 methods.

Where

  • src/CodeIndex/Mcp/McpToolHandlers.cs (outline handler)
  • src/CodeIndex/Indexer/Languages/* (per-language symbol extractors — region/heading detection would slot in here)

Suggested approach

(1) Extend per-language extractors to emit region/section pseudo-symbols with kind region or heading. (2) Surface them in the outline response with a distinct kind so clients can render them as collapsible sections. (3) For markdown / plain-text files, fall back to ^#+\s heading detection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions