1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 22:20:06 +08:00

Fix c cpp highlight (#3561)

close #3558
This commit is contained in:
Wang Shidong 2020-05-30 23:01:37 +08:00 committed by GitHub
parent 0e368ab4bc
commit 2f87f1367f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,11 @@
let s:clang_executable = 'clang'
if exists('s:clang_executable')
finish
else
let s:clang_executable = 'clang'
endif
let s:SYSTEM = SpaceVim#api#import('system')
let s:CPT = SpaceVim#api#import('vim#compatible')
@ -129,11 +133,15 @@ function! SpaceVim#layers#lang#c#config() abort
augroup SpaceVim_lang_c
autocmd!
if s:enable_clang_syntax
if has('nvim') && SpaceVim#util#haspy3lib('clang')
auto FileType c,cpp ChromaticaStart
" else Clamp will start when detect c, cpp file
elseif !has('job')
" Clighter8 will start when detect c, cpp file
if has('nvim')
if s:CPT.has('python3') && SpaceVim#util#haspy3lib('clang')
auto FileType c,cpp ChromaticaStart
else
auto FileType c,cpp ClampStart
endif
elseif has('job')
auto FileType c,cpp ClStart
else
auto FileType c,cpp ClighterEnable
endif
endif