From a8afdfffeb467ba34aa8ae81242f2ee865df6852 Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Wed, 9 Sep 2020 18:42:49 +0200 Subject: [PATCH] Add cmake-mode and clang-format --- modules/languages.el | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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. ;; --------------------------------------------------------------------------