variable for csharp server port added
This commit is contained in:
parent
6ec038870b
commit
bdd95ff43f
@ -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
|
||||
|
@ -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 """
|
||||
|
Loading…
Reference in New Issue
Block a user