2024-09-07 18:39:22 +00:00
|
|
|
local T = require('toolchain')
|
|
|
|
local M = {}
|
|
|
|
|
2024-09-07 23:50:39 +00:00
|
|
|
function M.setup()
|
|
|
|
T.add_highlighter_autoinstalls( 'json', 'xml', 'yaml', 'toml' )
|
2024-09-07 18:39:22 +00:00
|
|
|
|
|
|
|
T.add_null_ls_module(function(null_ls)
|
|
|
|
return {
|
|
|
|
null_ls.builtins.diagnostics.spectral,
|
|
|
|
--null_ls.builtins.diagnostics.vacuum --Pure Openapi linter
|
|
|
|
}
|
|
|
|
end)
|
|
|
|
|
|
|
|
T.add_lsp_autoinstalls('jsonls', 'lemminx', 'yamlls', 'taplo')
|
|
|
|
T.add_lsps(function(lspconfig, capabilities)
|
|
|
|
local config = { capabilities = capabilities }
|
|
|
|
lspconfig.jsonls.setup(config)
|
|
|
|
lspconfig.lemminx.setup(config)
|
|
|
|
lspconfig.yamlls.setup(config)
|
|
|
|
lspconfig.taplo.setup(config)
|
|
|
|
end)
|
|
|
|
|
|
|
|
T.add_plugins(
|
|
|
|
{
|
|
|
|
'folke/lazydev.nvim',
|
|
|
|
ft = 'lua',
|
|
|
|
opts = {
|
|
|
|
library = {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"folke/neoconf.nvim",
|
|
|
|
priority = 100,
|
|
|
|
config = function()
|
|
|
|
require('neoconf').setup()
|
|
|
|
end
|
|
|
|
}
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|