Files
LazyVim/lua/lazyvim/plugins/extras/lang/ansible.lua
Jordan McAlpine abb1ff0d60 fix(ansible): ansiblels not loading, keymap desc. (#2739)
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.
2024-05-13 08:21:33 +02:00

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,
},
},
},
}