feat(keymaps): unlink luasnip on esc

This commit is contained in:
Folke Lemaitre 2024-12-15 11:46:21 +01:00
parent 8fe3b5eec8
commit ef9102677f
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 12 additions and 3 deletions

View file

@ -7,9 +7,7 @@ local map = LazyVim.safe_keymap_set
-- Clear search and stop snippet on escape
Snacks.util.on_key("<esc>", function()
vim.cmd("noh")
if vim.snippet then
vim.snippet.stop()
end
LazyVim.cmp.actions.snippet_stop()
end)
-- better up/down