2

Having configured nvim-lspconfig exactly as officially recommended, I want to use the completion functionality via omnifunc.

When pressing <C-X><C-O>, a drop down window appears right below my cursor position with options to select. On the other hand, another Window named Preview opens above my current buffer window with two empty lines. Is this intended, and if not, how can I fix it?

I feel like in this preview window should be a description and syntax information about various functions and packages. This problem arises with pyright (Python) as well as clangd (C++), so I suspect it is a neovim problem.

1
  • 1
    Does completeopt contain preview? Still, the preview window should be populated by something if it is opens
    – D. Ben Knoble
    Commented Aug 8, 2022 at 14:41

1 Answer 1

2

This happens when completeopt has the preview option in it. You probably added this to your config at one point.

Check verbose set completeopt? to see its contents and where it was last set from, so you can remove it from your config. If it's being set by a plugin and you want to explicitly disable it, use set completeopt-=preview.

1
  • In neovim it's vim.opt.completeopt = { "menu" }. See :help completeopt for all of the options.
    – Seth
    Commented Oct 4, 2023 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.