local ls = require "luasnip" local types = require "luasnip.util.types" ls.config.set_config { history = true, updateevents = "TextChanged, TextChangedI", enable_autosnippets = true } vim.keymap.set({ "i", "s" }, "", function() if ls.expand_or_jumpable() then ls.expand_or_jump() end end, { silent = true }) vim.keymap.set({ "i", "s" }, "", function() if ls.jumpable() then ls.jump(-1) end end, { silent = true }) vim.keymap.set({ "i", "s" }, "", function() if ls.choice_active() then ls.change_choice(1) end end, { silent = true }) vim.keymap.set("n", "s", "source ~/.config/nvim/lua/custom/luasnip.lua") -- Load custom snippets for _, ft_path in ipairs(vim.api.nvim_get_runtime_file("lua/custom/snippets/*.lua", true)) do loadfile(ft_path)() end