mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-21 02:55:09 +02:00
d01ba08eae
Refactor the monolithic `lvim.lang` design into a more modular approach. IMPORTANT: run `:LvimUpdate` in order to generate the new ftplugin template files.
30 lines
622 B
Lua
30 lines
622 B
Lua
local schemas = nil
|
|
local status_ok, jsonls_settings = pcall(require, "nlspsettings.jsonls")
|
|
if status_ok then
|
|
schemas = jsonls_settings.get_default_schemas()
|
|
end
|
|
|
|
local opts = {
|
|
setup = {
|
|
settings = {
|
|
json = {
|
|
schemas = schemas,
|
|
-- = {
|
|
-- {
|
|
-- fileMatch = { "package.json" },
|
|
-- url = "https://json.schemastore.org/package.json",
|
|
-- },
|
|
-- },
|
|
},
|
|
},
|
|
commands = {
|
|
Format = {
|
|
function()
|
|
vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line "$", 0 })
|
|
end,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
|
|
return opts
|