lsp icon indicating copy to clipboard operation
lsp copied to clipboard

How to show autocomplete doc on preview window instead of popup?

Open 813ethan opened this issue 2 months ago • 4 comments

There's an option to show the documentation of :LspHover on a preview window instead of a popup,

is there a way to achieve that with the documentation popup shown when selecting autocompletion keywords?

Personally im using this plugin in Android Termux, the autocompletion doc seems to be truncated even after enabling condensed autocomplete menu

Image

putting the doc on a separate panel will be a good option, if there's a way to accomplish it

813ethan avatar Oct 26 '25 10:10 813ethan

See :help 'completeopt' which should default to include preview. If this plug-in overrides it, a PR could take care of a corresponding option

Konfekt avatar Oct 28 '25 05:10 Konfekt

tried setting completeopt+=preview but it doesn't seem to work

813ethan avatar Oct 28 '25 13:10 813ethan

No chance due to

#  autoload/lsp/completion.vim (lines 687-692)
if opt.lspOptions.autoComplete
  if lspserver.completionLazyDoc
    setbufvar(bnr, '&completeopt', 'menuone,popuphidden,noinsert,noselect')
  else
    setbufvar(bnr, '&completeopt', 'menuone,popup,noinsert,noselect')
  endif

So a pull request for an analog for hoverInPreview is called for

Konfekt avatar Oct 28 '25 19:10 Konfekt

alright thanks, are there any plans for an implementation?

813ethan avatar Nov 02 '25 06:11 813ethan