refactor: add lspconfig for json

This commit is contained in:
Dinesh Salunke 2025-11-08 10:42:59 +05:30
parent 09dd7d7ec9
commit 6422e8f548

View File

@ -14,6 +14,7 @@ return {
{ "j-hui/fidget.nvim", opts = {} }, { "j-hui/fidget.nvim", opts = {} },
-- Allows extra capabilities provided by nvim-cmp -- Allows extra capabilities provided by nvim-cmp
"hrsh7th/cmp-nvim-lsp", "hrsh7th/cmp-nvim-lsp",
"b0o/schemastore.nvim",
}, },
config = function() config = function()
local util = require("lspconfig/util") local util = require("lspconfig/util")
@ -204,6 +205,14 @@ return {
}, },
}, },
}, },
jsonls = {
settings = {
json = {
schemas = require("schemastore").json.schemas(),
validate = { enable = true },
},
},
},
} }
-- Ensure the servers and tools above are installed -- Ensure the servers and tools above are installed
@ -225,6 +234,7 @@ return {
"prettierd", "prettierd",
"eslint_d", "eslint_d",
"gopls", "gopls",
"jsonls",
}) })
require("mason-tool-installer").setup({ ensure_installed = ensure_installed }) require("mason-tool-installer").setup({ ensure_installed = ensure_installed })