Add options to limit auto completion and buffer completion#557
Add options to limit auto completion and buffer completion#557felixendres wants to merge 2 commits intoyegappan:mainfrom
Conversation
I find it distracting to have auto completion for everything I type. I'd rather have it only triggered on trigger characters, e.g. when typing a dot to access a class member, or a colon, when using a namespaced symbol. This change allows to flexibly limit auto completion to any trigger kinds.
When completing a file name or a class method, buffer completion makes the list longer and provides little value. This option allows to turn buffer completion off for completions triggered by trigger characters.
|
had replied at OP ticket, if you just want to toggle that buf/auto-compl, there are options can do that already.
// so supposed you donot need to dup the wheel or mess the code.
…--
shane.xb.qian
|
|
I do know, that I can toggle buffer and auto completion with the options "autoComplete" and "useBufferCompletion". But I want them only in specific cases:
I do not see how that specific behavior can be achieved with the existing options. If you think this is possible, please tell me how. |
|
But I want them only in specific cases:
- Auto completion shall only happen after typing trigger characters and shall not include buffer completions.
- Buffer completions shall only be included in the result when typing words and triggering omni-completion manually
fine, it burn my head, i donot want to sort up those compl one or two or some others to others depended one/some to one/some.
// but anyway, it is your choice, whatever...
…--
shane.xb.qian
|
|
Oh, it's not that complicated, I hope. On the one hand, if I type On the other hand, I don't want the completion popup on everything I write. But when I do trigger it manually (with ) I want it to include the buffer completions, because maybe I'm just repeatedly typing some word in a comment or string. |
Add option to limit usage of buffer/buffer completion
Auto completion can now be set to be triggered on specific trigger types. This is useful to auto-complete on trigger characters only, e.g. when typing a dot to access a class member, or a colon for a namespaced symbol. See documentation of option autoCompleteTriggers in options.vim.
When completing a file name or a class method, buffer completion makes the list longer and provides little value. The option bufferCompletionTriggers allows to turn buffer completion of for specific trigger types.
The first part (auto completion) was discussed in #553. I made the PR accordingly.