Dot_Files/.nvim.lua

17 lines
343 B
Lua
Raw Normal View History

2023-08-21 19:45:15 -05:00
local root = vim.fn.expand("%:p:h")
local function match_ansible(path, bufnr)
if path:find(root, 1, true) ~= nil then
return "yaml.ansible"
end
return vim.api.nvim_get_option_value("filetype", { buf = bufnr })
end
vim.filetype.add({
extension = {
yaml = match_ansible,
yml = match_ansible,
},
})