fix C++-mode incorrect indentation

This commit is contained in:
Jesús 2018-08-11 13:02:32 -05:00
parent 7423a2b2db
commit ea4493ec24
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
2 changed files with 15 additions and 0 deletions

View File

@ -37,6 +37,7 @@
;; Tools
(require 'init-flycheck)
;; Languages
(require 'init-ccc)
(require 'init-markdown)
(require 'init-python)
(require 'init-pkgbuild)

14
lisp/init-ccc.el Normal file
View File

@ -0,0 +1,14 @@
;;----------------------------------------------------------------------------
;; c++ Mode
;;----------------------------------------------------------------------------
(add-hook 'c++-mode-hook
(lambda ()
(setq indent-tabs-mode t)
(setq c-basic-offset 4)
(setq tab-width 4)))
;; This is my default indent.
;; After moving the cursor to line 2 I see that the relevant symbol is comment-intro.
(c-set-offset 'comment-intro 6)
(provide 'init-ccc)