echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
5.02k stars 185 forks source link

limit number of items in mini.completion window/popup #861

Closed gallo-s-chingon closed 5 months ago

gallo-s-chingon commented 5 months ago

Contributing guidelines

Module(s)

mini.completion

Description

I'm a prose writer, so thank you far all that you do to simplify / streamline plugins I need/use.

could you add a parameter/setting to limit the number of items in that appear in the popup window? if it's already in place where can I find the documentation to set the variable?

echasnovski commented 5 months ago

Thanks for kind words!

The 'mini.completion' module uses built-in tools as much as possible. This includes the popup menu with completion candidates (see :h ins-completion-menu). Its maximum height can be controlled by 'pumheight' option. You can adjust it by putting something like vim.o.pumheight = 10 in your Lua config. An alternative is to use 'mini.basics' and its options.extra_ui setting with something like this: require('mini.basics').setup({ options = { extra_ui = true } }).