My dotfiles
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

Readme.md 2.0 KiB

hace 4 años
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # coc-json
  2. Json language server extension for [coc.nvim](https://github.com/neoclide/coc.nvim).
  3. The server code is extracted from VSCode, which uses
  4. [vscode-json-languageservice](https://www.npmjs.com/package/vscode-json-languageservice)
  5. ## Install
  6. In your vim/neovim, run the following command:
  7. ```
  8. :CocInstall coc-json
  9. ```
  10. ## Features
  11. Same as VSCode.
  12. All features of [vscode-json-languageservice](https://www.npmjs.com/package/vscode-json-languageservice) are supported.
  13. - `doCompletion` for JSON properties and values based on the document's JSON schema.
  14. - `doHover` for values based on descriptions in the document's JSON schema.<Paste>
  15. - Document Symbols for quick navigation to properties in the document.
  16. - Document Colors for showing color decorators on values representing colors.
  17. - Code Formatting supporting ranges and formatting the whole document.
  18. - Diagnostics (Validation) are pushed for all open documents
  19. - syntax errors
  20. - structural validation based on the document's JSON schema.
  21. ## Commands
  22. - `json.retryResolveSchema`: Retry resolve schema of current buffer.
  23. ## Configuration options
  24. - `json.enable` set to `false` to disable json language server.
  25. - `json.trace.server` trace LSP traffic in output channel.
  26. - `json.execArgv` add `execArgv` to `child_process.fork` used for start
  27. json language server.
  28. - `json.format.enable` set to `false` to disable format.
  29. - `json.schemas` schema associations for json files.
  30. ## FAQ
  31. ### How to suppress error `[json 521] [e] Comments are not permitted in JSON`?
  32. You can configure your vim to make that file with jsonc filetype to allow comment.
  33. ### How to add custom schema definitions/properties?
  34. You have two choices:
  35. - use `$schema` in your json.
  36. - 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
  37. ### Quotes are hidden?
  38. This is not caused by coc-json, you may checkout the `conceallevel` option.
  39. ## License
  40. MIT