autoload/lsp.vim | 10 +++++----- plugin/lsp.vim | 2 +- diff --git a/autoload/lsp.vim b/autoload/lsp.vim index 044504dbb5566d84ea5e199aa5638308eaa65395..a738bcd442bec9241af596b391ddd16be9299bce 100644 --- a/autoload/lsp.vim +++ b/autoload/lsp.vim @@ -640,7 +640,7 @@ lspserver.codeAction(fname) enddef # Handle keys pressed when the workspace symbol popup menu is displayed -def LspFilterNames(lspserver: dict, popupID: number, key: string): bool +def s:filterSymbols(lspserver: dict, popupID: number, key: string): bool var key_handled: bool = false var update_popup: bool = false var query: string = lspserver.workspaceSymbolQuery @@ -699,7 +699,7 @@ return popupID->popup_filter_menu(key) enddef # Jump to the location of a symbol selected in the popup menu -def LspJumpToSymbol(popupID: number, result: number): void +def s:jumpToSymbol(popupID: number, result: number): void # clear the message displayed at the command-line echo '' @@ -749,8 +749,8 @@ maxwidth: 60, mapping: false, fixed: 1, close: "button", - filter: function('s:LspFilterNames', [lspserver]), - callback: LspJumpToSymbol + filter: function('s:filterSymbols', [lspserver]), + callback: function('s:jumpToSymbol') } lspserver.workspaceSymbolPopup = popup_menu([], popupAttr) lspserver.workspaceSymbolQuery = query @@ -762,7 +762,7 @@ enddef # Perform a workspace wide symbol lookup # Uses LSP "workspace/symbol" request -def lsp#showWorkspaceSymbols(queryArg: string) +def lsp#symbolSearch(queryArg: string) var ftype = &filetype if ftype == '' return diff --git a/plugin/lsp.vim b/plugin/lsp.vim index 3f797094f36f18878f323e3234afee8e6727a760..f2e396f290f6529bc97ff377ffe8084e2712086d 100644 --- a/plugin/lsp.vim +++ b/plugin/lsp.vim @@ -35,7 +35,7 @@ command! -nargs=0 -bar LspCalledBy call lsp#incomingCalls() command! -nargs=0 -bar LspCalling call lsp#outgoingCalls() command! -nargs=0 -bar LspRename call lsp#rename() command! -nargs=0 -bar LspCodeAction call lsp#codeAction() -command! -nargs=? -bar LspShowWorkspaceSymbols call lsp#showWorkspaceSymbols() +command! -nargs=? -bar LspSymbolSearch call lsp#symbolSearch() command! -nargs=0 -bar LspWorkspaceListFolders call lsp#listWorkspaceFolders() command! -nargs=1 -bar -complete=dir LspWorkspaceAddFolder call lsp#addWorkspaceFolder() command! -nargs=1 -bar -complete=dir LspWorkspaceRemoveFolder call lsp#removeWorkspaceFolder()