Add cmake-mode and clang-format

This commit is contained in:
Wojciech Kozlowski 2020-09-09 18:42:49 +02:00
parent eb38848a12
commit a8afdfffeb

View File

@ -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.
;; --------------------------------------------------------------------------