We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb7988a commit 97769a3Copy full SHA for 97769a3
lua/astrocommunity/pack/ansible/init.lua
@@ -4,8 +4,9 @@ local function yaml_ft(path, bufnr)
4
if type(content) == "table" then content = table.concat(content, "\n") end
5
6
-- check if file is in roles, tasks, or handlers folder
7
- local path_regex = vim.regex "(tasks\\|roles\\|handlers)/"
+ local path_regex = vim.regex "(ansible\\|handlers\\|playbooks\\|roles\\|\\vars|\\tasks)/"
8
if path_regex and path_regex:match_str(path) then return "yaml.ansible" end
9
+
10
-- check for known ansible playbook text and if found, return yaml.ansible
11
local regex = vim.regex "hosts:\\|tasks:"
12
if regex and regex:match_str(content) then return "yaml.ansible" end
0 commit comments