1
0
neovim_config/lua/snippets/lua.lua
Nigel Barink a2b76f8aef
FEAT: Adding trouble and started luasnippets
TODO: Fix compe to show snippets available in insert mode
2024-03-30 16:47:37 +01:00

12 lines
294 B
Lua

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)}))
}