Terminal: Ask vscode team to allow comments in Terminal config file

Created on 14 Oct 2019  路  9Comments  路  Source: microsoft/terminal

See https://github.com/microsoft/vscode/issues/78559. vscode marks profiles.json as bad syntax.

As @octref said when closing that issue, this can be fixed if every user who uses Terminal and vscode sets files.associations for profiles.json, but it would be better for all users if vscode just worked with Terminal out of the box.

The best way to do this is for someone from Microsoft's Terminal team to speak to someone else from Microsoft's vscode team.

Issue-Feature Needs-Tag-Fix Needs-Triage

Most helpful comment

@cinnamon-msft fixed in vscode, see https://github.com/microsoft/vscode/issues/78559

All 9 comments

Hey @Tyriar, who would we ask on your side? Is there something we should do apart from not calling our profile file profiles.json?

profiles.json seems pretty generic and I don't think we can change language type based on the path of a file so I'm not sure we would be able to do this.

@alexr00 any ideas on supporting profiles.json (eg path: C:\Users\<user>\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\profiles.json) to be jsonc?

The easiest way would be to simply add a .vscode folder to the root of the terminal project and have settings.json file in that folder which sets the files.associations. It would be similar to https://github.com/microsoft/vscode/blob/master/.vscode/settings.json#L13
Would that work?

VScode itself uses the generic name settings.json for its config file and allows comments, now showing them as errors - how is this achieved?

image

Ah, so if Terminal writes a vscode settings file next to the user鈥檚 profiles.json (which is, broadly speaking, of unknowable path) then Code will pick it up? Interesting idea...

@alexr00 there is no terminal project, the terminal opens the default editor (vscode) when you hit ctrl+, and a bunch of errors show up because they support comments. If there any way we could special case the particular terminal profiles.json path to be jsonc instead of json?

Ah ok I understand now. I thought the issue was occurring when users were cloning this repo and opening profiles.json. Now I see that profiles.json is a file that anyone with the terminal might open.

We discussed it and I'll just add profiles.json to our list of files that we highlight with jsonc.

@cinnamon-msft fixed in vscode, see https://github.com/microsoft/vscode/issues/78559

Thanks all! 馃憤馃徏

Was this page helpful?
0 / 5 - 0 ratings