luozhiya / fittencode.nvim

Fitten Code AI Programming Assistant for Neovim
49 stars 8 forks source link

c++ 补全换行问题。 #71

Open cxwx opened 1 month ago

cxwx commented 1 month ago

\n 无法正确使用,

配置使用 nvim-cmp

截屏2024-05-24 17 31 24 截屏2024-05-24 17 32 30
luozhiya commented 1 month ago

@cxwx

多行补全需要设置一下cmp

mapping = { ['<cr>'] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }), }
cxwx commented 1 month ago

应该是我的 tab 配置出现问题, 当仅有1个fittencode补全的时候会自动填充,

          ["<Tab>"] = cmp.mapping(function(fallback)
            if cmp.visible() then
              cmp.select_next_item()
            elseif luasnip.expand_or_jumpable() then
              luasnip.expand_or_jump()
            else
              fallback()
            end
          end, { "i", "s" }),

这个 select_next_item 该如何改?