-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Thanks for the cool plugin. It works quite nice out-of-the-box for English texts, but nastily splits words at diacritic characters in other languages. Thus, I humbly request to consider using \%(-\?\d\+\%(\.\d\+\)\?\|\K\k*\%([\-.]\k*\)*\) as default keyword_pattern.
Background Story
Today, I decided to fix my trouble with autocompletion being nasty, when composing German texts. After finding out, that this plugin is responsible for that, the README suggested to set the keyword_pattern to [[\k\+]], which works and of course looses the extra features (e.g., number completion) of the default keyword_pattern. So, looking up the available regex atoms, I just replaced \h by \K and \w by \k in the default keyword_pattern to keep all the bells and whistles of the default pattern and at the same time respect the iskeyword setting:
{ name = 'buffer', option = { keyword_pattern = [[\%(-\?\d\+\%(\.\d\+\)\?\|\K\k*\%([\-.]\k*\)*\)]] }}Now, I wondered, whether this could be made the default setting? This will positively impact the out-of-the-box experience of users with changed iskeyword settings or those who want to complete words with diacritic characters.