Skip to content

Support DocumentSymbolProvider in CustomTextEditor #327247

Open

Description

I think it would be a great idea if CustomTextEditor supported DocumentSymbolProvider since CustomTextEditor use TextDocument as a model.

For example, I am writing an extension with the new CustomTextEditor APIs for special xml files that can be rendered in a special way. I have written a DocumentSymbolProvider for xml files with this schema and I expected the Outline view to be populated by the symbols.

Other examples for how useful it would be to support DocumentSymbolProvider are:

Getting the outline for markdown documents while displaying the preview mode
Could be ground work to make the Outline view work with jupyter notebooks (see the sections tree view on Google Colab to get an idea of the end result)
Many UI frameworks use xml to describe a layout, with custovem editors and DocumentSymbolProvider you could potentially have GUI based editor and the view hierarchy in the outline
Ideally the CustomTextEditor should be able to intercept "goto symbol" events to focus the symbol in the custom editor (i.e. going to a particular section or highlighting an element in the layout editor).

(copied over from issue #97095, cause now a pull request exists)

Activity

  1. jogibear9988 commented on Jul 24, 2026

    @jogibear9988
    ContributorAuthor

    pull: #304909

    original issue: #97095

  2. lppedd commented on Jul 26, 2026

    @lppedd

    Very much in favor of this.

    I would also extend this to webview panels, but as a starting point custom editors are good enough.
    Jochen Kühner (@jogibear9988) does your solution work for non-textual custom editors?

    We have customers requesting outlines, and a native approach would be far better than trying to come up with yet another tool window webview, or with an in-editor custom outline.

  3. jogibear9988 commented on Jul 26, 2026

    @jogibear9988
    ContributorAuthor

    Custom Editors are a webview.
    I created a WYSIWYG HTML editor, and the outline view works with it. So yeah, it works for non textual editors

  4. lppedd commented on Jul 26, 2026

    @lppedd

    Custom Editors are a webview

    Yes, but we don't always need a custom editor when a webview panel is sufficient without all the editor infrastructure. The "workaround" in this case, if we want an outline, would be to convert the panel to a read-only editor.

  5. jogibear9988 commented on Jul 26, 2026

    @jogibear9988
    ContributorAuthor

    I can check if a Editor is really needed…
    I did this months ago, so I don‘t know any more…

  6. lppedd commented on Jul 26, 2026

    @lppedd

    Keep it as it is, I'd avoid changes now. I'm honestly more interested into them reviewing your code.

  7. jogibear9988 commented on Jul 26, 2026

    @jogibear9988
    ContributorAuthor

    Keep it as it is, I'd avoid changes now. I'm honestly more interested into them reviewing your code.

    Don‘t know if this happens

  8. lszomoru commented on Jul 27, 2026

    @lszomoru
    Member

    Dirk Bäumer (@dbaeumer), could you please triage this issue? Thank you!

  9. telamonian commented on Aug 5, 2026

    @telamonian

    Could be ground work to make the Outline view work with jupyter notebooks

    As a Jupyter dev, I support this effort.

    I also want this pulled in to help fix a years-long pet peeve of mine: the missing outline in markdown preview. Why the hell does my markdown outline disappear when I go from raw to preview? I understand that from a practical perspective the preview outline requires the missing functionality that this issue/pr would provide. But from a UX perspective it's complete dogwater

  10. lppedd commented on Aug 5, 2026

    @lppedd

    Yeah having this as the single entry point for outlines would solve soooo many UX issues. There is no reason to have everyone create their own custom outlines, it's just a usability nightmare.

  11. jogibear9988 commented on Aug 6, 2026

    @jogibear9988
    ContributorAuthor

    looks like this in my wysiwyg html designer:

    Image
  12. added
    feature-request
    on Aug 10, 2026
  13. vs-code-engineering commented on Aug 10, 2026

    @vs-code-engineering
    Contributor

    This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  14. vs-code-engineering commented on Aug 12, 2026

    @vs-code-engineering
    Contributor

    🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  15. removed their assignment
    on Aug 28, 2026
  16. jogibear9988 commented on Oct 22, 2026

    @jogibear9988
    ContributorAuthor

    It's now getting more and more irelevant, as the days of the coding IDE's are nearly over.... I more and more start VSCode myself, or edit any code with it...
    So for me, it does not matter any more if this ever will land.

    And as I see, when I created the Pull for this, vscode had 1k of open pulls, now it's 3k... so I think also the days of open source mergenes are nearly over, as noone can review this amount of code

  17. lppedd commented on Oct 22, 2026

    @lppedd

    I'd prefer this to be merged to be honest. VS Code is a platform, and it's not used exclusively for coding. We build custom editors and webviews for more "resource-management" style workflows, and those would benefit from reusing the standardized outline.

    But I understand the frustration...

  18. jogibear9988 commented on Oct 22, 2026

    @jogibear9988
    ContributorAuthor

    I would also prefer it... but it seems to me nothing is going on any more, at least no reaction to community pull requests....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apifeature-request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions