neovim: install schemastore plugin for json

This commit is contained in:
2023-10-31 22:29:22 +03:00
parent 2b6bea20fa
commit f0433d4067
2 changed files with 13 additions and 0 deletions

View File

@@ -104,6 +104,17 @@ for _, server in ipairs(servers) do
opts.root_dir = util.root_pattern("tailwind.config.js", ".git") opts.root_dir = util.root_pattern("tailwind.config.js", ".git")
end end
if server == "jsonls" then
opts.settings = {
json = {
schemas = require("schemastore").json.schemas(),
validate = {
enable = true,
},
},
}
end
lspconfig[server].setup(opts) lspconfig[server].setup(opts)
end end

View File

@@ -68,6 +68,8 @@ require("packer").startup(function(use)
end, end,
}) })
use({ "b0o/SchemaStore.nvim" })
if PACKER_BOOTSTRAP then if PACKER_BOOTSTRAP then
require("packer").sync() require("packer").sync()
end end