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

No way to show menu when ghost_text enabled and auto_show disabled #762

Closed
2 tasks done
frangio opened this issue Dec 24, 2024 · 3 comments
Closed
2 tasks done

No way to show menu when ghost_text enabled and auto_show disabled #762

frangio opened this issue Dec 24, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@frangio
Copy link

frangio commented Dec 24, 2024

Make sure you have done the following

  • I have updated to the latest version of blink.cmp
  • I have read the README

Bug Description

If menu.auto_show is disabled and ghost_text is enabled there seems to be no way to manually pull up the completion menu. <C-Space> in the default keymap preset does nothing in this case.

Relevant configuration

keymap = { preset = 'default' },
completion = {
  ghost_text = { enabled = true },
  menu = { auto_show = false },
}

neovim version

NVIM v0.10.3 Build type: Release LuaJIT 2.1.1713484068

blink.cmp version: branch, tag, or commit

v0.8.2

@frangio frangio added the bug Something isn't working label Dec 24, 2024
@jessevdp
Copy link
Contributor

I can confirm this!

I too run a config with auto_show = false and recently played around with ghost text.

I can open the completion menu when there is no ghost text visible yet.. So just after entering insert mode but when I haven't typed anything yet.

But after there is a completion with ghost text I can no long trigger show.

I can cycle to other completions using select_next and _prev just fine. (So there are other completions available!).

@jessevdp
Copy link
Contributor

It might be this:

function cmp.show(opts)
if cmp.is_visible() and not (opts and opts.providers) then return end

function cmp.is_visible()
return require('blink.cmp.completion.windows.menu').win:is_open()
or require('blink.cmp.completion.windows.ghost_text').is_open()
end

show() seems to have a guard clause that prevents it from being re-run if is_visible(). But is_visible() returns true when there is ghost text on the screen.

This was recently changed in 1006662. Also see the CHANGELOG for v0.8.0:

include ghost text in is_visible (1006662)

@Saghen
Copy link
Owner

Saghen commented Dec 27, 2024

Closed by #796

@Saghen Saghen closed this as completed Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants