chore: add .nvim.lua exrc file
This commit is contained in:
parent
f6e6429789
commit
4272b6b1fa
16
.nvim.lua
Normal file
16
.nvim.lua
Normal 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,
|
||||
},
|
||||
})
|
Loading…
Reference in New Issue
Block a user