chore: add .nvim.lua exrc file

This commit is contained in:
Price Hiller 2023-08-21 19:45:15 -05:00
parent f6e6429789
commit 4272b6b1fa
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8

16
.nvim.lua Normal file
View File

@ -0,0 +1,16 @@
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,
},
})