[emacs] Clean up some funky doom config

This commit is contained in:
2020-06-02 17:32:39 -04:00
parent c0505c16f8
commit f6db6c0e27
2 changed files with 49 additions and 97 deletions

View File

@ -3,55 +3,34 @@
This configuration of Emacs is highly opinionated.
* Basics
I don't actually know what this does ... :thinking:
#+BEGIN_SRC emacs-lisp
(add-to-list 'default-frame-alist '(inhibit-double-buffering . t))
#+END_SRC
My identity. Used in a handful of places in Emacs to prepopulate authorship and such.
#+BEGIN_SRC emacs-lisp
(setq user-full-name "Colin Powell"
user-mail-address "colin@unbl.ink")
#+END_SRC
** TODO Figure out what `inhibit-double-buffering` does in Emacs
* User interface
** Fonts and themes
I change my default theme almost as often as the weather. I tend to revert back
to Doom One most of the time, but I like the Kaolin themes, as well as Nimbus
for it's retro charm. Nimbus just doesn't look great when I'm tired though.
I love [[https://blog.golang.org/go-fonts][Go Mono]]. But sometimes Emacs is sensitive
to fonts and performance suffers, so we have Fira Mono to fall back on.
#+BEGIN_SRC emacs-lisp
(setq doom-font (font-spec :family "FuraCode Nerd Font Mono" :size 12)
doom-big-font (font-spec :family "FuraCode Nerd Font Mono" :size 17)
doom-variable-pitch-font (font-spec :family "Liberation Serif" :size 16)
doom-serif-font (font-spec :family "Liberation Serif" :size 16)
doom-theme 'doom-one)
(setq doom-font (font-spec :family "FuraCode Nerd Font Mono" :size 14 :weight 'semi-light)
doom-variable-pitch-font (font-spec :family "Source Serif Pro" :size 16)
doom-big-font (font-spec :family "FuraCode Nerd Font Mono" :size 20))
(setq doom-theme 'doom-one)
#+END_SRC
** Borders
Barring the unfortunate end of X11 development and my eventual transition to
wayland and sway, you can pry i3wm from my cold, dead hands. One problem,
however is that when you're trying your best to rice up i3, Emacs needs a padded
border.
#+BEGIN_SRC emacs-lisp
;; Applies to current frame
(set-frame-parameter nil 'internal-border-width 30) ; applies to the current frame
;; If we create new frames (via emacsclient) this will do the trick
(add-to-list 'default-frame-alist '(internal-border-width . 30))
;; Dash highlighting
(after! dash (dash-enable-font-lock))
#+END_SRC
** Dash
I need to figure out what this does, hence the task below.
#+BEGIN_SRC emacs-lisp
;; Dash highlighting
(after! dash (dash-enable-font-lock))
#+END_SRC
*** TODO Figure out what dash highlighting is all about
** Fringe
#+BEGIN_SRC emacs-lisp
(nyan-mode) ;; progress in the form of a rainbow cat.
@ -89,7 +68,6 @@ I need to figure out what this does, hence the task below.
:desc "Goto URL in eww" "u" #'eww-browse-url
:desc "Search in eww" "3" #'eww-search-words
:desc "Search all the things" "g" #'deadgrep))
#+END_SRC
* Weather
Wttrin is a pretty funny way to check weather. I like that you can copy and
@ -105,21 +83,6 @@ accurate though.
(:prefix "o"
:desc "(W)eather" "W" #'wttrin)))
#+END_SRC
* Search
#+BEGIN_SRC emacs-lisp
;; app/search
(after! web-search
(push '("Searx" "http://search.unbl.ink/?q=%s")
web-search-providers)
(setq web-search-default-provider "Searx"))
#+END_SRC
* Eglot
Eglot versus LSP? Until 27 lands stable, Eglot wins. I can actually read all
it's source.
#+BEGIN_SRC emacs-lisp
(add-hook 'foo-mode-hook 'eglot-ensure) ;; back to eglot
#+END_SRC
* Music
Right now, just make sure I can connect to my local Mopidy server via MPDel.
@ -200,13 +163,6 @@ Handy clock to look up what timezone my co-workers are in!
("Europe/London" "London")
("Europe/Warsaw" "Warsaw")
("Europe/Kiev" "Lviv")))
#+END_SRC
#+BEGIN_SRC emacs-lisp
;(setq +workspaces-switch-project-function #'ignore
; +format-on-save-enabled-modes '(python-mode)
; +pretty-code-enabled-modes '(emacs-lisp-mode org-mode))
#+END_SRC
* Org-mode
** Basic configuration
@ -224,7 +180,7 @@ a serif font when Im writing a lot of words.
#+BEGIN_SRC emacs-lisp
(add-hook 'org-mode-hook #'doom-disable-line-numbers-h)
(add-hook 'org-mode-hook 'typo-mode)
;;(add-hook 'org-mode-hook 'typo-mode)
; For org mode serif
;(add-hook 'org-mode-hook 'variable-pitch-mode)
;(add-hook 'org-mode-hook
@ -246,7 +202,6 @@ a serif font when Im writing a lot of words.
(after! org
(setq org-directory (expand-file-name "~/org/")
org-agenda-files (list org-directory)
org-agenda-window-setup 'only-window
org-pretty-entities t
org-agenda-dim-blocked-tasks nil
org-log-done 'time
@ -259,12 +214,6 @@ a serif font when Im writing a lot of words.
"* TODO %?\n"))
org-todo-keywords
'((sequence "TODO(t)" "NEXT(n)" "MAYBE(m)" "|" "DONE(d)" "WONTDO(w)"))
org-tag-alist '(("@personal" . ?h)
("@farm" . ?f)
("@town" . ?s)
("@errand" . ?e)
("@15five" . ?w)
("@family" . ?m))
org-modules '(ol-eshell
ol-notmuch
ob-eval
@ -274,6 +223,7 @@ a serif font when Im writing a lot of words.
org-id)))
;; Dont display git gutter in org mode
;; With tree folding, it's pretty much useless
(after! git-gutter
(setq git-gutter:disabled-modes '(org-mode image-mode)))
@ -297,8 +247,8 @@ a serif font when Im writing a lot of words.
:leader
:desc "Open inbox" "I" #'+open-inbox-file
:desc "Open today" "T" #'org-roam-today
:desc "Open today" "Y" #'org-roam-yesterday
:desc "Open tomorrow" "N" #'org-roam-tomorrow)
(map! :leader
(:prefix "f" :desc "Save all org buffers" "a" #'org-save-all-org-buffers))
#+END_SRC
@ -347,7 +297,7 @@ Reading novels in Emacs, how novel!
#+BEGIN_SRC emacs-lisp
(require 'justify-kp)
;(setq nov-text-width t)
(setq nov-text-width 80)
(setq nov-text-width 100)
(defun my-nov-window-configuration-change-hook ()
(my-nov-post-html-render-hook)
@ -371,8 +321,13 @@ Reading novels in Emacs, how novel!
(add-hook 'window-configuration-change-hook
'my-nov-window-configuration-change-hook
nil t)))
(add-hook 'nov-post-html-render-hook 'my-nov-post-html-render-hook)
(defun my-nov-font-setup ()
(face-remap-add-relative 'variable-pitch :family "Noto Serif Regular"
:height 1.0
:size 16))
(add-hook 'nov-mode-hook 'my-nov-font-setup)
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
;(add-hook 'nov-mode-hook 'variable-pitch-mode)
@ -549,7 +504,7 @@ Here we are trying to auto-translate Word and PDF files to be viewed in Emacs.
#+END_SRC
* Magit
#+BEGIN_SRC emacs-lisp
(add-hook 'magit-mode-hook #'doom-disable-line-numbers-h)
;;(add-hook 'magit-mode-hook #'doom-disable-line-numbers-h)
(setq +magit-hub-features t ;; I want the PR/issue stuff too!
+magit-hub-enable-by-default t) ;; And I want it on by default!