prepare for custom snippets
This commit is contained in:
@@ -1,9 +1,22 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
-- follow latest release.
|
dependencies = {
|
||||||
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
|
"rafamadriz/friendly-snippets",
|
||||||
|
},
|
||||||
-- install jsregexp (optional!).
|
-- install jsregexp (optional!).
|
||||||
build = "make install_jsregexp",
|
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