🗑️ remove(nvim): luasnip autocmd

This commit is contained in:
Sergio Laín 2024-05-22 00:11:46 +02:00
parent a04722fb56
commit be95fafd58
No known key found for this signature in database
GPG key ID: FB00AF7015FFE76B

View file

@ -79,22 +79,6 @@ ac({ "BufNewFile", "BufRead" }, {
end, 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 -- Toggle between relative/absolute line numbers
local numbertoggle = ag("numbertoggle", { clear = true }) local numbertoggle = ag("numbertoggle", { clear = true })
ac({ "BufEnter", "FocusGained", "InsertLeave", "CmdlineLeave", "WinEnter" }, { ac({ "BufEnter", "FocusGained", "InsertLeave", "CmdlineLeave", "WinEnter" }, {