diff --git a/modules/languages.el b/modules/languages.el index 71b6fee..c05b83c 100644 --- a/modules/languages.el +++ b/modules/languages.el @@ -20,8 +20,11 @@ (defvar emodule/languages-packages - '(;; C/C++ + '(;; CMake + cmake-mode + ;; C/C++ ccls + clang-format ;; Dockerfile dockerfile-mode ;; P4 @@ -57,6 +60,13 @@ :init (autoload 'antlr-v4-mode "antlr-mode" nil t) :mode ("\\.g4\\'" . antlr-v4-mode)) + ;; -------------------------------------------------------------------------- + ;; CMake. + ;; -------------------------------------------------------------------------- + + (use-package cmake-mode + :defer t) + ;; -------------------------------------------------------------------------- ;; C/C++. ;; -------------------------------------------------------------------------- @@ -68,6 +78,14 @@ (setq-default c-default-style "linux" c-basic-offset 4) + (use-package clang-format + :bind (:map c-mode-map + ("C-c C-f" . clang-format-buffer) + :map c++-mode-map + ("C-c C-f" . clang-format-buffer) + :map objc-mode-map + ("C-c C-f" . clang-format-buffer))) + ;; -------------------------------------------------------------------------- ;; Dockerfile. ;; --------------------------------------------------------------------------