npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

coc-json

v1.9.2

Published

Json extension for coc.nvim

Downloads

5,557

Readme

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:

  • use $schema in your json.
  • 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

Quotes are hidden?

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

License

MIT