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