diff --git a/lua/esqueleto/autocmd.lua b/lua/esqueleto/autocmd.lua index 9653d00..f67695b 100644 --- a/lua/esqueleto/autocmd.lua +++ b/lua/esqueleto/autocmd.lua @@ -20,7 +20,7 @@ M.createautocmd = function(opts) end end - vim.api.nvim_create_autocmd({ "BufWinEnter", "BufReadPost", "BufNewFile" }, { + vim.api.nvim_create_autocmd({ "BufNewFile", "BufReadPost", "FileType" }, { group = group, desc = "esqueleto.nvim :: Insert template", pattern = getpatterns(), diff --git a/lua/esqueleto/utils.lua b/lua/esqueleto/utils.lua index caad45d..4d408c3 100644 --- a/lua/esqueleto/utils.lua +++ b/lua/esqueleto/utils.lua @@ -191,7 +191,6 @@ M.inserttemplate = function(opts) elseif vim.tbl_contains(opts.patterns, filetype) then pattern = filetype end - print(pattern) -- Get templates for selected pattern local templates = M.gettemplates(pattern, opts)