我正在开发Visual Studio Code扩展,以使用自定义扩展打开二进制文件。
我已经通过package.json
文件添加了对自定义扩展的支持,但是打开文件后并没有立即触发activate()
函数,因为Visual Studio Code首先显示了警报:
The file is not displayed in the editor because it is either binary or uses an unsupported text encoding. Do you want to open it anyway?
我可以在用户界面的其他部分(右键单击菜单,顶部按钮等)触发扩展,但是我希望它是无缝的。
是否可以绕过此警告?还是在“仍然打开文件”之前起作用的激活触发器?
非常感谢。