Workspace symbol search using quickpick (#1035)

This commit is contained in:
Prabir Shrestha
2021-01-09 22:14:07 -08:00
committed by GitHub
parent bed4d52443
commit 3ed0e7aa31
3 changed files with 106 additions and 1 deletions

View File

@@ -106,6 +106,7 @@ command! LspTypeDefinition call lsp#ui#vim#type_definition(0, <q-mods>)
command! LspTypeHierarchy call lsp#internal#type_hierarchy#show()
command! LspPeekTypeDefinition call lsp#ui#vim#type_definition(1)
command! -nargs=? LspWorkspaceSymbol call lsp#ui#vim#workspace_symbol(<q-args>)
command! -nargs=? LspWorkspaceSymbolSearch call lsp#internal#workspace_symbol#search#do({'query': <q-args>})
command! -range LspDocumentFormat call lsp#internal#document_formatting#format({ 'bufnr': bufnr('%') })
command! -range -nargs=? LspDocumentFormatSync call lsp#internal#document_formatting#format(
\ extend({'bufnr': bufnr('%'), 'sync': 1 }, lsp#utils#args#_parse(<q-args>, {
@@ -159,6 +160,7 @@ nnoremap <plug>(lsp-type-definition) :<c-u>call lsp#ui#vim#type_definition(0)<cr
nnoremap <plug>(lsp-type-hierarchy) :<c-u>call lsp#internal#type_hierarchy#show()<cr>
nnoremap <plug>(lsp-peek-type-definition) :<c-u>call lsp#ui#vim#type_definition(1)<cr>
nnoremap <plug>(lsp-workspace-symbol) :<c-u>call lsp#ui#vim#workspace_symbol('')<cr>
nnoremap <plug>(lsp-workspace-symbol-search) :<c-u>call lsp#internal#workspace_symbol#search#do({})<cr>
nnoremap <plug>(lsp-document-format) :<c-u>call lsp#internal#document_formatting#format({ 'bufnr': bufnr('%') })<cr>
vnoremap <plug>(lsp-document-format) :<Home>silent <End>call lsp#internal#document_range_formatting#format({ 'bufnr': bufnr('%') })<cr>
nnoremap <plug>(lsp-document-range-format) :<c-u>set opfunc=lsp#internal#document_range_formatting#opfunc<cr>g@