🐛 fix(nvim): disable luasnip autocmd when inside vscode
This commit is contained in:
parent
b118a9ec27
commit
f3e9868129
1 changed files with 8 additions and 6 deletions
|
@ -96,12 +96,14 @@ ac({ "BufNewFile", "BufRead" }, {
|
||||||
ac("ModeChanged", {
|
ac("ModeChanged", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
callback = function()
|
callback = function()
|
||||||
if
|
if not vim.g.vscode then
|
||||||
((vim.v.event.old_mode == "s" and vim.v.event.new_mode == "n") or vim.v.event.old_mode == "i")
|
if
|
||||||
and require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
((vim.v.event.old_mode == "s" and vim.v.event.new_mode == "n") or vim.v.event.old_mode == "i")
|
||||||
and not require("luasnip").session.jump_active
|
and require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
||||||
then
|
and not require("luasnip").session.jump_active
|
||||||
require("luasnip").unlink_current()
|
then
|
||||||
|
require("luasnip").unlink_current()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue