🐛 fix(nvim): ansible filetype detection now works correctly
This commit is contained in:
parent
cc470f62ed
commit
4aef47abda
1 changed files with 19 additions and 15 deletions
|
@ -1,3 +1,22 @@
|
|||
vim.filetype.add({
|
||||
pattern = {
|
||||
[".*/playbooks/.*%.yaml"] = "yaml.ansible",
|
||||
[".*/playbooks/.*%.yml"] = "yaml.ansible",
|
||||
[".*/roles/.*/tasks/.*%.yaml"] = "yaml.ansible",
|
||||
[".*/roles/.*/tasks/.*%.yml"] = "yaml.ansible",
|
||||
[".*/tasks/.*%.yaml"] = "yaml.ansible",
|
||||
[".*/tasks/.*%.yml"] = "yaml.ansible",
|
||||
[".*/vars/.*%.yaml"] = "yaml.ansible",
|
||||
[".*/vars/.*%.yml"] = "yaml.ansible",
|
||||
[".*/defaults/.*%.yaml"] = "yaml.ansible",
|
||||
[".*/defaults/.*%.yml"] = "yaml.ansible",
|
||||
[".*/handlers/.*%.yaml"] = "yaml.ansible",
|
||||
[".*/handlers/.*%.yml"] = "yaml.ansible",
|
||||
[".*/roles/.*/handlers/.*%.yaml"] = "yaml.ansible",
|
||||
[".*/roles/.*/handlers/.*%.yml"] = "yaml.ansible",
|
||||
},
|
||||
})
|
||||
|
||||
return {
|
||||
{ import = "plugins.extras.lang.yaml-extended" },
|
||||
{ import = "lazyvim.plugins.extras.lang.ansible" },
|
||||
|
@ -8,21 +27,6 @@ return {
|
|||
vim.list_extend(opts.ensure_installed, { "ansible-language-server" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
init = function()
|
||||
vim.filetype.add({
|
||||
pattern = {
|
||||
[".*/playbooks/.*%.yaml"] = "yaml.ansible",
|
||||
[".*/playbooks/.*%.yml"] = "yaml.ansible",
|
||||
[".*/roles/.*/tasks/.*%.yaml"] = "yaml.ansible",
|
||||
[".*/roles/.*/tasks/.*%.yml"] = "yaml.ansible",
|
||||
[".*/roles/.*/handlers/.*%.yaml"] = "yaml.ansible",
|
||||
[".*/roles/.*/handlers/.*%.yml"] = "yaml.ansible",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
opts = {
|
||||
|
|
Loading…
Add table
Reference in a new issue