bbchung / clighter8

VIM C++ semantic syntax highlight plugin
GNU General Public License v3.0
48 stars 3 forks source link

Clighter8: Vim C++ syntax highlight plugin by libclang

Intro

Clighter8 is a server-client Vim syntax highlight plugin, provides following features:

Requirements

Clighter8 requires the following things:

Installation

Use a plugin manager, for example

Usage

Clighter8 provides following commands.

ClStart

Start Clighter8, highlight the code.

ClStop

Stop Clighter8.

ClRestart

Restart Clighter8.

ClShowCursorInfo

Show cursor informations from libclang. It's useful when debugging.

ClShowCompileInfo

Show compiler args of current buffer.

ClEnableLog

Enable log, the path of log file is '/tmp/clighter8.log'.

ClDisableLog

Disable log.

ClLoadCdb (Experimental)

It will start clighter8 and open source files described in compilation database and all referenced header files under current working folder of Vim. Notice that it may take long time if the compilation database is big.

Compilation Database

Clighter8 supports compilation database, and it will load the compilation database in the current working directory. It's strongly recommended to provide a compilation database for Clighter8 to get the better result of syntax highlight. For more information about compilation database, please reference Compilation Database.

FAQ

Highlight feature doesn't work?

Check the Requirements and Installation, and check if a valid libclang path is given, also, you can check /tmp/clighter8.log. Remember to set g:clighter8_global_compile_args or provide the compilation database to get the better highlight result.

How to set compile args?

Clighter8 sets the compile args for each file with (g:clighter8_global_compile_args + "compilation database"). Compile args will affect the correctness of highlight.

LICENSE

This software is licensed under the GPL v3 license.

Note: This license does not cover the files that come from the LLVM or other third party libraries.