]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Improve signature popup window
authorGirish Palya <girishji@gmail.com>
Tue, 30 Jan 2024 19:57:51 +0000 (20:57 +0100)
committerGirish Palya <girishji@gmail.com>
Tue, 30 Jan 2024 19:57:51 +0000 (20:57 +0100)
Add 1 character padding to the sides of signature popup window.
Otherise, the leftmost character of popup looks like continuation of
line from underneath text in some colorschemes. A subtle improvemnt.

M  autoload/lsp/signature.vim

autoload/lsp/signature.vim

index 0b229b9a0d62f79bfd81cc04d4580b3f45ed9b85..59fbc0856a775c263bf7ed20dc221b0b142015bc 100644 (file)
@@ -109,7 +109,7 @@ export def SignatureHelp(lspserver: dict<any>, sighelp: any): void
     # Close the previous signature popup and open a new one
     lspserver.signaturePopup->popup_close()
 
-    var popupID = text->popup_atcursor({moved: [col('.') - 1, 9999999]})
+    var popupID = text->popup_atcursor({padding: [0, 1, 0, 1], moved: [col('.') - 1, 9999999]})
     var bnr: number = popupID->winbufnr()
     prop_type_add('signature', {bufnr: bnr, highlight: 'LspSigActiveParameter'})
     if hllen > 0