Intelligent syntax higlighting through libclang w/emacs!
-
Clone the repository
mkdir build; cd build cmake .. make
(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
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.
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.
Brian Fransioli