diff --git a/nvim/.config/nvim/lua/plugins/snippets.lua b/nvim/.config/nvim/lua/plugins/snippets.lua index 95aa6f5..4244939 100644 --- a/nvim/.config/nvim/lua/plugins/snippets.lua +++ b/nvim/.config/nvim/lua/plugins/snippets.lua @@ -1,9 +1,22 @@ return { { "L3MON4D3/LuaSnip", - -- follow latest release. - version = "v2.*", -- Replace 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, }, } diff --git a/nvim/.config/nvim/snippets/.gitkeep b/nvim/.config/nvim/snippets/.gitkeep new file mode 100644 index 0000000..e69de29