variable for csharp server port added

This commit is contained in:
Chiel92 2013-07-08 11:39:17 +02:00
parent 6ec038870b
commit bdd95ff43f
2 changed files with 7 additions and 4 deletions

View File

@ -154,6 +154,9 @@ let g:ycm_cache_omnifunc =
let g:ycm_auto_start_csharp_server =
\ get( g:, 'ycm_auto_start_csharp_server', 0 )
let g:ycm_auto_start_csharp_server =
\ get( g:, 'ycm_csharp_server_port', 2000 )
" On-demand loading. Let's use the autoload folder and not slow down vim's
" startup procedure.
augroup youcompletemeStart

View File

@ -37,13 +37,13 @@ class CsharpCompleter( ThreadedCompleter ):
def __init__( self ):
super( CsharpCompleter, self ).__init__()
self.OmniSharpPort = 2000
self.OmniSharpPort = int( vimsupport.GetVariableValue( "g:ycm_csharp_server_port" ) )
self.OmniSharpHost = 'http://localhost:' + str( self.OmniSharpPort )
if vimsupport.GetBoolValue( "g:ycm_auto_start_csharp_server" ):
self._StartServer()
#def OnVimLeave( self ):
#self._StopServer()
def OnVimLeave( self ):
self._StopServer()
def SupportedFiletypes( self ):
""" Just csharp """
@ -111,7 +111,7 @@ class CsharpCompleter( ThreadedCompleter ):
def _StopServer( self ):
""" Stop the OmniSharp server """
self._GetResponse( '/stopserver' ) # Should only stop when server running
self._GetResponse( '/stopserver' )
def _ServerIsRunning( self ):
""" Check if the OmniSharp server is running """