From c6bd0ec6206c02f0a08b376b1d24a37707de56fb Mon Sep 17 00:00:00 2001 From: Enno Date: Fri, 15 Nov 2024 19:29:23 +0100 Subject: [PATCH] export function (#561) --- plugin/lsp.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/lsp.vim b/plugin/lsp.vim index cc9b42b4..6bf0d1d4 100644 --- a/plugin/lsp.vim +++ b/plugin/lsp.vim @@ -76,7 +76,7 @@ command! -nargs=0 -bar LspDocumentSymbol lsp.ShowDocSymbols() command! -nargs=0 -bar LspFold lsp.FoldDocument() command! -nargs=0 -bar -range=% LspFormat lsp.TextDocFormat(, , ) -def LspFormatFunc(type: string, visual_mode = v:false) +export def LspFormatFunc(type: string, visual_mode = v:false) if visual_mode exe "normal! gv:LspFormat\" elseif type ==# 'line' @@ -86,6 +86,7 @@ def LspFormatFunc(type: string, visual_mode = v:false) endif enddef nnoremap (LspFormat) set operatorfunc=LspFormatFuncg@ +xnoremap (LspFormat) LspFormat command! -nargs=0 -bar -count LspGotoDeclaration lsp.GotoDeclaration(v:false, , ) command! -nargs=0 -bar -count LspGotoDefinition lsp.GotoDefinition(v:false, , )