Skip to content

Commit 97769a3

Browse files
committed
Add support for additional Ansible directory structures
1 parent bb7988a commit 97769a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/astrocommunity/pack/ansible/init.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ local function yaml_ft(path, bufnr)
44
if type(content) == "table" then content = table.concat(content, "\n") end
55

66
-- check if file is in roles, tasks, or handlers folder
7-
local path_regex = vim.regex "(tasks\\|roles\\|handlers)/"
7+
local path_regex = vim.regex "(ansible\\|handlers\\|playbooks\\|roles\\|\\vars|\\tasks)/"
88
if path_regex and path_regex:match_str(path) then return "yaml.ansible" end
9+
910
-- check for known ansible playbook text and if found, return yaml.ansible
1011
local regex = vim.regex "hosts:\\|tasks:"
1112
if regex and regex:match_str(content) then return "yaml.ansible" end

0 commit comments

Comments
 (0)