hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
7.53k stars 377 forks source link

Toggle completion menu #1750

Closed Sam-programs closed 3 weeks ago

Sam-programs commented 8 months ago

This pr gives the user the ability to hide all the cmp, by wrapping every nvim_win* function needed and storing the results before hiding the windows. Fix: https://github.com/hrsh7th/nvim-cmp/issues/1698 https://github.com/hrsh7th/nvim-cmp/issues/1013

dsully commented 5 months ago

Would love to see this merged.

Sam-programs commented 5 months ago

This still needs documentation, but i am not sure if the current config interface is good, i added 2 options.

window = {
      auto_hide = false,
      show_on_cursor_update = false,
}

auto_hide hides the windows after they opened until require('cmp.utils.window').show_all() is called or when the cursor moves in the menu if show_on_cursor_update is true. However show_on_cursor_update doesn't work well because the cursor doesn't move with a pre-selected item,

sleepy-day commented 4 weeks ago

Thanks for the work on this branch, I've been using it for a couple of months and forgot to check if it got merged in but it looks like it hasn't. Would it be possible to get this reviewed and merged in? Might need more work since it looks like it has merge conflicts and not sure if the creator of the branch is still around but if they're not I can clean up any issues and resubmit. Thank you.

Sam-programs commented 3 weeks ago

not sure if the creator of the branch is still around but if they're not I can clean up any issues

I am still here, but I don't plan to work on this pr anymore because I don't use cmp anymore. Sorry.