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 custom 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).
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:
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).