318bd23dc4
Now in addition to the <layer>/init-<pkg> function there are - <layer>/pre-init-<pkg> (executed before <layer>/init-<pkg>) - <layer>/post-init-<pkg> (executed after <layer>/init-<pkg>) The init function is mandatory, if it is not present then the package is ignored and not installed. This mechanism allows soft (implicit) cross layers dependencies between packages (see company for more info). It is now possible to remove flycheck from spacemacs layer and move it to its own syntax-checking layer. |
||
---|---|---|
.. | ||
img | ||
config.el | ||
packages.el | ||
README.md |
C/C++ contribution layer for Spacemacs
Table of Contents
Description
This layer adds configuration for C/C++ language as well support for CMake scripts.
Features
- Support syntax checking with Clang.
- Display function or variable definition at the bottom.
- Display current function cursor is in at the top. See this page for demos in some programming languages.
- Support common refactoring with semantic-refactor. See this page for demonstration of refactoring features.
Clang Fanciness
This layer adds some fancy improvements to company-clang
.
It includes a hook to load a projects .clang_complete
file, which is
just a text file with one clang flag per line, a format also used by
other text editor clang plugins.
Not only does this allow proper autocomplete on projects with extra includes and flags, but there is also support for flycheck so that it doesn't complain about missing header files.
Key Bindings
Key Binding | Description
----------------------|------------------------------------------------------------ SPC m g o | open matching file (e.g. switch between .cpp and .h) SPC m g O | open matching file in another window (e.g. switch between .cpp and .h) SPC m r | srefactor: refactor thing at point.
Install
To use this contribution add it to your ~/.spacemacs
(setq-default dotspacemacs-configuration-layers '(c-c++))
** Note: ** semantic-refactor is only available for Emacs 24.4+