hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
7.47k stars 370 forks source link

nvim cmp breaks completion on input function #1794

Open eyalk11 opened 6 months ago

eyalk11 commented 6 months ago

FAQ

Announcement

Minimal reproducible full config

I checked it by disabling nvim-cmp and it didn't happen. And also kept just these lines for cmp.

-- Set configuration for specific filetype.
local cmp = require'cmp'

cmp.setup.filetype('gitcommit', {
  sources = cmp.config.sources({
    { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
  }, {
    { name = 'buffer' },
  })
})

-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline('/', {
  mapping = cmp.mapping.preset.cmdline(),
  sources = {
    { name = 'buffer' }
  }
})

-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', {
  mapping = cmp.mapping.preset.cmdline(),
  sources = cmp.config.sources({
    { name = 'path' }
  }, {
    { name = 'cmdline' }
  })
})

Description

let user_dir = input('Enter a directory: ', '', 'dir')

The completion simple not working for me. When I press instead of completion, I get ^I .

Steps to reproduce

Use the mentioned configuration and type the command

Expected behavior

completion of dirs

Actual behavior

When I press instead of completion, I get ^I .

Additional context

No response

elcfd commented 3 months ago

@eyalk11 I believe that this is the same issue as reported in https://github.com/hrsh7th/nvim-cmp/issues/1511