Closed axelboc closed 2 years ago
It may be useful to take inspiration from https://github.com/microsoft/vscode-hexeditor
@mkitti anything specific in mind? The hex editor is not associated with any specific extension, but in our case, we do want the H5Web editor to be the default editor for at least some extensions. If I've missed something, please feel free to open a PR! :pray:
The workbench.editorAssociations
they mention in the README seems like something to look into
"workbench.editorAssociations": {
"*.hex": "hexEditor.hexedit",
"*.ini": "hexEditor.hexedit"
},
Nice, I can definitely add this to the README for sure, good call. I can't quite picture whether it's doable for the extension to automatically associate itself with the default extensions by updating this setting. :shrug:
Fix #6
I think I've finally found a way to allow opening files with any extension. I've added a new custom editor contribution point with a
priority
set tooption
. This allows showing H5Web in the "Open with..." menu of every file as suggested in #6, while still not making it the "default" editor for every file (which would break VS Code, obviously).The downside is that H5Web now appears twice in the "Open with" menu of files with supported extensions. For this reason, I've named the fallback editor "H5Web (any extension)".