.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-json / Readme.md
1 # coc-json
2
3 Json language server extension for [coc.nvim](https://github.com/neoclide/coc.nvim).
4
5 The server code is extracted from VSCode, which uses
6 [vscode-json-languageservice](https://www.npmjs.com/package/vscode-json-languageservice)
7
8 For highlight of jsonc filetype, you may need [jsonc.vim](https://github.com/neoclide/jsonc.vim)
9
10 ## Install
11
12 In your vim/neovim, run the following command:
13
14 ```
15 :CocInstall coc-json
16 ```
17
18 ## Features
19
20 Same as VSCode.
21
22 All features of [vscode-json-languageservice](https://www.npmjs.com/package/vscode-json-languageservice) are supported.
23
24 - `doCompletion` for JSON properties and values based on the document's JSON schema.
25 - `doHover` for values based on descriptions in the document's JSON schema.<Paste>
26 - Document Symbols for quick navigation to properties in the document.
27 - Document Colors for showing color decorators on values representing colors.
28 - Code Formatting supporting ranges and formatting the whole document.
29 - Diagnostics (Validation) are pushed for all open documents
30   - syntax errors
31   - structural validation based on the document's JSON schema.
32
33 ## Commands
34
35 - `json.retryResolveSchema`: Retry resolve schema of current buffer.
36
37 ## Configuration options
38
39 - `json.enable` set to `false` to disable json language server.
40 - `json.trace.server` trace LSP traffic in output channel.
41 - `json.execArgv` add `execArgv` to `child_process.fork` used for start
42   json language server.
43 - `json.format.enable` set to `false` to disable format.
44 - `json.schemas` schema associations for json files.
45
46 ## FAQ
47
48 ### How to suppress error `[json 521] [e] Comments are not permitted in JSON`?
49
50 You can configure your vim to make that file with jsonc filetype to allow comment.
51
52 ### How to add custom schema definitions/properties?
53
54 You have two choices:
55
56 - use `$schema` in your json.
57 - create json schema file and then configure `json.schemes` in your `coc-settings.json`, check out https://github.com/neoclide/coc-json/blob/master/package.json#L55
58
59 ### Quotes are hidden?
60
61 This is not caused by coc-json, you may checkout the `conceallevel` option.
62
63 ## License
64
65 MIT