You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to use cmp-buffer as a completion source for nvim-cmp, but only when I explicitly request completion via <C-n>/<C-p>.
I've hacked this together locally:
I created a new nvim-cmp source that wraps cmp-buffer. The only difference is that my complete method doesn't do anything if params.context:get_reason() == types.cmp.ContextReason.Manual.
I'd like to use
cmp-buffer
as a completion source fornvim-cmp
, but only when I explicitly request completion via<C-n>/<C-p>
.I've hacked this together locally:
nvim-cmp
source that wrapscmp-buffer
. The only difference is that mycomplete
method doesn't do anything ifparams.context:get_reason() == types.cmp.ContextReason.Manual
.nvim-cmp
asking about this: Create a source which is only available when completion is manually triggered? nvim-cmp#803. AFAICT, there isn't a better way to do this right now other than creating a "wrapper source".<C-n>/<C-p>
mappings to invokerequire("cmp").complete
.nvim-cmp
to look for completions from all sources. Ideally this would only triggercmp-buffer
. I don't see any mechanism to filter sources when invokingcomplete
, the code seems to just unconditionally loop over all sources.The text was updated successfully, but these errors were encountered: