:setlocal nonumber nornu
:setlocal fdc=0 signcolumn=no
- nnoremap <buffer> <CR> <ScriptCmd>CallHierarchyItemJump()<CR>
- nnoremap <buffer> - <ScriptCmd>CallHierarchyTreeItemOpen()<CR>
- nnoremap <buffer> + <ScriptCmd>CallHierarchyTreeItemClose()<CR>
- command -buffer LspCallHierarchyRefresh CallHierarchyTreeRefreshCmd()
- command -buffer LspCallHierarchyIncoming CallHierarchyTreeIncomingCmd()
- command -buffer LspCallHierarchyOutgoing CallHierarchyTreeOutgoingCmd()
-
- syntax match Comment '^#.*$'
- syntax match Directory '(.*)$'
+ :nnoremap <buffer> <CR> <ScriptCmd>CallHierarchyItemJump()<CR>
+ :nnoremap <buffer> - <ScriptCmd>CallHierarchyTreeItemOpen()<CR>
+ :nnoremap <buffer> + <ScriptCmd>CallHierarchyTreeItemClose()<CR>
+ :command -buffer LspCallHierarchyRefresh CallHierarchyTreeRefreshCmd()
+ :command -buffer LspCallHierarchyIncoming CallHierarchyTreeIncomingCmd()
+ :command -buffer LspCallHierarchyOutgoing CallHierarchyTreeOutgoingCmd()
+
+ :syntax match Comment '^#.*$'
+ :syntax match Directory '(.*)$'
endif
w:LspBufnr = save_bufnr
endif
# <Enter> in insert mode stops completion and inserts a <Enter>
if !opt.lspOptions.noNewlineInCompletion
- inoremap <expr> <buffer> <CR> pumvisible() ? "\<C-Y>\<CR>" : "\<CR>"
+ :inoremap <expr> <buffer> <CR> pumvisible() ? "\<C-Y>\<CR>" : "\<CR>"
endif
else
if LspOmniComplEnabled(ftype)
# Notify user scripts that diags has been updated
if exists('#User#LspDiagsUpdated')
- doautocmd <nomodeline> User LspDiagsUpdated
+ :doautocmd <nomodeline> User LspDiagsUpdated
endif
enddef
ShowDiagInPopup(diag)
else
# Display the diagnostic message in the status message area
- echo diag.message
+ :echo diag.message
endif
enddef
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
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,
endif
# clear the input prompt
- echo "\r"
+ :echo "\r"
endif
lspserver.renameSymbol(newName)
return
endif
endif
- redraw!
+ :redraw!
lspserver.workspaceQuery(query)
enddef
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.
: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})
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()
else
[]->setwinvar(popupID, 'LspSymbolTable')
endif
- echo $'Symbol: {query}'
+ :echo $'Symbol: {query}'
endif
# Update the workspace symbol query string
# 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
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
prop_type_add('lspworkspacesymbol',
{bufnr: lspserver.workspaceSymbolPopup->winbufnr(),
highlight: 'Title'})
- echo $'Symbol: {query}'
+ :echo $'Symbol: {query}'
enddef
# Convert a file name to <filename> (<dirname>) format.
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)
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
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)
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