fix ansible filetype detection
This commit is contained in:
parent
26d45f0210
commit
31c6be45ce
1 changed files with 4 additions and 0 deletions
|
@ -1,4 +1,8 @@
|
|||
local ansible_test = function(path, bufnr)
|
||||
|
||||
if string.find(path, "templates") or string.find(path, "files") then
|
||||
return "yaml"
|
||||
end
|
||||
local find = { "tasks", "roles", "handlers", "group_vars", "host_vars", "ansible.cfg", ".ansible-lint" }
|
||||
local opts = { stop = os.getenv("HOME"), upward = true, limit = 1, path = path }
|
||||
if next(vim.fs.find(find, opts)) ~= nil then
|
||||
|
|
Loading…
Add table
Reference in a new issue