plugin/lsp.vim | 3 ++- diff --git a/plugin/lsp.vim b/plugin/lsp.vim index cc9b42b450dcafad6fdf7b883e25c77766fc24ba..6bf0d1d44e3f3d240dfd349538d925830d92b7d7 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 @@ exe "normal! `[v`]:LspFormat\" 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, , )