From 03a81bdb31190cc209c279f6aa66449a99686d82 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Thu, 31 Jan 2013 18:39:05 -0800 Subject: [PATCH] Fixing the ycm files The new Syntastic API was not correctly merged into these files. This commit should fix this. --- syntax_checkers/c/ycm.vim | 7 +++++++ syntax_checkers/cpp/ycm.vim | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/syntax_checkers/c/ycm.vim b/syntax_checkers/c/ycm.vim index 7772f68c..196de0ac 100644 --- a/syntax_checkers/c/ycm.vim +++ b/syntax_checkers/c/ycm.vim @@ -15,6 +15,10 @@ if exists("loaded_ycm_c_syntax_checker") endif let loaded_ycm_c_syntax_checker = 1 +function! SyntaxCheckers_c_ycm_IsAvailable() + return exists('g:loaded_youcompleteme') +endfunction + if !exists('g:loaded_youcompleteme') finish endif @@ -23,3 +27,6 @@ function! SyntaxCheckers_c_GetLocList() return youcompleteme#CurrentFileDiagnostics() endfunction +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'c', + \ 'name': 'ycm'}) diff --git a/syntax_checkers/cpp/ycm.vim b/syntax_checkers/cpp/ycm.vim index ee335aed..8d197b12 100644 --- a/syntax_checkers/cpp/ycm.vim +++ b/syntax_checkers/cpp/ycm.vim @@ -15,7 +15,7 @@ if exists("loaded_ycm_cpp_syntax_checker") endif let loaded_ycm_cpp_syntax_checker = 1 -function! SyntaxCheckers_objc_ycm_IsAvailable() +function! SyntaxCheckers_cpp_ycm_IsAvailable() return exists('g:loaded_youcompleteme') endfunction