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

Add option to not reverse select_next_item on bottom_up list (#1346)

Open GustawXYZ opened this issue 1 year ago • 2 comments

* add feature requested in (#1346)

Add a parameter to the function preserve_mapping_verticality, which will keep mappings like <Up> and <Down> not reversed even when used custom view is used with selection_order = 'top_down' configuration. (Up is up and Down is down even when the list is upside down)

Example use configuration:

    ["<Down>"] = cmp.mapping(cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Select, preserve_mapping_verticality = true }, { "i", "s" }),
    ["<Up>"] = cmp.mapping(cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Select, preserve_mapping_verticality = true }, { "i", "s" }),

GustawXYZ avatar Sep 26 '23 23:09 GustawXYZ

Please add this

edshamis avatar Feb 05 '24 15:02 edshamis

@edshamis +1! In the meantime feel free to use the fork, in lazy.nvim you can configure this like so:

{
"hrsh7th/nvim-cmp",
url = "https://github.com/GustawXYZ/nvim-cmp",
event = "VeryLazy", 
}

GustawXYZ avatar Feb 05 '24 15:02 GustawXYZ