Add option for symbol matching logic. (#1515)
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.
This commit is contained in:
@@ -123,7 +123,8 @@ A recommended configuration can be found below.
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
}),
|
||||
matching = { disallow_symbol_nonprefix_matching = false }
|
||||
})
|
||||
|
||||
-- Setup lspconfig.
|
||||
@@ -560,6 +561,11 @@ matching.disallow_prefix_unmatching~
|
||||
`boolean`
|
||||
Whether to allow prefix unmatching.
|
||||
|
||||
cmp-config.matching.disallow_symbol_nonprefix_matching
|
||||
matching.disallow_symbol_nonprefix_matching
|
||||
`boolean`
|
||||
Whether to allow symbols in matches if the match is not a prefix match.
|
||||
|
||||
*cmp-config.sorting.priority_weight*
|
||||
sorting.priority_weight~
|
||||
`number`
|
||||
|
||||
Reference in New Issue
Block a user