Option to disable YCM-Syntastic integration

Fixes #210.
This commit is contained in:
Strahinja Val Markovic 2013-03-25 19:47:26 -07:00
parent b4837c81fe
commit bc4e7fb850
3 changed files with 23 additions and 1 deletions

View File

@ -575,6 +575,22 @@ Default: `{}`
let g:ycm_filetype_specific_completion_to_disable = {} let g:ycm_filetype_specific_completion_to_disable = {}
### The `g:ycm_register_as_syntastic_checker` option
When set, this option makes YCM register itself as the Syntastic checker for the
`c`, `cpp`, `objc` and `objcpp` filetypes. This enables the YCM-Syntastic
integration.
If you're using YCM's identifier completer in C-family languages but cannot use
the clang-based semantic completer for those languages _and_ want to use the GCC
Syntastic checkers, unset this option.
Don't unset this option unless you're sure you know what you're doing.
Default: `1`
let g:ycm_register_as_syntastic_checker = 1
### The `g:ycm_allow_changing_updatetime` option ### The `g:ycm_allow_changing_updatetime` option
When this option is set to `1`, YCM will change the `updatetime` Vim option to When this option is set to `1`, YCM will change the `updatetime` Vim option to

View File

@ -69,7 +69,10 @@ function! youcompleteme#Enable()
call s:SetUpCompleteopt() call s:SetUpCompleteopt()
call s:SetUpKeyMappings() call s:SetUpKeyMappings()
if g:ycm_register_as_syntastic_checker
call s:ForceSyntasticCFamilyChecker() call s:ForceSyntasticCFamilyChecker()
endif
if g:ycm_allow_changing_updatetime if g:ycm_allow_changing_updatetime
set ut=2000 set ut=2000

View File

@ -76,6 +76,9 @@ let g:ycm_filetype_blacklist =
let g:ycm_filetype_specific_completion_to_disable = let g:ycm_filetype_specific_completion_to_disable =
\ get( g:, 'ycm_filetype_specific_completion_to_disable', {} ) \ get( g:, 'ycm_filetype_specific_completion_to_disable', {} )
let g:ycm_register_as_syntastic_checker =
\ get( g:, 'ycm_register_as_syntastic_checker', 1 )
let g:ycm_allow_changing_updatetime = let g:ycm_allow_changing_updatetime =
\ get( g:, 'ycm_allow_changing_updatetime', 1 ) \ get( g:, 'ycm_allow_changing_updatetime', 1 )