aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/nvim/.config/nvim/lua/plugins/schemastore.lua
blob: 4be26bd88a8968a200866c57ebacf52b8870681b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---@type LazyPluginSpec
local M = {
	"b0o/SchemaStore.nvim",
}

function M.init()
	local lsp_settings = {
		jsonls = {
			settings = {
				json = {
					validate = {
						enable = true,
					},
					schemas = require("schemastore").json.schemas(),
				},
			},
		},
		yamlls = {
			settings = {
				yaml = {
					schemaStore = {
						enable = false,
						url = "",
					},
					schemas = require("schemastore").yaml.schemas(),
				},
			},
		},
	}

	for name, override in vim.iter(lsp_settings) do
		local config = require("tobyvin.lsp.configs")[name]
		if config then
			require("tobyvin.lsp.configs")[name] = vim.tbl_extend("force", config, override)
		end
	end
end

return M