From 188c5b781e2d0c8e42643bcebe8634908a64f3d6 Mon Sep 17 00:00:00 2001 From: earnest ma Date: Tue, 8 Mar 2022 09:38:58 -0500 Subject: [PATCH] * --- doom/.config/doom/+ui.el | 28 ++++++++++++++++++++++++++++ doom/.config/doom/README.md | 10 ++++++++++ doom/.config/doom/config.el | 12 ++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 doom/.config/doom/README.md diff --git a/doom/.config/doom/+ui.el b/doom/.config/doom/+ui.el index 069d65b..eca1ad0 100644 --- a/doom/.config/doom/+ui.el +++ b/doom/.config/doom/+ui.el @@ -19,3 +19,31 @@ ;; Display (setq display-line-numbers-type 'relative) (menu-bar-mode +1) ; add back menu bar + +;; slightly nicer default buffer names +(setq doom-fallback-buffer-name "► Doom" + +doom-dashboard-name "► Doom") + +;; Frames and windows +;; Move to split window +(setq evil-vsplit-window-right t + evil-split-window-below t) + +;; Modeline +(setq display-time-day-and-date t) +(display-time-mode +1) ; show the time + +;; show battery level (when on a laptop) +(unless (string-match-p "^Power N/A" (battery)) + (display-battery-mode 1)) + +;; From Tecosaur's config: hide encoding when it's what's expected +(defun doom-modeline-conditional-buffer-encoding () + "We expect the encoding to be LF UTF-8, so only show the modeline when this is not the case" + (setq-local doom-modeline-buffer-encoding + (unless (and (memq (plist-get (coding-system-plist buffer-file-coding-system) :category) + '(coding-category-undecided coding-category-utf-8)) + (not (memq (coding-system-eol-type buffer-file-coding-system) '(1 2)))) + t))) + +(add-hook 'after-change-major-mode-hook #'doom-modeline-conditional-buffer-encoding) diff --git a/doom/.config/doom/README.md b/doom/.config/doom/README.md new file mode 100644 index 0000000..a4e8e86 --- /dev/null +++ b/doom/.config/doom/README.md @@ -0,0 +1,10 @@ +# doom emacs config + +- Grab a copy of Doom Emacs: `git clone https://github.com/hlissner/doom-emacs --depth 1 ~/.config/emacs` +- Build: `~/.config/emacs/bin/doom sync` +- See if you're missing anything: `doom doctor` + +Also check out: + +- [Tecosaur's literate Doom Emacs configuration](https://github.com/tecosaur/emacs-config) +- [Diego Zamboni dot-doom](https://gitlab.com/zzamboni/dot-doom) diff --git a/doom/.config/doom/config.el b/doom/.config/doom/config.el index a838fdd..3aaa4e6 100644 --- a/doom/.config/doom/config.el +++ b/doom/.config/doom/config.el @@ -41,4 +41,16 @@ ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; they are implemented. +;; Defaults +(setq-default delete-by-moving-to-trash t) + +(setq undo-limit 80000000 ; 80Mb + evil-want-fine-undo t ; more history when in insert mode + truncate-string-ellipsis "…" ; Unicode ellispis are nicer than "...", and also save /precious/ space + password-cache-expiry nil ; don't expire + ) + +(global-subword-mode 1) ; Iterate through CamelCase words + +;; load (load! "+projects")