install schemastore plugin for json schemas

This commit is contained in:
2022-03-18 23:07:34 +03:00
parent d16784bcef
commit 8544e93367
2 changed files with 16 additions and 0 deletions

View File

@@ -67,6 +67,7 @@ require("packer").startup(function(use)
require("tailwindcss-colors").setup()
end,
})
use({ "b0o/SchemaStore.nvim" })
-- Completion, snippets, etc
use({

View File

@@ -191,6 +191,21 @@ lsp_installer.on_server_ready(function(server)
}
end
if server.name == "jsonls" then
opts.settings = {
json = {
schemas = require("schemastore").json.schemas({
select = {
".eslintrc",
"package.json",
"tsconfig.json",
"prettierrc.json",
},
}),
},
}
end
server:setup(opts)
end)