Skip to content

styxyang/clang-faces

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# clang-faces

Intelligent syntax higlighting through libclang w/emacs!

Quick Install

  • Clone the repository

    mkdir build; cd build cmake .. make

Emacs Setup

(setq clang-faces-client-exec "~/path/clang-faces/build/emacs-clang-syntaxhl")
(add-to-list 'c-mode-common-hook #'(lambda () (clang-faces-mode t)))

or enable/disable manually with:

M-x clang-faces-mode

How It Works

It works together w/the font-lock infrastructure, mimicing [most of] its faces with syntax highlighting enhancements to statement-level syntax that font-lock cannot (at least that I'm aware of) parse and colorize.

The primary difference is that references to variables and functions throughout the code (not just the declaration) are syntax higlighted.

It operates through a separate daemon process that constantly reparses the source code and updates the modified (delta) regions' `font-lock-face' attributes.

Contribute

Your feedback is greatly appreciated. The current state of clang-faces is alpha and there are issues related to recoloring (you might get rainbows of colors across one identifier). If you can contribute a minimum test case, or better a pull request w/a test case, I will add your name to the contributors list and you will be overcome with pride and great satisfication knowing you have advanced the sum of human knowledge another infinitesimal amount.

Author

Brian Fransioli

assem@terranpro.org

About

Syntax Highlighting based on LibClang Tokens for Emacs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 42.1%
  • Emacs Lisp 41.1%
  • CMake 16.8%