This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/contrib/lang/c-c++/packages.el
syl20bnr 61a9481e96 Move C/C++ and CMake to c-c++ layer
Although CMake can support different compilers it is mainly
used for C++ projects. So it makes sense to add it here.
2014-12-13 23:08:55 -05:00

24 lines
673 B
EmacsLisp

(defvar c-c++-packages
'(
cc-mode
cmake-mode
)
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")
(defun c-c++/init-cc-mode ()
(use-package cc-mode
:defer t
:config
(progn
(add-hook 'c-mode-hook '(lambda () (c-toggle-auto-state t)))
(add-hook 'c++-mode-hook '(lambda () (c-toggle-auto-state t))))))
(defun c-c++/init-cmake-mode ()
(use-package cmake-mode
:defer t
:init
(setq auto-mode-alist
(append '(("CMakeLists\\.txt\\'" . cmake-mode)
("\\.cmake\\'" . cmake-mode))
auto-mode-alist))))