Json language server extension for coc.nvim.
The server code is extracted from VSCode, which uses vscode-json-languageservice
In your vim/neovim, run the following command:
:CocInstall coc-json
Same as VSCode.
All features of vscode-json-languageservice are supported.
doCompletionfor JSON properties and values based on the document's JSON schema.doHoverfor 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.
json.retryResolveSchema: Retry resolve schema of current buffer.
json.enableset tofalseto disable json language server.json.trace.servertrace LSP traffic in output channel.json.execArgvaddexecArgvtochild_process.forkused for start json language server.json.format.enableset tofalseto disable format.json.schemasschema associations for json files.
You can configure your vim to make that file with jsonc filetype to allow comment.
You have two choices:
- use
$schemain your json. - create json schema file and then configure
json.schemesin yourcoc-settings.json, check out https://github.com/neoclide/coc-json/blob/master/package.json#L55
Quotes are hidden?
This is not caused by coc-json, you may checkout the conceallevel option.
MIT