Skip to content

Can I open a binary file as a text document? #2638

Discussion options

You must be logged in to vote

Hi @racz16 ,

Right now, your scenario is not supported. Both Custom Editors API (CustomTextEditorProvider and CustomEditorProvider) are intended for read/write editors, which means they intend to give the extension author a custom view to display/edit the file. That's why both APIs require the extension to provide a WebView as the container of its file.

You could use Monaco Editor or ShikiJS in order to have syntax highlighting capabilities, but language features like Got To Definition or Code Completion won't be available out of the box.

If this doesn't fit your needs, I would suggest you to open a feature request in the VS Code repo (https://github.com/microsoft/vscode/issues) so the VS…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@racz16
Comment options

Comment options

You must be logged in to vote
1 reply
@racz16
Comment options

Answer selected by racz16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants