summaryrefslogtreecommitdiff
path: root/lisp/cpp.el
blob: ab8cffc7dd241f1e18905d0bbb899e9ede061c03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

;;; Code:
(defun setup-c()
  "Set up c common mode."
  (setq c++-tab-always-indent 0)
  (setq c-basic-offset 4)                  ;; Default is 2
  (setq c-indent-level 4)                  ;; Default is 2
  (c-set-offset 'brace-list-open 0)

  (setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60))
  (setq tab-width 4)
  ;; (electric-indent-mode 0)
  )

(use-package eglot
  :ensure t
  :config
  (add-hook 'c-mode-common-hook 'eglot-ensure)
  )

(add-hook 'c-mode-common-hook 'setup-c)

(defun create-cpp-class()
  "Create a cpp class."
  (interactive "Enter the name of the class: ")
  )

(defun me:c-mode-config ()   
  (c-set-style "ellemtel"))

(provide 'cpp)
;;; cpp.el ends here