Git Product home page Git Product logo

coc-json's Introduction

coc-json

Json language server extension for coc.nvim.

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

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.retryResolveSchema: Retry resolve schema of current buffer.

Configuration options

  • json.enable set to false to disable json language server.
  • json.trace.server trace LSP traffic in output channel.
  • json.execArgv add execArgv to child_process.fork used for start json language server.
  • json.format.enable set to false to disable format.
  • json.schemas schema associations for json files.

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

coc-json's People

Contributors

chemzqm avatar ckipp01 avatar forest0 avatar gasol avatar jason0x43 avatar ubmarco avatar unclebill avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.