Merge pull request #500 from svermeulen/OmnisharpAutoStopOption

Added option to control whether YCM should auto-stop the omnisharp server upon leaving Vim or leave it running.
This commit is contained in:
Val Markovic 2013-08-12 19:53:22 -07:00
commit 029c4a6350
3 changed files with 13 additions and 1 deletions

View File

@ -850,6 +850,15 @@ Default: `1`
let g:ycm_auto_start_csharp_server = 1 let g:ycm_auto_start_csharp_server = 1
### The `g:ycm_auto_stop_csharp_server` option
When set to `1`, the OmniSharp server will be automatically stopped upon
closing vim.
Default: `1`
let g:ycm_auto_stop_csharp_server = 1
### The `g:ycm_add_preview_to_completeopt` option ### The `g:ycm_add_preview_to_completeopt` option
When this option is set to `1`, YCM will add the `preview` string to Vim's When this option is set to `1`, YCM will add the `preview` string to Vim's

View File

@ -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', 1 ) \ 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 = let g:ycm_csharp_server_port =
\ get( g:, 'ycm_csharp_server_port', 2000 ) \ get( g:, 'ycm_csharp_server_port', 2000 )

View File

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