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

matcher issue

Open epheien opened this issue 1 year ago • 5 comments

FAQ

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

Announcement

Minimal reproducible full config


Description

this is a fuzzy matcher bug

Steps to reproduce

    local score, matches = matcher.match('core', 'lua/cmp/core.lua', config.matching)
    print(score)
    print(vim.inspect(matches))

add these code in matcher_spec.lua, and run vusted ./lua/cmp/matcher_spec.lua

Expected behavior

can see a lua table to print

Actual behavior

0
{}
...

Additional context

No response

epheien avatar Jun 29 '24 20:06 epheien

  matching = {
    disallow_partial_fuzzy_matching = false, -- default: true
    disallow_symbol_nonprefix_matching = false, -- default: true
  }

add this option is a temp workaround

epheien avatar Jun 30 '24 17:06 epheien

Hi is this issue still present in my fork of nvim-cmp, magazine.nvim ?

iguanacucumber avatar Oct 14 '24 18:10 iguanacucumber

Hi is this issue still present in my fork of nvim-cmp, magazine.nvim ?

If the matcher code had not been modified, the problem would still exist.

Later on, I will submit a PR and add an option to change the matcher, which can use the same fuzzy matcher as Telescope.

epheien avatar Oct 15 '24 08:10 epheien

If the matcher code had not been modified, the problem would still exist.

matcher code has been modified quite a bit to fix bugs (#1900 & maybe others) and to add caching (#1980)

iguanacucumber avatar Oct 15 '24 08:10 iguanacucumber

matcher code has been modified quite a bit to fix bugs (#1900 & maybe others) and to add caching (#1980)

When I have time, I will go test it and leave a message on this issue once I have the results.

epheien avatar Oct 15 '24 08:10 epheien