From 4272b6b1fa00121bb9b2ca32b7f0600f34586cf3 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Mon, 21 Aug 2023 19:45:15 -0500 Subject: [PATCH] chore: add .nvim.lua exrc file --- .nvim.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .nvim.lua diff --git a/.nvim.lua b/.nvim.lua new file mode 100644 index 0000000..61edb61 --- /dev/null +++ b/.nvim.lua @@ -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, + }, +})