nvim-cmp icon indicating copy to clipboard operation
nvim-cmp copied to clipboard

Replace right-click menu with cmp one

Open Sk7Str1p3 opened this issue 1 year ago • 1 comments

IMG_20241013_234402_696 So my goal is replace mouse menu (right window) with cmp menu (left one) I could not find any info, is this even possible? thx

Sk7Str1p3 avatar Oct 13 '24 21:10 Sk7Str1p3

I think it is, if your terminal is modern/mouse-friendly.

The right window is nvim builtin menu, cmp isn't. You need to globally map <RightMouse> to a function which triggers/opens cmp menu with custom entries.

You'll also need to locally map <LeftMouse> in the cmp menu window/buffer itself (if cmp doesn't do so already) so that you can select entries with the mouse.

Except for builtin menus, nvim disables mouse-move events by default. There is a dedicated nvim option to enable them though. Then you'll need to locally map those mouse move events in the cmp menu window/buffer as well if you want it to highlight hovered entries (like most gui context menus do).

You can also try searching to see if someone has made a plugin just for this.

tmillr avatar Jan 27 '25 02:01 tmillr