Kaynağa Gözat

fix(cmp): if possible jump in the snippet after completion

fix(cmp): update cmp to fix textwidth calculation and indent bugs
Chase Colman 3 yıl önce
ebeveyn
işleme
b23533f4c5
2 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. 3 0
      lua/lvim/core/cmp.lua
  2. 1 1
      lua/lvim/plugins.lua

+ 3 - 0
lua/lvim/core/cmp.lua

@@ -283,6 +283,9 @@ M.config = function()
       ["<C-e>"] = cmp.mapping.abort(),
       ["<CR>"] = cmp.mapping(function(fallback)
         if cmp.visible() and cmp.confirm(lvim.builtin.cmp.confirm_opts) then
+          if jumpable() then
+            luasnip.jump(1)
+          end
           return
         end
 

+ 1 - 1
lua/lvim/plugins.lua

@@ -11,7 +11,7 @@ local commit = {
   plenary = "96e821e8001c21bc904d3c15aa96a70c11462c5f",
   telescope = "078a48db9e0720b07bfcb8b59342c5305a1d1fdc",
   telescope_fzf_native = "59e38e1661ffdd586cb7fc22ca0b5a05c7caf988",
-  nvim_cmp = "1774ff0f842146521c63707245d3de5db2bb3732",
+  nvim_cmp = "ca6386854982199a532150cf3bd711395475ebd2",
   friendly_snippets = "94f1d917435c71bc6494d257afa90d4c9449aed2",
   autopairs = "f858ab38b532715dbaf7b2773727f8622ba04322",
   treesitter = "47cfda2c6711077625c90902d7722238a8294982",