Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmp setup comes with a warning on the line that sets: cmp.mapping.complete() #95

Closed
fernandocanizo opened this issue Dec 25, 2022 · 3 comments

Comments

@fernandocanizo
Copy link

fernandocanizo commented Dec 25, 2022

Describe the bug
cmp setup comes with a warning on the line that sets: cmp.mapping.complete()

To Reproduce
Steps to reproduce the behavior:

  1. Kickstart a clean Neovim configuration as explained in the README
  2. Use ]d to go to the warning or open the quickfix window with <leader>q

Desktop (please complete the following information):

  • OS: Archlinux
  • Terminal: urxvt

** Neovim Version **

  • v0.8.1

Warning says

init.lua|397 col 21-43 warning| This function requires 1 argument(s) but instead it is receiving 0.

Help for the function shows an example to avoid completion in a specific circumstance, but doesn't explain the parameters. There's no help for cmp.ConfigSchema nor cmp.ContextReason.

Putting an empty table fixes the warning, but I don't know if that breaks some functionality:

['<C-Space>'] = cmp.mapping.complete({}),
@mischavandenburg
Copy link

I get the same warning.

@mlabrkic
Copy link

mlabrkic commented Jan 2, 2023

After this I have no more warning:
['<C-Space>'] = cmp.mapping.complete({}), -- {}

warning| This function requires 1 argument(s) but instead it is receiving 0.

  mapping = cmp.mapping.preset.insert {
    ['<C-d>'] = cmp.mapping.scroll_docs(-4),
    ['<C-f>'] = cmp.mapping.scroll_docs(4),
    ['<C-Space>'] = cmp.mapping.complete({}),  -- because warning (1 argument):  {}
    ['<CR>'] = cmp.mapping.confirm {
      behavior = cmp.ConfirmBehavior.Replace,
      select = true,
    },

PS: now I see that it is already written

OS: Windows 10
I use nvim-qt.exe

Nvim release build Latest
stable
NVIM v0.8.2

@tjdevries
Copy link
Member

Fixed by #178

coffm049 pushed a commit to coffm049/christian-kickstart.nvim that referenced this issue Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants