spacemacs/contrib/lang/c-c++
Tu Do 6ffb4fa916 Improve Semantic layer
- Explicitly load Semantic. Currently is loaded only when Srefactor is
  loaded, which is not good for other packages that depends on
  Semantic but outside of C/C++, i.e. Python.

- Enable evil-emacs-state in Srefactor UI menu, since currently Evil key
  mapping override the key mapping of the menu. Vim key bindings are
  already supported upstream, with j,k,/ and ? which is good enough to
  navigate the menu.
2015-04-26 00:33:48 -04:00
..
img Move layer images into img directories 2014-12-24 01:03:49 -05:00
config.el Refactor one more time the auto-completin macros 2015-04-09 00:03:51 -04:00
packages.el Improve Semantic layer 2015-04-26 00:33:48 -04:00
README.md [feature] new Semantic layer 2015-04-21 01:15:40 -04:00

C/C++ contribution layer for Spacemacs

cc++ cmake

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. (when semantic layer is included)
  • Display current function cursor is in at the top. See this page for demos in some programming languages. (when semantic layer is included)
  • Support common refactoring with semantic-refactor. See this page for demonstration of refactoring features. (when semantic layer is included)

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+