1.9.2 • Published 8 months ago

coc-json v1.9.2

Weekly downloads
5,065
License
MIT
Repository
-
Last release
8 months ago

coc-json

Json language server extension for coc.nvim.

The server code is extracted from VSCode, which uses vscode-json-languageservice

For highlight of jsonc filetype, you may need jsonc.vim

Install

In your vim/neovim, run the following command:

:CocInstall coc-json

Features

Same as VSCode.

All features of vscode-json-languageservice are supported.

  • doCompletion for JSON properties and values based on the document's JSON schema.
  • doHover for values based on descriptions in the document's JSON schema.
  • Document Symbols for quick navigation to properties in the document.
  • Document Colors for showing color decorators on values representing colors.
  • Code Formatting supporting ranges and formatting the whole document.
  • Diagnostics (Validation) are pushed for all open documents
    • syntax errors
    • structural validation based on the document's JSON schema.

Commands

  • json.clearCache: Clear schema cache.
  • json.retryResolveSchema: Retry resolve schema of current buffer.
  • json.sort: Sort json document.

Configuration options

  • json.enable: Enable json server default: true
  • json.enableDefaultSchemas: Enable builtin schemas from https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/api/json/catalog.json default: true
  • json.trace.server: default: "off" Valid options: "off","messages","verbose"
  • json.execArgv: default: []
  • json.validate.enable: Enable/disable JSON validation. default: true
  • json.format.enable: Enable format for json server default: true
  • json.format.keepLines: Keep all existing new lines when formatting. default: false
  • json.maxItemsComputed: The maximum number of outline symbols and folding regions computed (limited for performance reasons). default: 5000
  • json.schemaDownload.enable: When enabled, JSON schemas can be fetched from http and https locations. default: true
  • json.schemas: Schemas associations for json files default: []

FAQ

How to suppress error [json 521] [e] Comments are not permitted in JSON?

You can configure your vim to make that file with jsonc filetype to allow comment.

How to add custom schema definitions/properties?

You have two choices:

Quotes are hidden?

This is not caused by coc-json, you may checkout the conceallevel option.

License

MIT

1.9.1

8 months ago

1.9.0

8 months ago

1.9.2

8 months ago

1.8.0

1 year ago

1.7.1

1 year ago

1.7.0

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago