Sort JSONC files on save (#188480)

* adding the initial code for sorting on save setting

* adding code, it is working, but how to get the text editor options

* cleaning the code

* making the callback synchronous, why does waitUntil not work

* removed unwated edit

* previously the check on is text edit instance was throwing an error, now checking manually that it is working

* chaning the return type of `getOptionsForDocument` to udnefined by default

* Convert to TextEdit instances

---------
This commit is contained in:
Aiday Marlen Kyzy
2023-08-02 12:24:03 +02:00
committed by GitHub
parent 7248433faf
commit 9c184b6007
3 changed files with 61 additions and 16 deletions

View File

@@ -91,6 +91,12 @@
"default": false,
"description": "%json.format.keepLines.desc%"
},
"json.sortOnSave.enable": {
"type": "boolean",
"scope": "window",
"default": false,
"description": "%json.sortOnSave.enable.desc%"
},
"json.trace.server": {
"type": "string",
"scope": "window",