From 307fceea38b7352a79b0bdb87025a34b76973867 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Thu, 19 Jun 2025 18:34:13 +0900 Subject: updates --- .../TheSiahxyz/lua/thesiahxyz/plugins/snippets.lua | 72 ---------------------- 1 file changed, 72 deletions(-) delete mode 100644 ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/snippets.lua (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/snippets.lua') diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/snippets.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/snippets.lua deleted file mode 100644 index eac9161..0000000 --- a/ar/.config/TheSiahxyz/lua/thesiahxyz/plugins/snippets.lua +++ /dev/null @@ -1,72 +0,0 @@ -return { - { - "L3MON4D3/LuaSnip", - version = "v2.*", - build = "make install_jsregexp", - dependencies = { - "rafamadriz/friendly-snippets", - config = function() - require("luasnip.loaders.from_vscode").lazy_load() - end, - }, - config = function() - local ls = require("luasnip") - ls.setup({ - link_children = true, - link_roots = false, - keep_roots = false, - update_events = { "TextChanged", "TextChangedI" }, - }) - local c = ls.choice_node - ls.choice_node = function(pos, choices, opts) - if opts then - opts.restore_cursor = true - else - opts = { restore_cursor = true } - end - return c(pos, choices, opts) - end - - require("luasnip.loaders.from_vscode").lazy_load({ - paths = { '"' .. vim.fn.stdpath("config") .. '/lua/thesiahxyz/snippets"' }, - }) - - vim.cmd.runtime({ args = { "lua/thesiahxyz/snippets/*.lua" }, bang = true }) -- load custom snippets - - vim.keymap.set({ "i", "x" }, "", function() - if ls.expand_or_jumpable() then - ls.expand_or_jump() - end - end, { silent = true, desc = "Expand snippet or jump to the next snippet node" }) - - vim.keymap.set({ "i", "x" }, "", function() - if ls.jumpable(-1) then - ls.jump(-1) - end - end, { silent = true, desc = "Previous spot in the snippet" }) - - vim.keymap.set({ "i", "x" }, "", function() - if ls.choice_active() then - ls.change_choice(1) - end - end, { silent = true, desc = "Next snippet choice" }) - - vim.keymap.set({ "i", "x" }, "", function() - if ls.choice_active() then - ls.change_choice(-1) - end - end, { silent = true, desc = "Previous snippet choice" }) - end, - keys = { - vim.keymap.set("i", "", function() - return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" - end, { expr = true, silent = true, desc = "Jump to next snippet" }), - vim.keymap.set("s", "", function() - require("luasnip").jump(1) - end, { desc = "Jump to next snippet" }), - vim.keymap.set({ "i", "s" }, "", function() - require("luasnip").jump(-1) - end, { desc = "Jump to Previous Snippet" }), - }, - }, -} -- cgit v1.2.3