
If lazy extras yaml is enabled, yamlls was being loaded not ansiblels. Add ft = {} to nvim-ansible spec allows ft=yaml.ansible to be detected. Re-mapped nvim-ansible plugin key to not conflict with neotest. Added a description for the keymap.
41 lines
811 B
Lua
41 lines
811 B
Lua
return {
|
|
{
|
|
"nvim-treesitter/nvim-treesitter",
|
|
opts = function(_, opts)
|
|
if type(opts.ensure_installed) == "table" then
|
|
vim.list_extend(opts.ensure_installed, { "yaml" })
|
|
end
|
|
end,
|
|
},
|
|
{
|
|
"williamboman/mason.nvim",
|
|
opts = function(_, opts)
|
|
opts.ensure_installed = opts.ensure_installed or {}
|
|
-- for ansiblels validation
|
|
vim.list_extend(opts.ensure_installed, { "ansible-lint" })
|
|
end,
|
|
},
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
opts = {
|
|
servers = {
|
|
ansiblels = {},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"mfussenegger/nvim-ansible",
|
|
ft = {},
|
|
keys = {
|
|
{
|
|
"<leader>ta",
|
|
function()
|
|
require("ansible").run()
|
|
end,
|
|
desc = "Ansible Run Playbook/Role",
|
|
silent = true,
|
|
},
|
|
},
|
|
},
|
|
}
|