From 915aeb18e217993d56d2af0eac1e7242695c18d4 Mon Sep 17 00:00:00 2001 From: Eric Nelson Date: Fri, 24 Dec 2021 00:02:47 -0800 Subject: [PATCH] Start OmniSharp server after user selects solution when there are multiple --- autoload/OmniSharp.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autoload/OmniSharp.vim b/autoload/OmniSharp.vim index 3eff7e28b..9459c7e6e 100644 --- a/autoload/OmniSharp.vim +++ b/autoload/OmniSharp.vim @@ -19,6 +19,10 @@ function! OmniSharp#GetHost(...) abort if get(host, 'sln_or_dir', '') ==# '' let host.sln_or_dir = OmniSharp#FindSolutionOrDir(1, bufnr) let host.initialized = 0 + let job = OmniSharp#proc#GetJob(host.sln_or_dir) + if type(job) != type({}) + call OmniSharp#StartServer(host.sln_or_dir) + endif call setbufvar(bufnr, 'OmniSharp_host', host) endif " The returned dict includes the job, but the job is _not_ part of