diff --git a/plugin/youcompleteme.vim b/plugin/youcompleteme.vim index 35cd0208..70c5e33d 100644 --- a/plugin/youcompleteme.vim +++ b/plugin/youcompleteme.vim @@ -154,7 +154,7 @@ 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 = +let g:ycm_csharp_server_port = \ get( g:, 'ycm_csharp_server_port', 2000 ) " On-demand loading. Let's use the autoload folder and not slow down vim's diff --git a/python/ycm/completers/cs/cs_completer.py b/python/ycm/completers/cs/cs_completer.py index 05da2c61..fbc1c230 100755 --- a/python/ycm/completers/cs/cs_completer.py +++ b/python/ycm/completers/cs/cs_completer.py @@ -43,7 +43,8 @@ class CsharpCompleter( ThreadedCompleter ): self._StartServer() def OnVimLeave( self ): - self._StopServer() + if self._ServerIsRunning(): + self._StopServer() def SupportedFiletypes( self ): """ Just csharp """ @@ -116,7 +117,7 @@ class CsharpCompleter( ThreadedCompleter ): def _ServerIsRunning( self ): """ Check if the OmniSharp server is running """ - return self._GetResponse( '/poke', silent=True ) != None + return self._GetResponse( '/checkalivestatus', silent=True ) != None def _GetCompletions( self ): """ Ask server for completions """