From be95fafd5897dbf3309bcf098f1a20893cf2be4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Wed, 22 May 2024 00:11:46 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=EF=B8=8F=20remove(nvim):=20luasnip?= =?UTF-8?q?=20autocmd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lua/config/autocmds.lua | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.config/nvim/lua/config/autocmds.lua b/.config/nvim/lua/config/autocmds.lua index 246fe6ab..5d7e43d4 100644 --- a/.config/nvim/lua/config/autocmds.lua +++ b/.config/nvim/lua/config/autocmds.lua @@ -79,22 +79,6 @@ ac({ "BufNewFile", "BufRead" }, { end, }) --- Use the more sane snippet session leave logic. Copied from: --- https://github.com/L3MON4D3/LuaSnip/issues/258#issuecomment-1429989436 -ac("ModeChanged", { - pattern = "*", - callback = function() - if not vim.g.vscode then - if - ((vim.v.event.old_mode == "s" and vim.v.event.new_mode == "n") or vim.v.event.old_mode == "i") - and require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()] - and not require("luasnip").session.jump_active - then - require("luasnip").unlink_current() - end - end - end, -}) -- Toggle between relative/absolute line numbers local numbertoggle = ag("numbertoggle", { clear = true }) ac({ "BufEnter", "FocusGained", "InsertLeave", "CmdlineLeave", "WinEnter" }, {