dotfiles/symlinks/config/nvim/plugin/snippets.lua

18 lines
408 B
Lua
Raw Normal View History

2022-04-27 21:43:49 +00:00
local luasnip = require("luasnip")
local s = luasnip.snippet
local f = luasnip.function_node
luasnip.add_snippets("all", {
2022-04-28 13:53:54 +00:00
s("date", { f(function(_, _)
return os.date("%Y-%m-%d")
end) }),
s("datetime", { f(function(_, _)
return os.date("%Y-%m-%d %H:%M:%S")
end) }),
s("diso", { f(function(_, _)
return os.date("%Y-%m-%dT%H:%M:%S")
end) }),
2022-04-27 21:43:49 +00:00
})
require("luasnip.loaders.from_vscode").lazy_load()