File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ function! lsp#ui#vim#document_range_format_opfunc(type) abort
253
253
return s: document_format_range (1 , a: type )
254
254
endfunction
255
255
256
- function ! lsp#ui#vim#workspace_symbol () abort
256
+ function ! lsp#ui#vim#workspace_symbol (query ) abort
257
257
let l: servers = filter (lsp#get_allowed_servers (), ' lsp#capabilities#has_workspace_symbol_provider(v:val)' )
258
258
let l: command_id = lsp#_new_command ()
259
259
@@ -262,9 +262,13 @@ function! lsp#ui#vim#workspace_symbol() abort
262
262
return
263
263
endif
264
264
265
- let l: query = inputdialog (' query>' , ' ' , " \<ESC> " )
266
- if l: query == # " \<ESC> "
267
- return
265
+ if ! empty (a: query )
266
+ let l: query = a: query
267
+ else
268
+ let l: query = inputdialog (' query>' , ' ' , " \<ESC> " )
269
+ if l: query == # " \<ESC> "
270
+ return
271
+ endif
268
272
endif
269
273
270
274
for l: server in l: servers
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ command! LspRename call lsp#ui#vim#rename()
93
93
command ! LspTypeDefinition call lsp#ui#vim#type_definition (0 , <q-mods> )
94
94
command ! LspTypeHierarchy call lsp#internal#type_hierarchy#show ()
95
95
command ! LspPeekTypeDefinition call lsp#ui#vim#type_definition (1 )
96
- command ! LspWorkspaceSymbol call lsp#ui#vim#workspace_symbol ()
96
+ command ! - nargs =? LspWorkspaceSymbol call lsp#ui#vim#workspace_symbol (<q-args> )
97
97
command ! - range LspDocumentFormat call lsp#ui#vim#document_format ()
98
98
command ! - range LspDocumentFormatSync call lsp#ui#vim#document_format_sync ()
99
99
command ! - range LspDocumentRangeFormat call lsp#ui#vim#document_range_format ()
You can’t perform that action at this time.
0 commit comments