Closed robinknaapen closed 6 years ago
Concluded that this is a terrible workaround... This only worked in JS for me. In Golang this will result in NCM not finding any completion; In my experience.
That's line completion. https://github.com/roxma/nvim-completion-manager/issues/24
Line completion is a non auto popup source, it's only triggered by <Plug>(cm_force_refresh)
It has lower priority so it's at the bottom of the menu.
You could disable it with g:cm_sources_override
I'm wondering:
Here is a brief explanation of current behavior:
<Plug>(cm_force_refresh)
activates all sources according to current file type. And it ignores the sources's cm_refresh_length
. For example, with buffer keyword completion,
It auto pops up when you has typed four characters foob|
, by default, But with manually completion, it's triggered for only one character. f|
Activates all souces could be annoying. But it seems it's needed in some use cases, for example, when you don't know what more to type to trigger the menu.
My proposal:
Add a mark into each completion item.
We could setup another config variable cm_manual_refresh_length
, like
cm_refresh_length
, but only used for manual completion.
As for the line completion source, it should only be triggered by manually, and only when the cursor is at the beginning of a word, before typing a character. It should be hidden when suggestions with higher priority is available.
// cc @rafaeln
fixed in ncm2 <Plug>(ncm2_manual_trigger)
has almost the same behavior of auto trigger
I'm currently using
When I use this I notice that I get results in some of my completions that make no sense to me.
My expected result would be the same as with
cm_auto_popup
enabledI've found a workaround for this issue. When looking through your source code I found out that changing
cm_force_refresh
fixed my issue.What I did was change the 1 into 0.
I'm using
nvim-cm-tern
in my examples