prepare for custom snippets
This commit is contained in:
@@ -1,9 +1,22 @@
|
||||
return {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
-- follow latest release.
|
||||
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
},
|
||||
-- install jsregexp (optional!).
|
||||
build = "make install_jsregexp",
|
||||
config = function()
|
||||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
|
||||
ls.add_snippets("lua", {
|
||||
s("hello", {
|
||||
t('print("hello world!")'),
|
||||
}),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
0
nvim/.config/nvim/snippets/.gitkeep
Normal file
0
nvim/.config/nvim/snippets/.gitkeep
Normal file
Reference in New Issue
Block a user