nvim-cmp icon indicating copy to clipboard operation
nvim-cmp copied to clipboard

Completions are filtered after being returned by a callback. Can this be turned off somehow?

Open rwblokzijl opened this issue 3 years ago • 0 comments

FAQ

  • [X] I have checked the FAQ and it didn't resolve my problem.

Announcement

Minimal reproducible full config

using only cmp-spell

    Plug 'hrsh7th/nvim-cmp'
    Plug 'f3fora/cmp-spell'
cmp.setup({
  preselect = cmp.PreselectMode.None,

  mapping = cmp.mapping.preset.insert({
    ["<C-n>"] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert },
    ["<C-p>"] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert },
  }),

  sources = cmp.config.sources({
    { name = 'spell' },
  }),
})

Description

Using the spell extentsion: all the suggestions from spell should be shown. 2022-09-17-010254_295x100_scrot

cmp-spell uses vim builtin spelling correction, which should return:

2022-09-17-010753_209x427_scrot

I also tried adding the entry_filter, but this achieved nothing. I would expect there to be an option that turns this filtering off, but cant find anything that worked.

Steps to reproduce

  • Use the extentions above, and the lua config provided.
  • Try to complete a misspelled word.

Expected behavior

all the suggestions from spellcorrect should be shown

Actual behavior

Only the suggestions where the characters are a superset of the matched word are shown.

Additional context

I checked their code, and they return everything correctly in their callback, but nvim-cmp filters it after the fact.

rwblokzijl avatar Sep 16 '22 23:09 rwblokzijl