use yarn link vscode-json-languageservice in vscode/extensions/json-language-features/server to run VSCode with the latest changes from vscode-json-languageservice
run VSCode out of source (vscode/scripts/code.sh|bat) and open a .json file
in VSCode window that is open on the vscode-json-languageservice sources, run command Debug: Attach to Node process and pick the code-oss process with the json-language-features path
set breakpoints, e.g. in jsonCompletion.ts
in the instance run from sources, invoke code completion in the .json file
vscode-json-languageservice
JSON language service extracted from VSCode to be reused, e.g in the Monaco editor.
Why?
The vscode-json-languageservice contains the language smarts behind the JSON editing experience of Visual Studio Code and the Monaco editor.
For the complete API see jsonLanguageService.ts and jsonLanguageTypes.ts
Installation
Sample usage
See sample.ts for an example on how to use the JSON language service.
To run the sample use
yarn sampleDevelopment
Use
yarn testto compile and run testsHow can I run and debug the service?
jsonCompletion.tsHow can I run and debug the service inside an instance of VSCode?
yarn link vscode-json-languageserviceinvscode/extensions/json-language-features/serverto run VSCode with the latest changes fromvscode-json-languageservicevscode/scripts/code.sh|bat) and open a.jsonfilevscode-json-languageservicesources, run commandDebug: Attach to Node processand pick thecode-ossprocess with thejson-language-featurespathjsonCompletion.ts.jsonfile