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()
|
2024-09-10 07:41:43 +00:00
|
|
|
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)
|
|
|
|
|
2024-09-10 07:41:43 +00:00
|
|
|
T.add_plugins({
|
|
|
|
'folke/neoconf.nvim',
|
|
|
|
priority = 10000,
|
|
|
|
config = function() require('neoconf').setup() end,
|
|
|
|
}, {
|
|
|
|
'folke/lazydev.nvim',
|
|
|
|
dependencies = {
|
|
|
|
'folke/neoconf.nvim',
|
2024-09-07 18:39:22 +00:00
|
|
|
},
|
2024-09-10 07:41:43 +00:00
|
|
|
ft = 'lua',
|
|
|
|
event = 'BufEnter *.lua',
|
|
|
|
config = function()
|
|
|
|
require('lazydev').setup(require('neoconf').get('lazydev'))
|
|
|
|
end,
|
|
|
|
})
|
2024-09-07 18:39:22 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
return M
|