D22477: Add a config to only show completions matching word beginning
noreply at phabricator.kde.org
Tue Jul 16 10:23:03 BST 2019
ahmadsamir added a comment.
In D22477#496059 <https://phabricator.kde.org/D22477#496059>, @kossebau wrote:
> Default is `false,` so does not change behaviour unless someone toggles the switch, right?
> I would rename the option to `WordCompletionMatchFromWordStartOnly` though, as from what I can tell completion often only does from start, and matching also in the word is an extra feature. Edit: as in, reading `WordCompletionMatchFromWordStart`in the code triggered with me "yes, what else? MatchFromEnd?"
Noted. Thought I most likely didn't add "only" because the config name was becoming rather too long, but you have a point.
> Actually, perhaps that whole option could/should be even an enum for 3 cases:
> a) from full word start
> b) from subword start (CamelCase, _)
> c) match anywhere in word.
> I vaguely remember some cases where I got annoyed by cross-subword hits accidentally creating a match.
a and b are already in the MatchType enum, StartsWithMatch and ContainsMatch respectively, the new config is overriding the current behaviour where if there's no StartsWithMatch, it goes to the ContainsMatch route. As for c, I think that would be too many completions, the accuracy would be blown to bits...
To: ahmadsamir, #ktexteditor, cullmann, dhaumann, #kdevelop, kossebau, mwolff, kfunk
Cc: kwrite-devel, kde-frameworks-devel, LeGast00n, sbergeron, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel