Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmdline won't show with completion.menu.direction_priority = { "s" } #1408

Open
2 tasks done
yehuohan opened this issue Mar 8, 2025 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working windows Module which displays UI

Comments

@yehuohan
Copy link
Contributor

yehuohan commented Mar 8, 2025

Make sure you have done the following

  • Updated to the latest version of blink.cmp
  • Searched for existing issues and documentation (try <C-k> on https://cmp.saghen.dev)

Bug Description

I want the completion menu always show at below of cursor. So I setup blink.cmp:

require("blink.cmp").setup({
    ...

	completion = {
		menu = {
			direction_priority = { "s" },
		},
	},

    ...
})

But completion for cmdline won't show. (Seemed there's no area below the cmdline cursor).

Currently, I found modifying blink.cmp\lua\blink\cmp\completion\windows\menu.lua:L131 can make cmdline completion show:

  local border_size = win:get_border_size()
  local direction_priority = config.direction_priority
  if vim.fn.mode():sub(1, 1) == 'c' then direction_priority = { 'n' } end
  local pos = win:get_vertical_direction_and_height(direction_priority, config.max_height)

Thanks.

Relevant configuration

neovim version

NVIM v0.10.4

blink.cmp version

main, latest

@yehuohan yehuohan added the bug Something isn't working label Mar 8, 2025
@Saghen Saghen added the windows Module which displays UI label Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Module which displays UI
Projects
None yet
Development

No branches or pull requests

2 participants