From 81973caf055f3a7056c2f1f72fc758e50bc18565 Mon Sep 17 00:00:00 2001 From: "Spencer G. Jones" Date: Wed, 26 Feb 2014 12:54:14 -0700 Subject: [PATCH] Call OmniSharpServer correctly in Cygwin Cygwin should not call OmniSharpServer with mono Update OmniSharpServer submodule for new client path mode parameter Pass client path mode to OmniSharpServer on run --- python/ycm/completers/cs/OmniSharpServer | 2 +- python/ycm/completers/cs/cs_completer.py | 5 ++++- python/ycm/utils.py | 4 ++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/python/ycm/completers/cs/OmniSharpServer b/python/ycm/completers/cs/OmniSharpServer index 53ea4d7f..c89ef98e 160000 --- a/python/ycm/completers/cs/OmniSharpServer +++ b/python/ycm/completers/cs/OmniSharpServer @@ -1 +1 @@ -Subproject commit 53ea4d7fb5190fa118ff36cdf1037644b4a2fc9f +Subproject commit c89ef98ed9182bbca40ce47f2e6ccd1cca91036d diff --git a/python/ycm/completers/cs/cs_completer.py b/python/ycm/completers/cs/cs_completer.py index 8092e47a..6fe6644b 100755 --- a/python/ycm/completers/cs/cs_completer.py +++ b/python/ycm/completers/cs/cs_completer.py @@ -150,9 +150,12 @@ class CsharpCompleter( Completer ): command = ( omnisharp + ' -p ' + str( self._omnisharp_port ) + ' -s ' + path_to_solutionfile ) - if not utils.OnWindows(): + if not utils.OnWindows() and not utils.OnCygwin(): command = 'mono ' + command + if utils.OnCygwin(): + command = command + ' --client-path-mode Cygwin' + filename_format = os.path.join( utils.PathToTempDir(), 'omnisharp_{port}_{sln}_{std}.log' ) diff --git a/python/ycm/utils.py b/python/ycm/utils.py index c6b82ea9..d9128716 100644 --- a/python/ycm/utils.py +++ b/python/ycm/utils.py @@ -171,6 +171,10 @@ def OnWindows(): return sys.platform == 'win32' +def OnCygwin(): + return sys.platform == 'cygwin' + + # From here: http://stackoverflow.com/a/8536476/1672783 def TerminateProcess( pid ): if OnWindows():