5.4.1 • Published 10 months ago

vscode-json-languageservice v5.4.1

Weekly downloads
317,422
License
MIT
Repository
github
Last release
10 months ago

vscode-json-languageservice

JSON language service extracted from VSCode to be reused, e.g in the Monaco editor.

npm Package NPM Downloads Build Status License: MIT

Why?

The vscode-json-languageservice contains the language smarts behind the JSON editing experience of Visual Studio Code and the Monaco editor.

  • doValidation analyses an input string and returns syntax and lint errors.
  • doComplete provides completion proposals for a given location.
  • doResolve resolves a completion proposals.
  • doHover provides a hover text for a given location.
  • findDocumentSymbols provides all symbols in the given document.
  • findDocumentColors provides all color symbols in the given document.
  • getColorPresentations returns available color formats for a color symbol.
  • format formats the code at the given range.
  • getFoldingRanges gets folding ranges for the given document.
  • getSelectionRanges gets selection ranges for a given location.
  • getMatchingSchemas matches a document against its schema and returns all AST nodes along with the matching sub schemas.
  • parseJSONDocument creates a JSON document from source code.
  • newJSONDocument creates a JSON document from an AST.

For the complete API see jsonLanguageService.ts and jsonLanguageTypes.ts

Installation

npm install --save vscode-json-languageservice

Sample usage

See sample.ts for an example on how to use the JSON language service.

To run the sample use yarn sample

Development

git clone https://github.com/microsoft/vscode-json-languageservice
cd vscode-json-languageservice
yarn

Use yarn test to compile and run tests

How can I run and debug the service?

  • open the folder in VSCode.
  • set breakpoints, e.g. in jsonCompletion.ts
  • run the Unit tests from the run viewlet and wait until a breakpoint is hit: image

How can I run and debug the service inside an instance of VSCode?

  • run VSCode out of sources setup as described here: https://github.com/Microsoft/vscode/wiki/How-to-Contribute
  • 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 image
  • set breakpoints, e.g. in jsonCompletion.ts
  • in the instance run from sources, invoke code completion in the .json file
@mulverinex/trident-language-server@nevmn/vscode-json-languageserver@infinitebrahmanuniverse/nolb-vsc@everything-registry/sub-chunk-3069datapack-language-servervue-language-service-with-kebabvscode-vue-languageservicevscode-yaml-languageservicevscode-yaml-toolsvolar-service-jsonvolar-plugin-vue-routervscode-stacktapevscode-json-languageservervscode-json-languageserver-binvscode-json-ls-binvscode-langservers-extractedvscode-mc-languageserverjsonld-lintdfeuk-frontenddfeuk-frontend-manual@1yefuwang1/yaml-language-servertypefox-monaco@alibaba-aero/eslint-plugin-json@biu/jsonlint@cfstratos/monaco-yaml@difizen/cofine-language-json@diesel-parser/monacoyaml-language-serveryaml-language-service@hawkingnetwork/react-native-tab-view@hackercat/yaml-language-server@hopara/http-server@hopara/schema-validator@flexget/monaco-yaml@lambo-design/monaco-editor@invopop/gobl-builder@magicjs.dev/runtime@nightgale/volar-service-pages@kocan-plugins/json@kie-tools/json-yaml-language-service@kie-tools/yaml-language-server@kie-tools/yard-language-service@kie-tools/serverless-workflow-language-service@kgit/readability@kie-tools/dashbuilder-language-service@kocan/kdu-language-service@kocan/language-service@sap/mdk-tools@sap/fiori-json-services@sap/di.code-validation.json@spgoding/datapack-language-server@shopify/theme-check-common@shopify/theme-language-server-commonmonaco-languageclient-examplesnxlsrx-json-ui-clireact-solid-gradient-pickergpii-grunt-lint-allhome-assistant-language-serviceliquid-language-servermassa-web3-fork-workspace@workbench-stack/default-languages-server@workbench-stack/ext-default-languages-server@uni-helper/volar-plugin-uni-pages@uni-helper/volar-service-uni-pages@volar-plugins/json@volar-plugins/vue-json@volar/vue-language-service@zed-industries/vscode-langservers-extractedacode-lspamazon-states-language-serviceazure-pipelines-language-servicearmvalarmvalidationcliant-editorcoc-homeassistantaws-ssm-document-language-servicebravo-editorbi-ace-editordevops-as-code-language-serverdevops-as-code-language-server2eslint-plugin-check-json-valueeslint-plugin-jsoneslint-plugin-json-betaeslint-plugin-prodperfectqa-skip-jsonfluid-grunt-lint-all@serverless-devs/yaml-language-server@serverless-ide/config@serverless-ide/language-server
5.4.1

10 months ago

5.4.0

12 months ago

5.3.11

1 year ago

