Add JSON schema fetching
This commit is contained in:
parent
70533b3bb4
commit
4bc2f8de91
@ -26,6 +26,7 @@
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"project-cli-commands.nvim": { "branch": "main", "commit": "9a2a2fdfd38a3d71cc927e3a398ac0ddfa846b3d" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "d522e3ed6ed2c7bed7ebe1e42615e79b3aabfe65" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
|
||||
31
nvim/lsp/jsonls.lua
Normal file
31
nvim/lsp/jsonls.lua
Normal file
@ -0,0 +1,31 @@
|
||||
return {
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require("schemastore").json.schemas({
|
||||
select = {
|
||||
"devcontainer.json",
|
||||
"devcontainer-feature.json",
|
||||
},
|
||||
replace = {
|
||||
["devcontainer.json"] = {
|
||||
description = "devcontainer.json overridden",
|
||||
-- fileMatch has to be a table
|
||||
fileMatch = { "devcontainer.json" },
|
||||
name = "devcontainer.json",
|
||||
url = "https://raw.githubusercontent.com/devcontainers/spec/refs/heads/main/schemas/devContainer.base.schema.json",
|
||||
},
|
||||
},
|
||||
extra = {
|
||||
{
|
||||
description = "devcontainer-feature.json",
|
||||
-- fileMatch has to be a table
|
||||
fileMatch = { "devcontainer-feature.json" },
|
||||
name = "devcontainer-feature.json",
|
||||
url = "https://raw.githubusercontent.com/devcontainers/spec/refs/heads/main/schemas/devContainerFeature.schema.json",
|
||||
},
|
||||
},
|
||||
}),
|
||||
validate = { enable = true },
|
||||
},
|
||||
},
|
||||
}
|
||||
@ -1,12 +1,13 @@
|
||||
local mason_lsps = {
|
||||
-- LSPs
|
||||
"json-lsp",
|
||||
"jsonls",
|
||||
"lua_ls",
|
||||
"ruby_lsp",
|
||||
"rubocop",
|
||||
"rust_analyzer",
|
||||
"terraformls",
|
||||
"ts_ls",
|
||||
"yamlls",
|
||||
-- Formatters
|
||||
"fixjson",
|
||||
"goimports",
|
||||
@ -14,7 +15,6 @@ local mason_lsps = {
|
||||
"prettierd",
|
||||
"shellharden",
|
||||
"stylua",
|
||||
"yamlfix",
|
||||
}
|
||||
|
||||
local non_mason_lsps = {
|
||||
@ -51,6 +51,7 @@ return {
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
{ "j-hui/fidget.nvim", opts = {} },
|
||||
"saghen/blink.cmp",
|
||||
"b0o/schemastore.nvim",
|
||||
},
|
||||
config = function()
|
||||
for _, server in ipairs(non_mason_lsps) do
|
||||
@ -78,6 +79,8 @@ return {
|
||||
map("lr", vim.lsp.buf.rename, "[r]ename")
|
||||
map("lsb", require("telescope.builtin").lsp_document_symbols, "[s]ymbols in [b]uffer")
|
||||
map("lsw", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[s]ymbols in [w]orkspace")
|
||||
map("lhs", "<cmd>LspInfo<CR>", "[h]ealth [s]tatus")
|
||||
map("lhr", "<cmd>LspRestart<CR>", "[h]ealth [r]estart")
|
||||
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
local augroup = vim.api.nvim_create_augroup
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user