From 642572130cae758411bfb617241717a75cb5cfa4 Mon Sep 17 00:00:00 2001 From: Hinidu Date: Thu, 18 Jul 2013 13:35:46 +0300 Subject: [PATCH 1/2] Add mono to command for non-windows systems --- python/ycm/completers/cs/cs_completer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/ycm/completers/cs/cs_completer.py b/python/ycm/completers/cs/cs_completer.py index 39d8f0a1..57dc073c 100755 --- a/python/ycm/completers/cs/cs_completer.py +++ b/python/ycm/completers/cs/cs_completer.py @@ -20,6 +20,7 @@ import vim import os +from sys import platform import glob from ycm.completers.threaded_completer import ThreadedCompleter from ycm import vimsupport @@ -121,6 +122,9 @@ class CsharpCompleter( ThreadedCompleter ): vimsupport.PostVimMessage( SERVER_NOT_FOUND_MSG.format( omnisharp ) ) return + if not platform.startswith('win'): + omnisharp = "mono " + omnisharp + solutionfile = os.path.join( folder, solutionfile ) # command has to be provided as one string for some reason command = [ omnisharp + ' -p ' + str( self._omnisharp_port ) + ' -s ' + From e6183d640261b698d993647004a43507d1e9cbd4 Mon Sep 17 00:00:00 2001 From: Hinidu Date: Thu, 18 Jul 2013 18:18:17 +0300 Subject: [PATCH 2/2] Fix code style --- python/ycm/completers/cs/cs_completer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ycm/completers/cs/cs_completer.py b/python/ycm/completers/cs/cs_completer.py index 57dc073c..3570998c 100755 --- a/python/ycm/completers/cs/cs_completer.py +++ b/python/ycm/completers/cs/cs_completer.py @@ -122,7 +122,7 @@ class CsharpCompleter( ThreadedCompleter ): vimsupport.PostVimMessage( SERVER_NOT_FOUND_MSG.format( omnisharp ) ) return - if not platform.startswith('win'): + if not platform.startswith( 'win' ): omnisharp = "mono " + omnisharp solutionfile = os.path.join( folder, solutionfile )