From bb1713981d22cd89ae710ee067c36acc81534096 Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Sun, 20 Nov 2022 15:20:01 -0800 Subject: [PATCH] Adjust the symbol popup window attributes --- autoload/lsp/symbol.vim | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) 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 -- 2.48.1