Closed AgentRBY closed 1 year ago
For now, I personally use shift+enter keybind, which powered by Commands and Comma Enter extensions as its useful for absolutely all languages (e.g. objects in TypeScript). In JSON we can easily implement the same behavior as in WS by overriding Enter
and Ctrl+Enter
.
P.S.: Not sure if JSON is specific to this plugin
This extension was originally created to fix errors (diagnostics) in JSON files, but I'm going to add a lot of commands / on-type JSON-specific fixes (such as autoEscapeQuoteJson) so I think its perfect place for this request.
Not a bad solution, but there are problems. Comma Enter generally works everywhere, but in WebStorm the comma only works if the character next to '
or "
or }
or ]
In VS Code I now have this:
I just tested this on a release extension and it doesn't work for me on two devices. Everything is ok in development mode @zardoy does this feature work for you?
Yes,
The problem is obvious: it just doesn't work with CRLF, however tests a bit harder to fix than I expected, will do within a few hours.
The problem is obvious: it just doesn't work with CRLF
Oh, okay, I'll fix it after work.
Oh, okay, I'll fix it after work.
Sorry, didn't see that, the fix was extremely simple, it was initially my failure as I didn't setup tests correctly (file in integration tests was always using LF, dispite of files.eol
is set to auto)
In WebStorm, if you press
Enter
after curly brackets in JSON, a comma will automatically appear. It would be cool to implement this in VS Code Example:P.S.: Not sure if JSON is specific to this plugin, but either way it would be useful