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 =
|
let g:ycm_auto_start_csharp_server =
|
||||||
\ get( g:, 'ycm_auto_start_csharp_server', 0 )
|
\ 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
|
" On-demand loading. Let's use the autoload folder and not slow down vim's
|
||||||
" startup procedure.
|
" startup procedure.
|
||||||
augroup youcompletemeStart
|
augroup youcompletemeStart
|
||||||
|
@ -37,13 +37,13 @@ class CsharpCompleter( ThreadedCompleter ):
|
|||||||
|
|
||||||
def __init__( self ):
|
def __init__( self ):
|
||||||
super( CsharpCompleter, self ).__init__()
|
super( CsharpCompleter, self ).__init__()
|
||||||
self.OmniSharpPort = 2000
|
self.OmniSharpPort = int( vimsupport.GetVariableValue( "g:ycm_csharp_server_port" ) )
|
||||||
self.OmniSharpHost = 'http://localhost:' + str( self.OmniSharpPort )
|
self.OmniSharpHost = 'http://localhost:' + str( self.OmniSharpPort )
|
||||||
if vimsupport.GetBoolValue( "g:ycm_auto_start_csharp_server" ):
|
if vimsupport.GetBoolValue( "g:ycm_auto_start_csharp_server" ):
|
||||||
self._StartServer()
|
self._StartServer()
|
||||||
|
|
||||||
#def OnVimLeave( self ):
|
def OnVimLeave( self ):
|
||||||
#self._StopServer()
|
self._StopServer()
|
||||||
|
|
||||||
def SupportedFiletypes( self ):
|
def SupportedFiletypes( self ):
|
||||||
""" Just csharp """
|
""" Just csharp """
|
||||||
@ -111,7 +111,7 @@ class CsharpCompleter( ThreadedCompleter ):
|
|||||||
|
|
||||||
def _StopServer( self ):
|
def _StopServer( self ):
|
||||||
""" Stop the OmniSharp server """
|
""" Stop the OmniSharp server """
|
||||||
self._GetResponse( '/stopserver' ) # Should only stop when server running
|
self._GetResponse( '/stopserver' )
|
||||||
|
|
||||||
def _ServerIsRunning( self ):
|
def _ServerIsRunning( self ):
|
||||||
""" Check if the OmniSharp server is running """
|
""" Check if the OmniSharp server is running """
|
||||||
|
Loading…
Reference in New Issue
Block a user