Permalink
Browse files

Option to disable YCM-Syntastic integration

Fixes #210.
  • Loading branch information...
1 parent b4837c8 commit bc4e7fb8507982d014ecf825ce3c523fe007b043 @Valloric committed Mar 26, 2013
Showing with 23 additions and 1 deletion.
  1. +16 −0 README.md
  2. +4 −1 autoload/youcompleteme.vim
  3. +3 −0 plugin/youcompleteme.vim
View
@@ -575,6 +575,22 @@ Default: `{}`
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
When this option is set to `1`, YCM will change the `updatetime` Vim option to
@@ -69,7 +69,10 @@ function! youcompleteme#Enable()
call s:SetUpCompleteopt()
call s:SetUpKeyMappings()
- call s:ForceSyntasticCFamilyChecker()
+
+ if g:ycm_register_as_syntastic_checker
+ call s:ForceSyntasticCFamilyChecker()
+ endif
if g:ycm_allow_changing_updatetime
set ut=2000
@@ -76,6 +76,9 @@ let g:ycm_filetype_blacklist =
let 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 =
\ get( g:, 'ycm_allow_changing_updatetime', 1 )

0 comments on commit bc4e7fb

Please sign in to comment.