mirror of
https://github.com/DefectingCat/nvim
synced 2025-07-15 16:51:33 +00:00
update json
This commit is contained in:
3
lua/rua/plugins/lang/json.lua
Normal file
3
lua/rua/plugins/lang/json.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
{ "b0o/schemastore.nvim", version = false }, -- json schema store
|
||||
}
|
@ -1,11 +1,10 @@
|
||||
return {
|
||||
{ "b0o/schemastore.nvim" }, -- json schema store
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
{ "hrsh7th/cmp-nvim-lsp" },
|
||||
{ "antosha417/nvim-lsp-file-operations", config = true },
|
||||
{ "folke/neodev.nvim", opts = {} },
|
||||
{ "folke/neodev.nvim", opts = {} },
|
||||
},
|
||||
opts = { document_highlight = { enabled = false } },
|
||||
config = function()
|
||||
@ -100,6 +99,23 @@ return {
|
||||
lspconfig["vtsls"].setup(require("rua.config.vtsls"))
|
||||
map("n", "<leader>co", "<cmd> OrganizeImports <CR>", { desc = "Organize imports" })
|
||||
end,
|
||||
["jsonls"] = function()
|
||||
lspconfig["jsonls"].setup({
|
||||
-- lazy-load schemastore when needed
|
||||
on_new_config = function(new_config)
|
||||
new_config.settings.json.schemas = new_config.settings.json.schemas or {}
|
||||
vim.list_extend(new_config.settings.json.schemas, require("schemastore").json.schemas())
|
||||
end,
|
||||
settings = {
|
||||
json = {
|
||||
format = {
|
||||
enable = true,
|
||||
},
|
||||
validate = { enable = true },
|
||||
},
|
||||
}
|
||||
})
|
||||
end,
|
||||
["lua_ls"] = function()
|
||||
lspconfig["lua_ls"].setup({
|
||||
capabilities = capabilities,
|
||||
|
@ -15,7 +15,7 @@ return {
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"json",
|
||||
"json5",
|
||||
"vue",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
|
Reference in New Issue
Block a user