From: Magnus Groß Date: Wed, 31 May 2023 22:51:38 +0000 (+0200) Subject: Unify completepopup settings X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=d6111e464e416bcbd0e3f145bbad599e2d5a62a3;p=vim-lsp.git Unify completepopup settings There is not really a reason to have different completepopup settings depending on if the LSP server supports lazy documentation or not: In both cases info may be displayed, the only difference being that with "resolveProvider" the info is to be fetched on demand. But for both scenarios the formatting of the info popup should be the same. This fixes a problem, where in the non-lazydoc branch the info popup is colored with the PmenuSel highlight group, which is a little bit ugly when the content is syntax highlighted as well. --- diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index 643ea99..fffc3e6 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -604,11 +604,10 @@ export def BufferInit(lspserver: dict, bnr: number, ftype: string) if opt.lspOptions.autoComplete if lspserver.completionLazyDoc setbufvar(bnr, '&completeopt', 'menuone,popuphidden,noinsert,noselect') - setbufvar(bnr, '&completepopup', 'width:80,highlight:Pmenu,align:item,border:off') else setbufvar(bnr, '&completeopt', 'menuone,popup,noinsert,noselect') - setbufvar(bnr, '&completepopup', 'border:off') endif + setbufvar(bnr, '&completepopup', 'width:80,highlight:Pmenu,align:item,border:off') # in insert mode stops completion and inserts a if !opt.lspOptions.noNewlineInCompletion :inoremap pumvisible() ? "\\" : "\"