From 7eed873e021dcfe455799d5b14d56ecd753f6eb6 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 3 Aug 2024 09:13:53 -0700 Subject: [PATCH] [vim] Detect Hugo HTML templates when there's a layouts component in the path --- config/nvim/ftdetect/gohtmltmpl.lua | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 config/nvim/ftdetect/gohtmltmpl.lua diff --git a/config/nvim/ftdetect/gohtmltmpl.lua b/config/nvim/ftdetect/gohtmltmpl.lua new file mode 100644 index 0000000..c250b8b --- /dev/null +++ b/config/nvim/ftdetect/gohtmltmpl.lua @@ -0,0 +1,7 @@ +-- Eryn Wells + +-- Detect layout templates in Hugo projects +vim.api.nvim_create_autocmd({"BufRead", "BufNewFile"}, { + pattern = {"*/layouts/*.html"}, + command = "setfiletype gohtmltmpl" +})