🗑️ remove(nvim): luasnip autocmd
This commit is contained in:
parent
a04722fb56
commit
be95fafd58
1 changed files with 0 additions and 16 deletions
|
@ -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" }, {
|
||||||
|
|
Loading…
Add table
Reference in a new issue