autoload/lsp/callhierarchy.vim | 16 ++++++++-------- autoload/lsp/completion.vim | 2 +- autoload/lsp/diag.vim | 8 ++++---- autoload/lsp/hover.vim | 6 +++--- autoload/lsp/lsp.vim | 6 +++--- autoload/lsp/outline.vim | 4 ++-- autoload/lsp/signature.vim | 14 +++++++------- autoload/lsp/symbol.vim | 14 +++++++------- autoload/lsp/typehierarchy.vim | 2 +- autoload/lsp/util.vim | 2 +- diff --git a/autoload/lsp/callhierarchy.vim b/autoload/lsp/callhierarchy.vim index f0bce566f08f5e0cb689c91968b26199347afd73..6e57571d5a2b2d38545feb8b51799a2831b5e2d4 100644 --- a/autoload/lsp/callhierarchy.vim +++ b/autoload/lsp/callhierarchy.vim @@ -132,15 +132,15 @@ :setlocal noswapfile :setlocal nonumber nornu :setlocal fdc=0 signcolumn=no - nnoremap CallHierarchyItemJump() - nnoremap - CallHierarchyTreeItemOpen() - nnoremap + CallHierarchyTreeItemClose() - command -buffer LspCallHierarchyRefresh CallHierarchyTreeRefreshCmd() - command -buffer LspCallHierarchyIncoming CallHierarchyTreeIncomingCmd() - command -buffer LspCallHierarchyOutgoing CallHierarchyTreeOutgoingCmd() + :nnoremap CallHierarchyItemJump() + :nnoremap - CallHierarchyTreeItemOpen() + :nnoremap + CallHierarchyTreeItemClose() + :command -buffer LspCallHierarchyRefresh CallHierarchyTreeRefreshCmd() + :command -buffer LspCallHierarchyIncoming CallHierarchyTreeIncomingCmd() + :command -buffer LspCallHierarchyOutgoing CallHierarchyTreeOutgoingCmd() - syntax match Comment '^#.*$' - syntax match Directory '(.*)$' + :syntax match Comment '^#.*$' + :syntax match Directory '(.*)$' endif w:LspBufnr = save_bufnr diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index 84867338d97fb0b88173adb5e0ae42b60306f9ed..cb84cf0fb41336d4cc9a730055e34fd96b6e69d6 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -494,7 +494,7 @@ setbufvar(bnr, '&completepopup', 'border:off') endif # in insert mode stops completion and inserts a if !opt.lspOptions.noNewlineInCompletion - inoremap pumvisible() ? "\\" : "\" + :inoremap pumvisible() ? "\\" : "\" endif else if LspOmniComplEnabled(ftype) diff --git a/autoload/lsp/diag.vim b/autoload/lsp/diag.vim index b4c72e67cb34f211401eda853dadb2d27e48a54d..c0ebade53c61639e4792359f175e5bb0caea421f 100644 --- a/autoload/lsp/diag.vim +++ b/autoload/lsp/diag.vim @@ -123,7 +123,7 @@ ProcessNewDiags(lspserver, bnr) # Notify user scripts that diags has been updated if exists('#User#LspDiagsUpdated') - doautocmd User LspDiagsUpdated + :doautocmd User LspDiagsUpdated endif enddef @@ -276,7 +276,7 @@ # Display the diagnostic message in a popup window. ShowDiagInPopup(diag) else # Display the diagnostic message in the status message area - echo diag.message + :echo diag.message endif enddef @@ -307,9 +307,9 @@ if diag->has_key('code') code = $'[{diag.code}] ' endif var msgNoLineBreak = code .. substitute(substitute(diag.message, "\n", ' ', ''), "\\n", ' ', '') - echo msgNoLineBreak[ : max_width] + :echo msgNoLineBreak[ : max_width] else - echo '' + :echo '' endif enddef diff --git a/autoload/lsp/hover.vim b/autoload/lsp/hover.vim index fa7a5be103bd656f2e1666f384601158ad289e47..d429ffa0ec9313b19030dccdacb276b92610421a 100644 --- a/autoload/lsp/hover.vim +++ b/autoload/lsp/hover.vim @@ -64,15 +64,15 @@ return endif if opt.lspOptions.hoverInPreview - silent! pedit LspHoverReply - wincmd P + :silent! pedit LspHoverReply + :wincmd P :setlocal buftype=nofile :setlocal bufhidden=delete bufnr()->deletebufline(1, '$') hoverText->append(0) [1, 1]->cursor() exe $'setlocal ft={hoverKind}' - wincmd p + :wincmd p else var winid = hoverText->popup_atcursor({moved: 'word', maxwidth: 80, diff --git a/autoload/lsp/lsp.vim b/autoload/lsp/lsp.vim index c6fc4b23733b4b955bbdedc2658f3efc3f36caad..9347a031fe449d10affd5c29552cbdc252559b7f 100644 --- a/autoload/lsp/lsp.vim +++ b/autoload/lsp/lsp.vim @@ -765,7 +765,7 @@ return endif # clear the input prompt - echo "\r" + :echo "\r" endif lspserver.renameSymbol(newName) @@ -798,7 +798,7 @@ if query == '' return endif endif - redraw! + :redraw! lspserver.workspaceQuery(query) enddef @@ -810,7 +810,7 @@ if lspserver->empty() return endif - echomsg $'Workspace Folders: {lspserver.workspaceFolders->string()}' + :echomsg $'Workspace Folders: {lspserver.workspaceFolders->string()}' enddef # Add a workspace folder. Default is to use the current folder. diff --git a/autoload/lsp/outline.vim b/autoload/lsp/outline.vim index f36c2809286fa73869abf093063743719a59a7fc..266fc55db0daa7228ad7021b8614edc6444989de 100644 --- a/autoload/lsp/outline.vim +++ b/autoload/lsp/outline.vim @@ -255,8 +255,8 @@ :syntax keyword LSPTitle Constant String Number Boolean Array Object Key Null :syntax keyword LSPTitle EnumMember Struct Event Operator TypeParameter if str2nr(&t_Co) > 2 - highlight clear LSPTitle - highlight default link LSPTitle Title + :highlight clear LSPTitle + :highlight default link LSPTitle Title endif prop_type_add('LspOutlineHighlight', {bufnr: bufnr(), highlight: 'Search', override: true}) diff --git a/autoload/lsp/signature.vim b/autoload/lsp/signature.vim index 1d8f447efeaabc3c23cacb2bbc07a395427e6cc7..590718f88c357479799d2bd834828cf073ff7974 100644 --- a/autoload/lsp/signature.vim +++ b/autoload/lsp/signature.vim @@ -73,13 +73,13 @@ startcol = text->stridx(label) endif endif if opt.lspOptions.echoSignature - echon "\r\r" - echon '' - echon text->strpart(0, startcol) - echoh LineNr - echon text->strpart(startcol, hllen) - echoh None - echon text->strpart(startcol + hllen) + :echon "\r\r" + :echon '' + :echon text->strpart(0, startcol) + :echoh LineNr + :echon text->strpart(startcol, hllen) + :echoh None + :echon text->strpart(startcol + hllen) else # Close the previous signature popup and open a new one lspserver.signaturePopup->popup_close() diff --git a/autoload/lsp/symbol.vim b/autoload/lsp/symbol.vim index 74fed32a58e2fab0edc1b2aa610452960921fd1b..db0b590ebf7591c0d3a8e0b7503a6641b396825c 100644 --- a/autoload/lsp/symbol.vim +++ b/autoload/lsp/symbol.vim @@ -58,7 +58,7 @@ lspserver.workspaceQuery(query) else []->setwinvar(popupID, 'LspSymbolTable') endif - echo $'Symbol: {query}' + :echo $'Symbol: {query}' endif # Update the workspace symbol query string @@ -74,7 +74,7 @@ # Jump to the location of a symbol selected in the popup menu def JumpToWorkspaceSymbol(popupID: number, result: number): void # clear the message displayed at the command-line - echo '' + :echo '' if result <= 0 # popup is canceled @@ -114,7 +114,7 @@ endif endif # Set the previous cursor location mark. Instead of using setpos(), m' is # used so that the current location is added to the jump list. - normal m' + :normal m' setcursorcharpos(symTbl[result - 1].pos.line + 1, symTbl[result - 1].pos.character + 1) catch @@ -147,7 +147,7 @@ lspserver.workspaceSymbolQuery = query prop_type_add('lspworkspacesymbol', {bufnr: lspserver.workspaceSymbolPopup->winbufnr(), highlight: 'Title'}) - echo $'Symbol: {query}' + :echo $'Symbol: {query}' enddef # Convert a file name to () format. @@ -260,9 +260,9 @@ } lspserver.peekSymbolFilePopup = popup_create(bnr, popupAttrs) var cmds =<< trim eval END - setlocal number + :setlocal number [{range.start.line + 1}, 1]->cursor() - normal! z. + :normal! z. END win_execute(lspserver.peekSymbolFilePopup, cmds) @@ -441,7 +441,7 @@ pos->extend([start_col, end_col - start_col]) matchaddpos('Search', [pos], 10, 101, {window: pwid}) var cmds =<< trim eval END [{range.start.line + 1}, 1]->cursor() - normal! z. + :normal! z. END win_execute(pwid, cmds, 'silent!') enddef diff --git a/autoload/lsp/typehierarchy.vim b/autoload/lsp/typehierarchy.vim index d4048e67ca5599b5b2399fcce019f46e5b85a2ab..67c4965a6e51e2c51b45f216c4806b3580f38a66 100644 --- a/autoload/lsp/typehierarchy.vim +++ b/autoload/lsp/typehierarchy.vim @@ -87,7 +87,7 @@ } lspserver.typeHierFilePopup = popup_create(bnr, popupAttrs) var cmds =<< trim eval END [{typeUriMap[n].range.start.line + 1}, 1]->cursor() - normal! z. + :normal! z. END win_execute(lspserver.typeHierFilePopup, cmds) diff --git a/autoload/lsp/util.vim b/autoload/lsp/util.vim index 9343d4e0008d38f0d34fe3506786d094e59ed8bb..f9e73f6e9ab071cdd22108089dba6ed7ab735e4c 100644 --- a/autoload/lsp/util.vim +++ b/autoload/lsp/util.vim @@ -175,7 +175,7 @@ var bnr: number = fname->bufnr() if bnr == bufnr() # Set the previous cursor location mark. Instead of using setpos(), m' is # used so that the current location is added to the jump list. - normal m' + :normal m' else var wid = fname->bufwinid() if wid != -1