Created
September 23, 2024 10:53
-
-
Save drscream/865c6da02f58fa7c70caa0fda45eea4f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Autocmds are automatically loaded on the VeryLazy event | |
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua | |
-- Add any additional autocmds here | |
-- Ansible file pattern | |
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile", "BufEnter" }, { | |
group = vim.api.nvim_create_augroup("Ansible", { clear = true }), | |
pattern = { | |
"*/roles/*/*/*.yaml", | |
"*/roles/*/*/*.yml", | |
"*/roles/*/*.yml", | |
"main.yml", | |
"main.yaml", | |
"group_vars/*.yml", | |
"group_vars/*.yaml", | |
"files/*.yaml", | |
"files/*.yml", | |
"environments/*.yaml", | |
"environments/*.yml,", | |
}, | |
callback = function() | |
vim.opt.filetype = "yaml.ansible" | |
end, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment