From: Enno Date: Fri, 15 Nov 2024 18:29:23 +0000 (+0100) Subject: export function (#561) X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=c6bd0ec6206c02f0a08b376b1d24a37707de56fb;p=vim-lsp.git export function (#561) --- diff --git a/plugin/lsp.vim b/plugin/lsp.vim index cc9b42b..6bf0d1d 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, , )