Skip to content

Conversation

@dvimaaniye
Copy link
Contributor

@dvimaaniye dvimaaniye commented Nov 13, 2025

  • Max height can be set separately from 'pumheight'
  • Default behaviour is still to use pumheight, so existing configs won't be affected.
  • A negative max_height will not display the menu. (Should it fallback to use all available space?)
	cmp.setup({
		...
		window = {
			completion = cmp.config.window.bordered({ max_height = 5 }), -- ignores pumheight
			-- completion = cmp.config.window.bordered({ max_height = 0 }), -- Uses all available space, ignores pumheight 
			-- completion = cmp.config.window.bordered(), -- Uses pumheight, default
			-- completion = cmp.config.window.bordered({ max_height = nil }), -- Uses pumheight, same as default
			
			-- completion = cmp.config.window.bordered({ max_height = -5 }), -- Menu not displayed
		},
		...
	})

Screenshots:
(max_height set to 5):
image

(max_height set to 0):
image

(max_height set to 5, pumheight set to 1, ignores pumheight):
image

(max_height set to nil (default), pumheight set to 1, uses pumheight):
image

@wsdjeg wsdjeg merged commit d78fb3b into hrsh7th:main Nov 14, 2025
2 checks passed
@wsdjeg
Copy link
Collaborator

wsdjeg commented Nov 14, 2025

Thanks, LGTM, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants