Comments (15)
I've updated wtq to also look for ".jsonc" and ".json5" files (and we can easily add more extensions of course), so if you now use a file called "windows-terminal-quake.jsonc" and VS Code at least will automatically switch to "JSON with comments" highlighting.
from windows-terminal-quake.
Yes, as far as I understand we can simply rename the file to have json5
as an extension.
VS Code users would need to install a plugin for JSON5 syntax.
JetBrains editors like WebStorm already natively support JSON5 syntax.
We can keep json-schema exactly the same. It seems to work just fine:
Obviously we'd need to read the config from this new file as well.
Lastly, we would probably need some kind of strategy with backward compatibility (i.e. prefer .json5, but fallback to .json if it exists), so that we do not break existing configurations.
Maybe it's also nice to write up a migration guide between versions. For this step a user would just rename their .json
file to .json5
.
from windows-terminal-quake.
@webbertakken Thank you for your thoughts on this, I really appreciate it.
I'll look into a YAML parser, and specifically see whether this works with VS Code as nicely as JSON does, when combined with a schema file. I'll also do some tests with other well-known editors, since I like having stuff "just work" without specific editors or addons.
from windows-terminal-quake.
Regardless of whether to use json5 or standardize jsonc, I think it is a good idea.
For
jsonc
, we should use extension namejsonc
, notjson
.
Yeah good point, I'll update the shipped/generated config file in the next update.
from windows-terminal-quake.
@webbertakken Cool suggestion! Does this just entail a change of file extension, or how do you signal this to the editor?
from windows-terminal-quake.
@webbertakken I definitely think that's a great suggestion, I've been annoyed by the lack of support for comments for while already.
One thing I do worry about though, is the requirement for additional plugins or a specific editor, in order for the JSON stuff to work. Currently, most editors understand both the JSON syntax and the accompanying schema file. Moving to JSON5 could mean that this is no longer the cause. Do you have any thoughts on this?
from windows-terminal-quake.
As pointed out in my last comment, It's natively supported in Webstorm, but VS Code needs a plugin.
JSON-schema support stays unchanged.
Note that the plugin is offered immediately, the moment you open the file. All you have to do is click install.
For further rationale you could look at this discussion about the config file from VS Code itself , where the community seems to be in favour, but the developers do not see enough value in the change (VS Code internally supports their own format of JSONC (what is?), thus they don't have the comment problem we do).
In my opinion both YAML and JSON5 are well defined formats, and both more suitable than plain JSON files, which are intended for data-interchange (or simply payloads of data).
from windows-terminal-quake.
@webbertakken So what about just supporting yaml instead? This would allow comments, and should work on most major editors.
It's nice to know that VS Code suggests the plugin right away, though.
from windows-terminal-quake.
Afaik YAML is natively supported in all IDEs, so there's that.
I feel YAMLs upside is that it's more concise and much easier to read once you're used to it while its downside is that people new to it may mess up both syntax and spacing. Maybe you're right and YAML would be the better option. But lets make sure we do have a definition file in that case as well.
Personally I have no preference between JSON5 or YAML.
If you want to consider all viable options, there's TOML as well.
from windows-terminal-quake.
I noticed today that the settings.json
file used directly for windows terminal settings does not produce errors for comments when using vscode, so it must be possible without changing the file extension or going to YAML.
I noticed the schema files for WT and w-t-q each reference a different base schema, maybe a place to start?
from windows-terminal-quake.
@juventus18 Could you tell us what VSCode is saying about the file format? It may be that you're using "jsonc", or "JSON + Comments":
from windows-terminal-quake.
@flyingpie yeah, when I open WT settings.json
it auto-detects "JSON with comments". When I open windows-terminal-quake.json
it auto-detects to plain "JSON". A little quirky, but it seems that simply renaming windows-terminal-quake.json
to settings.json
makes VSC auto-detect "JSON with comments" rather than "JSON".
The red lines did bother me a little bit before, but now that I know I can just manually switch, seems nbd (and a handy tidbit for other bothersome JSON files).
from windows-terminal-quake.
VS Code allows this for their own settings file. See also earlier references.
It's not a good solution for any product that isn't vs code itself. Also editing that config in other IDEs will not auto-detect jsonc because it doesn't match the spec.
from windows-terminal-quake.
json5 is still a subset of JS itself. So you can set your editor to JS for syntax when editing a file. Also, it's a superset of JSON and JSONC and probably any 'json with comments' format MS uses, so a rename to .json5 is an easy way to upgrade files.
from windows-terminal-quake.
Regardless of whether to use json5 or standardize jsonc, I think it is a good idea.
For jsonc
, we should use extension name jsonc
, not json
.
from windows-terminal-quake.
Related Issues (20)
- Horizontal coverage does not allow decimals HOT 3
- Unexpected behaviour: Terminal content scrolls up when console is hidden. Input position stays. HOT 4
- Unexpected behaviour: Hiding console after maximizing window reverts back to old size.
- Error opening terminal HOT 6
- Package/Release on winget HOT 7
- Toggling always switches back to the original virtual desktop (v1.2.0+) HOT 2
- Support multiple modifiers HOT 5
- Fix scoop installation on Quake Documentation HOT 1
- MSTerminal: snapToGridOnResize= false. Incompatible with windows-terminal-quake HOT 9
- Running it with administrative permission HOT 3
- Can you do the quake behavior for multiple apps? HOT 25
- "Main window handle not accessible" when having windows-terminal-quake start WT Preview 1.9 HOT 7
- Question: Terminal Preview support for Quakemode? HOT 6
- Sometimes it isn't openned at full screen and shows the taskbar HOT 2
- float values no longer accepted for *ScreenCoverage HOT 3
- Weird input focus behavior on v1.2.0 HOT 4
- Main window handle not accessible HOT 3
- Drop down when a new instance of Windows Terminal is launched HOT 1
- screen cleaned when losing then getting back focus HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windows-terminal-quake.