Using OmniSharp from new directory
This commit is contained in:
parent
ea8ef9c34a
commit
7eaafd7ff8
@ -176,7 +176,7 @@ if $omnisharp_completer; then
|
||||
fi
|
||||
|
||||
ycm_dir=`pwd`
|
||||
build_dir=$ycm_dir"/python/ycm/completers/cs/OmniSharpServer"
|
||||
build_dir=$ycm_dir"/third_party/OmniSharpServer"
|
||||
|
||||
cd $build_dir
|
||||
$buildcommand
|
||||
|
@ -39,6 +39,9 @@ FILE_TOO_SHORT_MESSAGE = (
|
||||
'File is less than {0} lines long; not parsing.'.format(
|
||||
MIN_LINES_IN_FILE_TO_PARSE ) )
|
||||
NO_DIAGNOSTIC_MESSAGE = 'No diagnostic for current line!'
|
||||
PATH_TO_OMNISHARP_BINARY = os.path.join(
|
||||
os.path.abspath( os.path.dirname( __file__ ) ),
|
||||
'../../../../third_party/OmniSharpServer/OmniSharp/bin/Debug/OmniSharp.exe' )
|
||||
|
||||
|
||||
#TODO: Handle this better than dummy classes
|
||||
@ -93,6 +96,10 @@ class CsharpCompleter( Completer ):
|
||||
self._max_diagnostics_to_display = user_options[
|
||||
'max_diagnostics_to_display' ]
|
||||
|
||||
if not os.path.isfile( PATH_TO_OMNISHARP_BINARY ):
|
||||
raise RuntimeError(
|
||||
SERVER_NOT_FOUND_MSG.format( PATH_TO_OMNISHARP_BINARY ) )
|
||||
|
||||
|
||||
def Shutdown( self ):
|
||||
if ( self.user_options[ 'auto_stop_csharp_server' ] and
|
||||
@ -232,18 +239,14 @@ class CsharpCompleter( Completer ):
|
||||
'Found multiple solution files instead of one!\n{0}'.format(
|
||||
solution_files ) )
|
||||
|
||||
omnisharp = os.path.join(
|
||||
os.path.abspath( os.path.dirname( __file__ ) ),
|
||||
'OmniSharpServer/OmniSharp/bin/Debug/OmniSharp.exe' )
|
||||
|
||||
if not os.path.isfile( omnisharp ):
|
||||
raise RuntimeError( SERVER_NOT_FOUND_MSG.format( omnisharp ) )
|
||||
|
||||
path_to_solutionfile = os.path.join( folder, solutionfile )
|
||||
# we need to pass the command to Popen as a string since we're passing
|
||||
# shell=True (as recommended by Python's doc)
|
||||
command = ( omnisharp + ' -p ' + str( self._omnisharp_port ) + ' -s ' +
|
||||
path_to_solutionfile )
|
||||
command = ' '.join( [ PATH_TO_OMNISHARP_BINARY,
|
||||
'-p',
|
||||
str( self._omnisharp_port ),
|
||||
'-s',
|
||||
path_to_solutionfile ] )
|
||||
|
||||
if not utils.OnWindows() and not utils.OnCygwin():
|
||||
command = 'mono ' + command
|
||||
|
Loading…
Reference in New Issue
Block a user