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

@@ -8,6 +8,7 @@
"json.schemas.schema.desc": "The schema definition for the given URL. The schema only needs to be provided to avoid accesses to the schema URL.",
"json.format.enable.desc": "Enable/disable default JSON formatter",
"json.format.keepLines.desc" : "Keep all existing new lines when formatting.",
"json.sortOnSave.enable.desc": "Enable/disable default sorting on save",
"json.validate.enable.desc": "Enable/disable JSON validation.",
"json.tracing.desc": "Traces the communication between VS Code and the JSON language server.",
"json.colorDecorators.enable.desc": "Enables or disables color decorators",