From 31c7bc5258d7323658e60cb5400d5f3457fff74f Mon Sep 17 00:00:00 2001 From: Matthew Wozniak Date: Thu, 18 Jan 2024 19:30:36 -0500 Subject: vimtex --- after/plugin/luasnip.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 after/plugin/luasnip.lua (limited to 'after/plugin/luasnip.lua') diff --git a/after/plugin/luasnip.lua b/after/plugin/luasnip.lua new file mode 100644 index 0000000..5ee5143 --- /dev/null +++ b/after/plugin/luasnip.lua @@ -0,0 +1,24 @@ +require("luasnip").config.set_config({ -- Setting LuaSnip config + + -- Enable autotriggered snippets + enable_autosnippets = true, + + -- Use Tab (or some other key if you prefer) to trigger visual selection + store_selection_keys = "", +}) + +vim.cmd[[ +" Expand or jump in insert mode +imap luasnip#expand_or_jumpable() ? 'luasnip-expand-or-jump' : '' + +" Jump forward through tabstops in visual mode +smap luasnip#jumpable(1) ? 'luasnip-jump-next' : '' + +" Jump backward through snippet tabstops with Shift-Tab (for example) +imap luasnip#jumpable(-1) ? 'luasnip-jump-prev' : '' +smap luasnip#jumpable(-1) ? 'luasnip-jump-prev' : '' +]] + +require("luasnip.loaders.from_lua").load({ + paths = "~/etc/nvim/luasnip", +}) -- cgit v1.2.3-54-g00ecf