Replies: 5 comments 7 replies
-
So leap but for the drop down menu. If implementing it won't be too much of a hassle, I can see its use. Seconded. |
Beta Was this translation helpful? Give feedback.
-
You can use local keys = {}
for i = 1, 10, 1 do
local key = table.concat({ "<M-", (i < 10 and i or 0), ">" })
keys[key] = function(fallback)
if cmp.visible() then
return cmp.select_next_item({ count = i - 1 })
end
fallback()
end
end
cmp.setup({ mapping = keys }) For index label, I believe it can be achieved by using |
Beta Was this translation helpful? Give feedback.
-
Made a fork with some changes to emulate this a little better (adding numbers, and creating a better function for alt + number key selecting something. This is super hacky and I haven't tested it so it might break horribly. No highlighting (yet? idk if I'll add that) and I put the numbers on the right b/c I prefer them there. Easy to change tho if you fork it dots for how to bind keys After using this for a day, it's definitely buggy. Sometimes with large menus that are inverted the indexing doesn't work, I'll look into this a little more after work today. |
Beta Was this translation helpful? Give feedback.
-
Can't this already be done via the current api and a custom key-mapping? |
Beta Was this translation helpful? Give feedback.
-
I kind of wishing to quickly select the completion item via Alt+Number key without having to scroll through the list with Ctrl+n or any key you use to choose through the completion list
![0xd6wqg9mpma1](https://user-images.githubusercontent.com/74300675/224099971-b09ce28a-fddc-4c5c-8e1a-9f35942bb7e6.png)
Beta Was this translation helpful? Give feedback.
All reactions