-
Notifications
You must be signed in to change notification settings - Fork 27.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode API registerTextDocumentContentProvider for binary files #53121
Comments
That's why these types all carry |
/duplicate of #12176 |
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines. Happy Coding! |
They also work for PDFs as evidenced by the PDF extension… |
@jrieken What about that usecase: Someone wants to use a bytecode compiled library (For instance *.class files for java or *.dll for c# in windows). Then he probably wants to see the declarations of classes, functions, ... exported by that library as it would be available as source code. |
As long as the output is textual everything is good and you can use the |
I have OmniSharp installed and clicking on a DLL file in the Explorer pane will bring up the usual "binary file" screen. Does OmniSharp only support displaying metadata from DLL files programatically (say using Go To Definition) or is it possible to get that behavior upon clicking an Explorer pane tree item manually? I think it is not possible, from what I remember, the provider will only fire for what VS Code considers to be actual text files and for some reason PDFs (bug in text file detection algorithm? PDFs are texty), but no other binary files. Can you please confirm my understanding that the provider alone won't add support for click-to-open on binary files? |
Confirmed - the is no support for custom editors or content transformers when opening a file |
I have a question, so I asked it on StackOverflow: https://stackoverflow.com/q/50803834/2715716
But I have received no answer. I can see not a lot of VS Code questions get answered on SO whereas they do get answered when asked on GH. I think unless this changes and the VS Code questions receive the same level or attention as the GH ones, people who don't respect the request will just keep asking on GH and people who are respectful and do won't be receiving any answers. I'd like to receive an answer to mine so regrettably I feel the need to reask it here.
I'd like to offer an option to display fallback content for binary files (of certain extensions) in VS Code.
I've inspected the
workspace.onDidOpenTextDocument
andwindow.onDidChangeActiveTextEditor
APIs, but neither seems to be called when opening binary files.Is there a way to display fallback content using
registerTextDocumentContentProvider
(or otherwise) for binary files?I have inspected two extensions which are sort of related for how they do it:
There is a related issue, but it seems to indicate this is not doable, because TextDocument cannot be made from binary files and the conversation on it is locked down causing follow up discussions to take place in new issues and information to get fragmented.
Is it possible to achieve what I have in mind?
The text was updated successfully, but these errors were encountered: