diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-03-22 06:28:19 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-03-22 06:28:19 +0000 |
commit | c706c939b3247badcc6538dccc9896c862c0adb3 (patch) | |
tree | 1dc677273b8b0a9c13bb5c71090dfd424c1d2edc /Emacs | |
parent | ab6e5c2a575f8890d21f55ff09078bbe8e12bdf8 (diff) | |
download | dotfiles-c706c939b3247badcc6538dccc9896c862c0adb3.tar.gz dotfiles-c706c939b3247badcc6538dccc9896c862c0adb3.tar.bz2 dotfiles-c706c939b3247badcc6538dccc9896c862c0adb3.zip |
(Emacs)~clang-format package now uses default sys installation
This adds a dependency to the main system to provide the clang lib
packages, but they should be there anyway.
Diffstat (limited to 'Emacs')
-rw-r--r-- | Emacs/.config/emacs/config.org | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 1b6df57..0609120 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -2070,13 +2070,24 @@ opposing style. (statement-cont . +))))) #+end_src *** Clang format -Clang format for when: -- eglot isn't working/I'm not running it -- eglot format is bad +Clang format comes in built with clang, so download that before using +this. #+begin_src emacs-lisp (use-package clang-format - :after cc-mode) + :load-path "/usr/share/clang/" + :after cc-mode + :commands +code/clang-format-region-or-buffer + :general + (leader + :keymaps '(c-mode-map c++-mode-map) + "cf" #'+code/clang-format-region-or-buffer) + :config + (defun +code/clang-format-region-or-buffer () + (interactive) + (if (mark) + (clang-format-region) + (clang-format-buffer)))) #+end_src ** Java #+begin_src emacs-lisp |