afterschoolstudio / Depot

Structured data editor built inside VS Code
Apache License 2.0
205 stars 20 forks source link

Depot Data Editor does not work with Visual Studio Code Update 1.56.0 #39

Closed mmu closed 3 years ago

mmu commented 3 years ago

Hello, associated json files cannot be opened with Depot Data Editor since the VSC Update 1.56.0. All settings remained the same. Opening the settings.json and editing editorAssociations wants to add a new entry: { "viewType": "", "filenamePattern": "" }

to the existing entry: { "viewType": "depot.data", "filenamePattern": "*.json" }

Reopen Editor With... displays only the text editor option: grafik

Before the VCS-update it also displayed the Depot Data Editor Option.

Behavior tested on two different systems.

Update: Renaming the json-files to .dpo extension works. But the .json extension does not work.

Version: 1.56.0 (user setup) Commit: cfa2e218100323074ac1948c885448fdf4de2a7f Date: 2021-05-04T22:09:06.405Z Electron: 12.0.4 Chrome: 89.0.4389.114 Node.js: 14.16.0 V8: 8.9.255.24-electron.0 OS: Windows_NT x64 10.0.17763

kkukshtel commented 3 years ago

Hey @mmu ! Thanks for finding this. I just looked at the latest code release notes and it seems like this is related to this change:

image

By default, Depot doesn't associate itself with .json, only .dpo, so it makes sense why it wouldn't appear in those settings initially. However, if after changing the setting so that it .json is associated with the custom editor but the editor doesn't show the option makes me think it's a bug with VS Code and how it resolves those editors (it may not pull from additional settings).

I've filed a bug on Visual Studio Code's repo here if you want to track progress on the fix: https://github.com/microsoft/vscode/issues/123617

kkukshtel commented 3 years ago

As an update, I'm also seeing viewType / filename pattern not working at all in 1.56

kkukshtel commented 3 years ago

Code has rolled back their change that introduced this bug, so Depot should work fine in the latest versions of Code (verified on my end).

https://github.com/microsoft/vscode/issues/123617

However, they have changed the format for specifying custom file types, so you'll need to update your settings.json file to have custom support. I've updated the README as well and will have that merged in after the next round of fixes are merged to main. In the case I want to use .cmodwith Depot, I'd use this setting:

{
    "workbench.editorAssociations": {
        "*.cmod" : "depot.data"
    }
}