From 51b28abe428c724034bd4bd998c389af64bc9f58 Mon Sep 17 00:00:00 2001 From: Jake Brinkmann Date: Fri, 12 Apr 2024 06:17:36 -0500 Subject: [PATCH] Fix to ignore fugitive buffers --- lua/esqueleto/utils.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/esqueleto/utils.lua b/lua/esqueleto/utils.lua index 4d408c3..87a1145 100644 --- a/lua/esqueleto/utils.lua +++ b/lua/esqueleto/utils.lua @@ -182,6 +182,10 @@ M.inserttemplate = function(opts) local filename = vim.fn.expand("%:t") local filetype = vim.bo.filetype + --- not ideal... but stops the confusing behavior + local ignore_this_buffer = filepath:find("^fugitive://") ~= nil + if ignore_this_buffer then return nil end + -- Identify if pattern matches user configuration local pattern = nil if not _G.esqueleto_inserted[filepath] then