File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,12 @@ function! OmniSharp#Complete(findstart, base) abort
57
57
endfunction
58
58
59
59
60
+ function ! OmniSharp#CompleteRunningSln (arglead, cmdline, cursorpos) abort
61
+ let jobs = OmniSharp#proc#ListRunningJobs ()
62
+ return filter (jobs, {_,job - > job = ~? a: arglead })
63
+ endfunction
64
+
65
+
60
66
function ! OmniSharp#IsAnyServerRunning () abort
61
67
return ! empty (OmniSharp#proc#ListRunningJobs ())
62
68
endfunction
@@ -208,7 +214,7 @@ endfunction
208
214
209
215
function ! OmniSharp#StopServer (... ) abort
210
216
let force = a: 0 ? a: 1 : 0
211
- let sln_or_dir = a: 0 > 1 ? a: 2 : OmniSharp#FindSolutionOrDir ()
217
+ let sln_or_dir = a: 0 > 1 && len ( a: 2 ) > 0 ? a: 2 : OmniSharp#FindSolutionOrDir ()
212
218
if force || OmniSharp#proc#IsJobRunning (sln_or_dir)
213
219
if ! g: OmniSharp_server_stdio
214
220
call OmniSharp#py#Uncache (sln_or_dir)
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ command! -buffer -bar OmniSharpRestartAllServers call OmniSharp#RestartAllServer
24
24
command ! - buffer - bar OmniSharpRestartServer call OmniSharp#RestartServer ()
25
25
command ! - buffer - bar -nargs =? -complete =file OmniSharpStartServer call OmniSharp#StartServer (<q-args> )
26
26
command ! - buffer - bar OmniSharpStopAllServers call OmniSharp#StopAllServers ()
27
- command ! - buffer - bar OmniSharpStopServer call OmniSharp#StopServer ()
27
+ command ! - buffer - bar - nargs =? - bang - complete = customlist ,OmniSharp#CompleteRunningSln OmniSharpStopServer call OmniSharp#StopServer (<bang> 0 , <q-args> )
28
28
29
29
command ! - buffer - bar OmniSharpCodeFormat call OmniSharp#actions#format#Format ()
30
30
command ! - buffer - bar OmniSharpDocumentation call OmniSharp#actions#documentation#Documentation ()
You can’t perform that action at this time.
0 commit comments