diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-03-09 18:14:31 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2021-03-09 18:14:31 +0000 |
commit | 4aa6f83b48e6a146ed4dece20bf02ed6f10c4890 (patch) | |
tree | cb5133118ed5af2eeb1de02b1a553f817d495071 /Emacs/.config/emacs | |
parent | 56520519de5d1554698aeaf8e4b11ca57ce64f51 (diff) | |
download | dotfiles-4aa6f83b48e6a146ed4dece20bf02ed6f10c4890.tar.gz dotfiles-4aa6f83b48e6a146ed4dece20bf02ed6f10c4890.tar.bz2 dotfiles-4aa6f83b48e6a146ed4dece20bf02ed6f10c4890.zip |
(Emacs)+java c-style and a few other edits
Diffstat (limited to 'Emacs/.config/emacs')
-rw-r--r-- | Emacs/.config/emacs/config.org | 59 |
1 files changed, 56 insertions, 3 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 5fc38d2..a360615 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -2046,10 +2046,63 @@ Clang format for when: #+begin_src emacs-lisp (use-package clang-format - :after cc-mode + :after cc-mode) +#+end_src +** Java +#+begin_src emacs-lisp +(use-package ob-java + :straight nil :config - (bind-key "C-c '" #'clang-format-region c-mode-map) - (bind-key "C-c '" #'clang-format-region c++-mode-map)) + (with-eval-after-load "cc-mode" + (c-add-style + "java" + '((c-basic-offset . 4) + (c-comment-only-line-offset 0 . 0) + (c-offsets-alist + (inline-open . 0) + (topmost-intro-cont . +) + (statement-block-intro . +) + (knr-argdecl-intro . 5) + (substatement-open . 0) + (substatement-label . +) + (label . +) + (statement-case-open . +) + (statement-cont . +) + (arglist-intro . c-lineup-arglist-intro-after-paren) + (arglist-close . c-lineup-arglist) + (brace-list-intro first c-lineup-2nd-brace-entry-in-arglist c-lineup-class-decl-init-+ +) + (access-label . 0) + (inher-cont . c-lineup-java-inher) + (func-decl-cont . c-lineup-java-throws)))) + (add-to-list 'c-default-style '(java-mode . "java"))) + + (with-eval-after-load "abbrev" + (define-abbrev-table 'java-mode-abbrev-table nil) + (add-hook 'java-mode-hook + (proc (setq-local local-abbrev-table java-mode-abbrev-table))) + (+autotyping/gen-skeleton-abbrev + java-mode + "sgen" + "Name of item: " + str | "name" " {\n" + > _ "\n" + "}\n")) + + (+pretty/set-alist + java-mode-hook + ("println" . "ℙ") + ("printf" . "ω") + ("null" . "∅") + ("true" . "⊤") + ("false" . "⊥") + ("char" . "ℂ") + ("int" . "ℤ") + ("float" . "ℝ") + ("!" . "¬") + ("&&" . "∧") + ("||" . "∨") + ("for" . "∀") + ("return" . "⟼"))) #+end_src ** Haskell Haskell is a static lazy functional programming language (what a |