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

Add option for symbol matching logic.

Open iteratee opened this issue 1 year ago • 3 comments

The no_symbol_match makes command line completion a lot less useful. It disables any matches for file names with symbols in them. This prevents completing things like ":b foo/bar" to ":b foo/bar.txt" or ":b foo_" to ":b baz/foo_bar.txt". Add an option disallow_symbol_nonprefix_matching that prevents a match if it contains a symbol and isn't a prefix match. Make that option the default. Add the option to documentation and tests. Add to the examples for command line setup disabling the option.

iteratee avatar Apr 11 '23 19:04 iteratee

@iteratee I was just about to make a similar PR - thank you! This has been bothering me for a while :)

My other thought was to use the keyword_pattern per source in place of char.is_symbol, which for cmp-cmdline would include all non-blank characters: https://github.com/hrsh7th/nvim-cmp/compare/main...joshbode:nvim-cmp:joshbode/keyword-symbol-check although, it's less direct than your solution.

joshbode avatar Nov 06 '23 08:11 joshbode

LGTM. Thank you. Sorry. I produced conflicts unexpectedly. Could you solve it?

hrsh7th avatar Dec 10 '23 11:12 hrsh7th

Sorry for the delay. Rebased.

iteratee avatar Jan 05 '24 23:01 iteratee

Thank you.

hrsh7th avatar Mar 21 '24 18:03 hrsh7th