Browse Source

Added option to control whether YCM should auto-stop the omnisharp server upon leaving Vim or leave it running.

svermeulen 11 years ago
parent
commit
65bca8b56a
2 changed files with 4 additions and 1 deletions
  1. 3 0
      plugin/youcompleteme.vim
  2. 1 1
      python/ycm/completers/cs/cs_completer.py

+ 3 - 0
plugin/youcompleteme.vim

@@ -154,6 +154,9 @@ let g:ycm_cache_omnifunc =
 let g:ycm_auto_start_csharp_server =
       \ get( g:, 'ycm_auto_start_csharp_server', 1 )
 
+let g:ycm_auto_stop_csharp_server =
+            \ get( g:, 'ycm_auto_stop_csharp_server', 1 )
+
 let g:ycm_csharp_server_port =
       \ get( g:, 'ycm_csharp_server_port', 2000 )
 

+ 1 - 1
python/ycm/completers/cs/cs_completer.py

@@ -50,7 +50,7 @@ class CsharpCompleter( ThreadedCompleter ):
 
 
   def OnVimLeave( self ):
-    if self._ServerIsRunning():
+    if vimsupport.GetBoolValue( 'g:ycm_auto_stop_csharp_server' ) and self._ServerIsRunning():
       self._StopServer()