🐛 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,6 +96,7 @@ ac({ "BufNewFile", "BufRead" }, {
|
|||
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()]
|
||||
|
@ -103,6 +104,7 @@ ac("ModeChanged", {
|
|||
then
|
||||
require("luasnip").unlink_current()
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue