랭킹으로 돌아가기

b0o/SchemaStore.nvim

Luaschemastore.org

🛍 JSON schemas for Neovim

nvimnvim-pluginneovimneovim-pluginschemastoreautocompletionlintingschema-registryintellisenselspnull-lsjsonls
스타 성장
스타
1k
포크
21
주간 성장
이슈
11
5001k
2021년 10월2023년 5월2024년 12월2026년 7월
README

SchemaStore.nvim

License: Apache 2.0 Test Status Build Status Used By LazyVim Used By LunarVim

A Neovim plugin that provides the SchemaStore catalog for use with jsonls and yamlls.

Install

Lazy.nvim:

  "b0o/schemastore.nvim",

Packer:

use "b0o/schemastore.nvim"

Usage

To use SchemaStore.nvim with lspconfig + jsonls:

require('lspconfig').jsonls.setup {
  settings = {
    json = {
      schemas = require('schemastore').json.schemas(),
      validate = { enable = true },
    },
  },
}

For an explanation of why the validate = { enable = true } option is recommended, see #8.

yamlls is also supported:

require('lspconfig').yamlls.setup {
  settings = {
    yaml = {
      schemaStore = {
        -- You must disable built-in schemaStore support if you want to use
        -- this plugin and its advanced options like `ignore`.
        enable = false,
        -- Avoid TypeError: Cannot read properties of undefined (reading 'length')
        url = "",
      },
      schemas = require('schemastore').yaml.schemas(),
    },
  },
}

To use a subset of the catalog, you can select schemas by name (see the catalog for a full list):

require('lspconfig').jsonls.setup {
  settings = {
    json = {
      schemas = require('schemastore').json.schemas {
        select = {
          '.eslintrc',
          'package.json',
        },
      },
      validate = { enable = true },
    },
  },
}

To ignore certain schemas from the catalog:

require('lspconfig').jsonls.setup {
  settings = {
    json = {
      schemas = require('schemastore').json.schemas {
        ignore = {
          '.eslintrc',
          'package.json',
        },
      },
      validate = { enable = true },
    },
  },
}

Note that the select and ignore options are mutually exclusive and attempting to use them together will throw an error.

When using select with extra, schemas from extra are not automatically included—you must explicitly list them in the select array.

To replace certain schemas from the catalog with your own:

require('lspconfig').jsonls.setup {
  settings = {
    json = {
      schemas = require('schemastore').json.schemas {
        replace = {
          ['package.json'] = {
            description = 'package.json overridden',
            fileMatch = { 'package.json' },
            name = 'package.json',
            url = 'https://example.com/package.json',
          },
          -- Or you can override just the url
          ['package.json'] = 'https://example.com/package.json',
        },
      },
      validate = { enable = true },
    },
  },
}

If you want to include additional schemas, you can use extra:

require('lspconfig').jsonls.setup {
  settings = {
    json = {
      schemas = require('schemastore').json.schemas {
        extra = {
          {
            description = 'My custom JSON schema',
            fileMatch = 'foo.json',
            name = 'foo.json',
            url = 'https://example.com/schema/foo.json',
          },
          {
            description = 'My other custom JSON schema',
            fileMatch = { 'bar.json', '.baar.json' },
            name = 'bar.json',
            url = 'https://example.com/schema/bar.json',
          },
        },
      },
      validate = { enable = true },
    },
  },
}

To use a local schema file, specify the path using the file:// scheme or plain file paths:

require("schemastore").json.schemas({
  extra = {
    {
      description = "Local JSON schema",
      fileMatch = "local.json",
      name = "local.json",
      url = "file:///path/to/your/schema.json", -- or '/path/to/your/schema.json'
    },
  },
})

License

© 2021-2026 Maddison Cohodas and Contributors.

Released under the Apache 2.0 License.

관련 저장소
neovim/neovim

Vim-fork focused on extensibility and usability

Vim ScriptOtherneovimc
neovim.io
101.3k7k
NvChad/NvChad

Blazing fast Neovim framework providing solid defaults and a beautiful UI, enhancing your neovim experience.

LuaGNU General Public License v3.0nvimneovim
nvchad.com
28.4k2.2k
LazyVim/LazyVim

Neovim config for the lazy

LuaApache License 2.0neovimneovim-conf
lazyvim.github.io
27k1.8k
neoclide/coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.

TypeScriptnpmOtherautocompletionlanguage-client
25.2k957
folke/lazy.nvim

💤 A modern plugin manager for Neovim

LuaApache License 2.0neovimneovim-plugin
lazy.folke.io
21.3k585
nvim-telescope/telescope.nvim

Find, Filter, Preview, Pick. All lua, all the time.

LuaMIT Licenseneovimlua
19.6k956
LunarVim/LunarVim

🌙 LunarVim is an IDE layer for Neovim. Completely free and community driven.

LuaGNU General Public License v3.0neovimvim
lunarvim.org
19.3k1.5k
AstroNvim/AstroNvim

AstroNvim is an aesthetic and feature-rich neovim config that is extensible and easy to use with a great set of plugins

LuaGNU General Public License v3.0vimlua
astronvim.com
14.4k954
neovim/nvim-lspconfig

Quickstart configs for Nvim LSP

LuaApache License 2.0vimnvim
13.8k2.5k
mason-org/mason.nvim

Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.

LuaApache License 2.0luamason
10.4k336
williamboman/mason.nvim

Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.

LuaApache License 2.0lspinstalllua
8.5k288
wbthomason/packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config

LuaMIT Licenseneovimnvim
8.1k265