Adding the server and client code to the JSON language features extensions to enable JSONC sorting in VS Code (#174352)

* temporarily changing the funcion onFromat to be able to trigger the sorting on real examples

* adding the DocumentSortingRequest

* accesssing directly the text edits from the request

* added code in order to provide the link between the json sorting capabiliites and vscode

* adapting to the new api output of the sort function

* instead of using await use then inside of the command that registers

* textEditor replaces window.activeTextEditor

* adding changes from review

* update service

* use SortOptions

---------

Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
This commit is contained in:
Aiday Marlen Kyzy
2023-02-17 19:49:05 +01:00
committed by GitHub
parent b4e6254d60
commit eee87af252
7 changed files with 113 additions and 15 deletions

View File

@@ -17,5 +17,6 @@
"json.maxItemsComputed.desc": "The maximum number of outline symbols and folding regions computed (limited for performance reasons).",
"json.maxItemsExceededInformation.desc": "Show notification when exceeding the maximum number of outline symbols and folding regions.",
"json.enableSchemaDownload.desc": "When enabled, JSON schemas can be fetched from http and https locations.",
"json.command.clearCache": "Clear schema cache"
"json.command.clearCache": "Clear schema cache",
"json.command.sort": "Sort document"
}