1
0
neovim_config/lua/snippets/lua.lua

12 lines
294 B
Lua
Raw Normal View History

local ls = require("luasnip")
local s = ls.snippet
local i = ls.insert_node
local fmt = require("luasnip.extras.fmt").fmt
-- https://github.com/L3MON4D3/LuaSnip/blob/master/DOC.md
return {
s("req", fmt("local {} = require('{}')", { i(1, "default"), require("luasnip.extras").rep(1)}))
}