[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!

View File

@ -14,7 +14,7 @@
;;ido ; the other *other* search engine...
:ui
deft ; notational velocity for Emacs
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty spash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
@ -22,67 +22,64 @@
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
nav-flash ; blink the current line after jumping
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup ; tame sudden yet inevitable temporary windows
+all ; catch all popups that start with an asterix
+defaults) ; default popup rules
;;(pretty-code +fira) ; replace bits of code with pretty symbols
;;tabbar ; FIXME an (incomplete) tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler
(popup +defaults) ; tame sudden yet inevitable temporary windows
pretty-code ; replace bits of code with pretty symbols
;; tabs ; an tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler
unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness
(format +onsave) ; automated prettiness
;;lispy ; vim for lisp, for people who dont like vim
multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
rotate-text ; cycle region at point between text candidates
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
(dired
+ranger
+icons)
electric ; smarter, keyword-based electric-indent
ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:checkers
syntax ; tasing you for every semicolon you forget
spell ; tasing you for misspelling mispelling
grammar ; tasing grammar mistake every you make
:term
eshell ; a consistent, cross-platform shell (WIP)
;;shell ; a terminal REPL for Emacs
term ; terminals in Emacs
;;vterm ; another terminals in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
spell ; tasing you for misspelling mispelling
grammar ; tasing grammar mistake every you make
:tools
ansible
debugger ; FIXME stepping through code, to help you add bugs
;;ansible
;;debugger ; FIXME stepping through code, to help you add bugs
direnv
docker
;;docker
editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
gist ; interacting with github gists
(lookup ; helps you navigate your code and documentation
+docsets) ; ...or in Dash docsets locally
;;lsp
lookup ; helps you navigate your code and documentation
lsp
;;macos ; MacOS-specific commands
magit ; a git porcelain for Emacs
make ; run make tasks from Emacs
@ -90,7 +87,7 @@
pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
terraform ; infrastructure as code
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;upload ; map local to remote projects via ssh/ftp
;;wakatime
@ -102,28 +99,28 @@
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
crystal ; ruby at the speed of c
(crystal +lsp) ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
data ; config/data formats
;;erlang ; an elegant language for a more civilized age
elixir ; erlang done right
(elixir +lsp) ; erlang done right
elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;ess ; emacs speaks statistics
;;fsharp ; ML stands for Microsoft's Language
go ; the hipster dialect
(go +lsp) ; the hipster dialect
;;(haskell +intero) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ;
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
(javascript +lsp) ; all(hope(abandon(ye(who(enter(here))))))
julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
ledger ; an accounting system in Emacs
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
nim ; python + lisp at the speed of c
(nim +lsp) ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org ; organize your plain life in plain text
@ -141,19 +138,19 @@
;;php ; perl's insecure younger brother
plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
python ; beautiful is better than ugly
(python +lsp) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
racket ; a DSL for DSLs
;;racket ; a DSL for DSLs
rest ; Emacs as a REST client
ruby ; 1.step do {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
scala ; java, but good
(ruby +lsp) ; 1.step do {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
scheme ; a fully conniving family of lisps
(sh +fish) ; she sells (ba|z|fi)sh shells on the C xor
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
web ; the tubes
;;web ; the tubes
;;vala ; GObjective-C
:email