Closed lasypig closed 7 years ago
我不能重现你说的问题,请附上完整的chromatica配置,以及测试代码。
昨天那行配置复制错了,我的配置如下:
"===========================
" chromatica
"===========================
let g:diminactive_buftype_blacklist = []
let g:chromatica#libclang_path='/usr/lib/llvm-3.9/lib'
let g:chromatica#enable_at_startup=1
let g:chromatica#highlight_feature_level=1
let g:chromatica#responsive_mode=0
测试代码如下:
/*
* ===========================================
*
* Filename: main.c
*
* Description: TODO: aaa
* TODO: bbb
*
* Version: 1.0
* Created: 11/03/2016 09:19:10 AM
* Revision: none
* Compiler: gcc
*
* Author: wangxb (), wangxb@hisome.com
* Organization:
*
* =============================================
*/
#include <stdlib.h>
/*
* === FUNCTION ===============================
* Name: main
* Description:
* =============================================
*/
int
main ( int argc, char *argv[] )
{
return EXIT_SUCCESS;
} /* ---------- end of function main ---------- */
let g:chromatica#highlight_feature_level=1
的时候cTodo不高亮是正常现象,因为cComment的高亮覆盖了cTodo。我计划解决这个问题,但是这几周事情比较多,没有太多时间来弄这个。
我暂时注释了函数_get_syntax_group
中的这两行:
elif token.kind.value == 4: # Comment
return "Comment"
来避免cComment覆盖cTodo,期待你的解决方案。
I have patched it. I turned off the cComment from chromatica and have the highlight of the comments (including cTodo) fallback to vim. cTodo should just work fine now
当 g:chromatica#responsive_mode=1时,注释中的TODO关键字只有当光标移动到该行时才会高亮,如下图: