From: Yegappan Lakshmanan Date: Sun, 20 Nov 2022 23:20:01 +0000 (-0800) Subject: Adjust the symbol popup window attributes X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=bb1713981d22cd89ae710ee067c36acc81534096;p=vim-lsp.git Adjust the symbol popup window attributes --- diff --git a/autoload/lsp/symbol.vim b/autoload/lsp/symbol.vim index 5562d8a..b9a7579 100644 --- a/autoload/lsp/symbol.vim +++ b/autoload/lsp/symbol.vim @@ -252,6 +252,7 @@ def UpdatePeekFilePopup(lspserver: dict, refs: list>) maxwidth: winwidth(0) - 38, cursorline: true, border: [], + mapping: false, line: 'cursor+1', col: 1 } @@ -408,18 +409,21 @@ def PeekSymbolLocation(lspserver: dict, location: dict) # If the symbol popup window is already present, close it. lspserver.peekSymbolPopup->popup_close() endif - var ptitle = $"{fnamemodify(fname, ':t')} ({fnamemodify(fname, ':h')})" var CbFunc = function(SymbolFilterCB, [lspserver]) - lspserver.peekSymbolPopup = popup_atcursor(bnum, { - moved: 'any', - title: ptitle, - minwidth: 10, - maxwidth: 60, - minheight: 10, - maxheight: 10, - mapping: false, - wrap: false, - filter: CbFunc}) + var popupAttrs = { + title: $"{fnamemodify(fname, ':t')} ({fnamemodify(fname, ':h')})", + wrap: false, + moved: 'any', + minheight: 10, + maxheight: 10, + minwidth: 10, + maxwidth: 60, + cursorline: true, + border: [], + mapping: false, + filter: CbFunc + } + lspserver.peekSymbolPopup = popup_atcursor(bnum, popupAttrs) # Highlight the symbol name and center the line in the popup var pwid = lspserver.peekSymbolPopup