From 80b44e09ddb4ed9cb6fe5dc33f6507f9180beb38 Mon Sep 17 00:00:00 2001 From: jensonjohnathon Date: Mon, 15 Sep 2025 15:25:28 +0200 Subject: [PATCH] Snippets --- LuaSnip/Readme.md | 10 ++++++++++ init.lua | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 LuaSnip/Readme.md diff --git a/LuaSnip/Readme.md b/LuaSnip/Readme.md new file mode 100644 index 00000000..cb3e5af1 --- /dev/null +++ b/LuaSnip/Readme.md @@ -0,0 +1,10 @@ +# Example LuaSnip directory structure +${HOME}/.config/nvim/LuaSnip/ +├── all.lua +├── markdown.lua +├── python.lua +└── tex + ├── delimiters.lua + ├── environments.lua + ├── fonts.lua + └── math.lua diff --git a/init.lua b/init.lua index 34351e7d..315ec407 100644 --- a/init.lua +++ b/init.lua @@ -302,6 +302,14 @@ require('lazy').setup({ require('luasnip.loaders.from_vscode').lazy_load() require('luasnip.loaders.from_lua').load { paths = '~/.config/nvim/LuaSnip/' } + 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 = '', + } -- einfache Keymaps vim.keymap.set({ 'i' }, '', function() luasnip.expand()