From 835f78fcfdb38665e191abcdc661dc793e807327 Mon Sep 17 00:00:00 2001 From: Haelnorr Date: Fri, 14 Feb 2025 22:29:48 +1100 Subject: [PATCH] Made oil hide generated templ files --- lua/haelnorr/lazy/oil.lua | 9 +++++++-- lua/haelnorr/lazy/which-key.lua | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/haelnorr/lazy/oil.lua b/lua/haelnorr/lazy/oil.lua index e8f3c07..ef8077c 100644 --- a/lua/haelnorr/lazy/oil.lua +++ b/lua/haelnorr/lazy/oil.lua @@ -11,8 +11,13 @@ return { view_options = { show_hidden = true, is_always_hidden = function(name, bufnr) - local m = name:match("^%.%.") - return m ~= nil + if name:match("^%.%.") then + return true + end + if name:match("_templ%.go$") or name:match("_templ%.txt$") then + return true + end + return false end, }, }) diff --git a/lua/haelnorr/lazy/which-key.lua b/lua/haelnorr/lazy/which-key.lua index eaa3000..030e236 100644 --- a/lua/haelnorr/lazy/which-key.lua +++ b/lua/haelnorr/lazy/which-key.lua @@ -31,6 +31,7 @@ return { }, { "l", "LspRestart", desc = "Restart LSP" }, { "c", "Lazy reload conform.nvim", desc = "Reload Conform" }, + { "o", "Lazy reload oil.nvim", desc = "Reload Oil" }, -- Harpoon -- Quick jumps and show list