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, , )