You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let g:OmniSharp_start_server = 0
let g:OmniSharp_selector_ui = ''
Have 2 solutions Foo.sln and Bar.sln for a given Foo.cs file in some csproj
Analysis:
At the time of writing, the ftplugin file has the functions OmniSharp#actions#highlight#Buffer and OmniSharp#actions#buffer#Update run whenever cursor goes into/leaves from a *.cs buffer, and also on some other events.
On each of the events, these functions all call OmniSharp#GetHost(...) (from OmniSharp#stdio#Request).
OmniSharp#GetHost(...) then calls OmniSharp#FindSolutionOrDir which ends up prompting the following message:
Solution:
1. some\path\to\Foo.sln
2. some\path\to\Bar.sln
Type number and <Enter> or click with the mouse (q or empty cancels):
hence the prompt being spammed and blocking the UI
Additional information:
I have successfully got rid of the issue by adding if OmniSharp#IsAnyServerRunning() before calling OmniSharp#actions#highlight#Buffer and OmniSharp#actions#buffer#Update in the ftplugin file, but wasn't too sure if this was the way to go for fixing this behaviour
the issue also happens from sharpenup when the function sharpenup#codeactions#Count() calls OmniSharp#actions#codeactions#Count(opts) ; adding if OmniSharp#IsAnyServerRunning() before the call does the trick.
adding if !OmniSharp#IsAnyServerRunning() | return | endif inside OmniSharp#stdio#Request(command, opts) is another solution that works, but probably has implications on the performance side of things.
The text was updated successfully, but these errors were encountered:
In order to reproduce:
Have 2 solutions
Foo.sln
andBar.sln
for a givenFoo.cs
file in some csprojAnalysis:
At the time of writing, the ftplugin file has the functions
OmniSharp#actions#highlight#Buffer
andOmniSharp#actions#buffer#Update
run whenever cursor goes into/leaves from a*.cs
buffer, and also on some other events.On each of the events, these functions all call
OmniSharp#GetHost(...)
(fromOmniSharp#stdio#Request
).OmniSharp#GetHost(...)
then callsOmniSharp#FindSolutionOrDir
which ends up prompting the following message:hence the prompt being spammed and blocking the UI
Additional information:
if OmniSharp#IsAnyServerRunning()
before callingOmniSharp#actions#highlight#Buffer
andOmniSharp#actions#buffer#Update
in the ftplugin file, but wasn't too sure if this was the way to go for fixing this behavioursharpenup#codeactions#Count()
callsOmniSharp#actions#codeactions#Count(opts)
; addingif OmniSharp#IsAnyServerRunning()
before the call does the trick.if !OmniSharp#IsAnyServerRunning() | return | endif
insideOmniSharp#stdio#Request(command, opts)
is another solution that works, but probably has implications on the performance side of things.The text was updated successfully, but these errors were encountered: