diff options
author | AChavali <aryadevchavali1@gmail.com> | 2019-12-30 14:50:31 +0000 |
---|---|---|
committer | AChavali <aryadevchavali1@gmail.com> | 2019-12-30 14:52:18 +0000 |
commit | 57e48da0b73f959c9e4e21541fd86733b62f7a04 (patch) | |
tree | 4df6ffef5f950c8494c4f650b425789d19c97d8b /doom.d | |
parent | 2ee3a2492e106a9cb82be81b666766fc19f4bc82 (diff) | |
download | dotfiles-57e48da0b73f959c9e4e21541fd86733b62f7a04.tar.gz dotfiles-57e48da0b73f959c9e4e21541fd86733b62f7a04.tar.bz2 dotfiles-57e48da0b73f959c9e4e21541fd86733b62f7a04.zip |
+c-styles for emacs
Allman style (derivative of Linux with an offset of 2)
C# style (full on C# styling (basically Linux, offset of 4))
Diffstat (limited to 'doom.d')
-rw-r--r-- | doom.d/config.org | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/doom.d/config.org b/doom.d/config.org index db081fc..a8e096c 100644 --- a/doom.d/config.org +++ b/doom.d/config.org @@ -238,6 +238,43 @@ If RETURN-P, return the message as a string instead of displaying it." (setq org-gcal-file-alist '(("aryadevchavali1@gmail.com" . "~/Text/schedule.org")))) #+END_SRC * Language Config +** C-style languages +#+BEGIN_SRC elisp +(after! cc-mode + (c-add-style "Allman" + '((c-basic-offset . 2) + (c-comment-only-line-offset . 0) + (c-hanging-braces-alist (brace-list-open) + (brace-entry-open) + (substatement-open after) + (block-close . c-snug-do-while) + (arglist-cont-nonempty)) + (c-cleanup-list brace-else-brace) + (c-offsets-alist + (statement-block-intro . +) + (knr-argdecl-intro . 0) + (substatement-open . 0) + (substatement-label . 0) + (label . 0) + (statement-cont . +)))) + (c-add-style "C#" + '((c-basic-offset . 4) + (c-comment-only-line-offset .0) + (c-hanging-braces-alist (brace-list-open) + (brace-entry-open) + (substatement-open after) + (block-close . c-snug-do-while) + (arglist-cont-nonempty)) + (c-cleanup-list brace-else-brace) + (c-offsets-alist + (statement-block-intro . 0) + (knr-argdecl-intro . 0) + (substatement-open . 0) + (substatement-label . 0) + (statement-cont . +) + (label . 0))))) +#+END_SRC +Emacs doesn't have the full range of styles that I want, so lemme just do it myself. ** CSharp #+BEGIN_SRC elisp (after! csharp-mode |