From 8993a005d9d3267d920de2e4631be748d5808b92 Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Wed, 20 Mar 2024 14:00:05 +0100 Subject: [PATCH] json: add support of schemastore schemas Co-Authored-by: iGor milhit --- init.lua | 7 +++++++ lua/custom/plugins/schemastore.lua | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100644 lua/custom/plugins/schemastore.lua diff --git a/init.lua b/init.lua index b1e2186..7a68af3 100644 --- a/init.lua +++ b/init.lua @@ -495,7 +495,14 @@ local servers = { -- Require vscode-langservers-extracted -- https://github.com/hrsh7th/vscode-langservers-extracted + -- Configure schemastore to be used jsonls = { + settings = { + json = { + schemas = require('schemastore').json.schemas(), + validate = { enable = true }, + }, + }, }, } diff --git a/lua/custom/plugins/schemastore.lua b/lua/custom/plugins/schemastore.lua new file mode 100644 index 0000000..bcc6b11 --- /dev/null +++ b/lua/custom/plugins/schemastore.lua @@ -0,0 +1,6 @@ +-- Plugin for schemastore +-- https://github.com/b0o/SchemaStore.nvim + +return { + "b0o/schemastore.nvim", +}