diff --git a/.config/nvim/lua/plugin/luasnip.lua b/.config/nvim/lua/plugin/luasnip.lua index c5415c1..9fb6719 100644 --- a/.config/nvim/lua/plugin/luasnip.lua +++ b/.config/nvim/lua/plugin/luasnip.lua @@ -74,10 +74,12 @@ end -- Returns a snippet_node wrapped around an insert_node whose initial -- text value is set to the current date in the desired format. local function date_input(fmt) - local fmt = fmt or "%Y-%m-%d" - return sn(nil, i(1, os.date(fmt))) + local format = fmt or "%Y-%m-%d" + return sn(nil, i(1, os.date(format))) end +local copy = utils.copy + -- snippets are added via ls.add_snippets(filetype, snippets[, opts]), where -- opts may specify the `type` of the snippets ("snippets" or "autosnippets", -- for snippets that should expand directly after the trigger is typed).