5.3.10

1 year ago

5.3.9

1 year ago

5.3.7

2 years ago

5.3.6

2 years ago

5.3.3

2 years ago

5.3.2

2 years ago

5.3.1

2 years ago

5.3.0

2 years ago

5.1.4

2 years ago

5.2.0

2 years ago

5.3.5

2 years ago

5.3.4

2 years ago

5.1.3

3 years ago

5.1.2

3 years ago

5.1.1

3 years ago

5.1.0

3 years ago

5.0.0

3 years ago

4.2.1

3 years ago

4.2.0-next.3

3 years ago

4.2.0

3 years ago

4.2.0-next.0

4 years ago

4.2.0-next.1

4 years ago

4.2.0-next.2

4 years ago

4.1.10

4 years ago

4.1.9

4 years ago

4.1.8

4 years ago

4.1.7

4 years ago

4.1.6

4 years ago

4.1.5

4 years ago

4.1.4

4 years ago

4.1.3

4 years ago

4.1.0

4 years ago

4.1.2

4 years ago

4.0.1

4 years ago

4.0.2

4 years ago

4.0.0

4 years ago

3.11.0

5 years ago

3.10.0

5 years ago

3.9.1

5 years ago

3.9.0

5 years ago

3.8.5

5 years ago

3.8.4

5 years ago

3.8.3

5 years ago

3.8.2

5 years ago

3.8.1

5 years ago

3.8.0

5 years ago

3.7.0

5 years ago

3.6.0

5 years ago

3.5.2

5 years ago

3.5.1

5 years ago

3.4.12

5 years ago

3.4.11

5 years ago

3.4.10

5 years ago

3.4.9

6 years ago

3.4.8

6 years ago

3.4.7

6 years ago

3.4.6

6 years ago

3.4.5

6 years ago

3.4.4

6 years ago

3.4.3

6 years ago

3.4.1

6 years ago

3.4.0

6 years ago

3.3.5

6 years ago

3.3.4

6 years ago

3.3.3

6 years ago

3.3.2

6 years ago

3.3.1

6 years ago

3.3.0

6 years ago

3.3.0-next.7

6 years ago

3.3.0-next.6

6 years ago

3.3.0-next.5

6 years ago

3.3.0-next.4

6 years ago

3.3.0-next.3

6 years ago

3.3.0-next.2

6 years ago

3.3.0-next.1

6 years ago

3.3.0-next.0

6 years ago

3.2.1

7 years ago

3.2.0

7 years ago

3.2.0-next.2

7 years ago

3.2.0-next.1

7 years ago

3.1.7

7 years ago

3.1.6

7 years ago

3.1.5

7 years ago

3.1.4

7 years ago

3.1.3

7 years ago

3.1.2

7 years ago

3.1.2-next.3

7 years ago

3.1.2-next.2

7 years ago

3.1.2-next.1

7 years ago

3.1.0

7 years ago

3.0.13

7 years ago

3.0.12

7 years ago

3.0.11

7 years ago

3.0.10

7 years ago

3.0.8

7 years ago

3.0.7

7 years ago

3.0.6

7 years ago

3.0.5

7 years ago

3.0.4

8 years ago

3.0.3

8 years ago

3.0.2

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.0.22

8 years ago

2.0.21

8 years ago

2.0.20

8 years ago

2.0.19

8 years ago

2.0.18

8 years ago

2.0.17

8 years ago

2.0.16

8 years ago

2.0.15

8 years ago

2.0.14

8 years ago

2.0.13

8 years ago

2.0.12

8 years ago

2.0.11

8 years ago

2.0.10

8 years ago

2.0.9

8 years ago

2.0.8

8 years ago

2.0.7

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.4

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

2.0.0-next.12

8 years ago

1.1.9

8 years ago

1.1.8

8 years ago

2.0.0-next.11

8 years ago

2.0.0-next.10

8 years ago

2.0.0-next.9

8 years ago

2.0.0-next.8

9 years ago

2.0.0-next.7

9 years ago

2.0.0-next.6

9 years ago

2.0.0-next.5

9 years ago

2.0.0-next.4

9 years ago

2.0.0-next.3

9 years ago

2.0.0-next.2

9 years ago

2.0.0-next.1

9 years ago

1.1.8-next.2

9 years ago

1.1.8-next.1

9 years ago

1.1.7

9 years ago

1.1.6

9 years ago

1.1.5-next.2

9 years ago

1.1.5-next.1

9 years ago

1.1.4

9 years ago

1.1.3-next.7

9 years ago

1.1.3-next.6

9 years ago

1.1.3-next.5

9 years ago

1.1.3-next.4

9 years ago

1.1.3-next.3

9 years ago

1.1.3-next.2

9 years ago

1.1.3-next.1

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago