Browse Source

[emacs] Clean up some funky doom config

Colin Powell 5 years ago
parent
commit
f6db6c0e27
2 changed files with 49 additions and 97 deletions
  1. 16 61
      emacs/.config/doom/config.org
  2. 33 36
      emacs/.config/doom/init.el

+ 16 - 61
emacs/.config/doom/config.org

@@ -3,55 +3,34 @@
 This configuration of Emacs is highly opinionated.
 This configuration of Emacs is highly opinionated.
 
 
 * Basics
 * 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.
 My identity. Used in a handful of places in Emacs to prepopulate authorship and such.
 #+BEGIN_SRC emacs-lisp
 #+BEGIN_SRC emacs-lisp
 (setq user-full-name "Colin Powell"
 (setq user-full-name "Colin Powell"
       user-mail-address "colin@unbl.ink")
       user-mail-address "colin@unbl.ink")
 #+END_SRC
 #+END_SRC
-
-** TODO Figure out what `inhibit-double-buffering` does in Emacs
 * User interface
 * User interface
 ** Fonts and themes
 ** Fonts and themes
 I change my default theme almost as often as the weather. I tend to revert back
 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
 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.
 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
 #+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
 #+END_SRC
 ** Borders
 ** Borders
 Barring the unfortunate end of X11 development and my eventual transition to
 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,
 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
 however is that when you're trying your best to rice up i3, Emacs needs a padded
 border.
 border.
-
 #+BEGIN_SRC emacs-lisp
 #+BEGIN_SRC emacs-lisp
 ;; Applies to current frame
 ;; Applies to current frame
 (set-frame-parameter nil 'internal-border-width 30) ; applies to the 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
 ;; If we create new frames (via emacsclient) this will do the trick
 (add-to-list 'default-frame-alist '(internal-border-width . 30))
 (add-to-list 'default-frame-alist '(internal-border-width . 30))
-;; Dash highlighting
-(after! dash (dash-enable-font-lock))
 #+END_SRC
 #+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
 ** Fringe
 #+BEGIN_SRC emacs-lisp
 #+BEGIN_SRC emacs-lisp
 (nyan-mode) ;; progress in the form of a rainbow cat.
 (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 "Goto URL in eww"         "u" #'eww-browse-url
         :desc "Search in eww"           "3" #'eww-search-words
         :desc "Search in eww"           "3" #'eww-search-words
         :desc "Search all the things"   "g" #'deadgrep))
         :desc "Search all the things"   "g" #'deadgrep))
-
 #+END_SRC
 #+END_SRC
 * Weather
 * Weather
 Wttrin is a pretty funny way to check weather. I like that you can copy and
 Wttrin is a pretty funny way to check weather. I like that you can copy and
@@ -105,21 +83,6 @@ accurate though.
    (:prefix "o"
    (:prefix "o"
     :desc "(W)eather" "W" #'wttrin)))
     :desc "(W)eather" "W" #'wttrin)))
 #+END_SRC
 #+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
 * Music
 Right now, just make sure I can connect to my local Mopidy server via MPDel.
 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/London" "London")
                                 ("Europe/Warsaw" "Warsaw")
                                 ("Europe/Warsaw" "Warsaw")
                                 ("Europe/Kiev" "Lviv")))
                                 ("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
 #+END_SRC
 * Org-mode
 * Org-mode
 ** Basic configuration
 ** Basic configuration
@@ -224,7 +180,7 @@ a serif font when I’m writing a lot of words.
 
 
 #+BEGIN_SRC emacs-lisp
 #+BEGIN_SRC emacs-lisp
 (add-hook 'org-mode-hook #'doom-disable-line-numbers-h)
 (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
 ; For org mode serif
 ;(add-hook 'org-mode-hook 'variable-pitch-mode)
 ;(add-hook 'org-mode-hook 'variable-pitch-mode)
 ;(add-hook 'org-mode-hook
 ;(add-hook 'org-mode-hook
@@ -246,7 +202,6 @@ a serif font when I’m writing a lot of words.
 (after! org
 (after! org
   (setq org-directory (expand-file-name "~/org/")
   (setq org-directory (expand-file-name "~/org/")
         org-agenda-files (list org-directory)
         org-agenda-files (list org-directory)
-        org-agenda-window-setup 'only-window
         org-pretty-entities t
         org-pretty-entities t
         org-agenda-dim-blocked-tasks nil
         org-agenda-dim-blocked-tasks nil
         org-log-done 'time
         org-log-done 'time
@@ -259,12 +214,6 @@ a serif font when I’m writing a lot of words.
                "* TODO %?\n"))
                "* TODO %?\n"))
         org-todo-keywords
         org-todo-keywords
             '((sequence "TODO(t)" "NEXT(n)" "MAYBE(m)" "|" "DONE(d)" "WONTDO(w)"))
             '((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
         org-modules '(ol-eshell
                       ol-notmuch
                       ol-notmuch
                       ob-eval
                       ob-eval
@@ -274,6 +223,7 @@ a serif font when I’m writing a lot of words.
                       org-id)))
                       org-id)))
 
 
 ;; Don’t display git gutter in org mode
 ;; Don’t display git gutter in org mode
+;; With tree folding, it's pretty much useless
 (after! git-gutter
 (after! git-gutter
   (setq git-gutter:disabled-modes '(org-mode image-mode)))
   (setq git-gutter:disabled-modes '(org-mode image-mode)))
 
 
@@ -297,8 +247,8 @@ a serif font when I’m writing a lot of words.
  :leader
  :leader
    :desc "Open inbox" "I" #'+open-inbox-file
    :desc "Open inbox" "I" #'+open-inbox-file
    :desc "Open today" "T" #'org-roam-today
    :desc "Open today" "T" #'org-roam-today
+   :desc "Open today" "Y" #'org-roam-yesterday
    :desc "Open tomorrow" "N" #'org-roam-tomorrow)
    :desc "Open tomorrow" "N" #'org-roam-tomorrow)
-
 (map! :leader
 (map! :leader
       (:prefix "f" :desc "Save all org buffers" "a" #'org-save-all-org-buffers))
       (:prefix "f" :desc "Save all org buffers" "a" #'org-save-all-org-buffers))
 #+END_SRC
 #+END_SRC
@@ -347,7 +297,7 @@ Reading novels in Emacs, how novel!
 #+BEGIN_SRC emacs-lisp
 #+BEGIN_SRC emacs-lisp
 (require 'justify-kp)
 (require 'justify-kp)
 ;(setq nov-text-width t)
 ;(setq nov-text-width t)
-(setq nov-text-width 80)
+(setq nov-text-width 100)
 
 
 (defun my-nov-window-configuration-change-hook ()
 (defun my-nov-window-configuration-change-hook ()
   (my-nov-post-html-render-hook)
   (my-nov-post-html-render-hook)
@@ -371,8 +321,13 @@ Reading novels in Emacs, how novel!
     (add-hook 'window-configuration-change-hook
     (add-hook 'window-configuration-change-hook
               'my-nov-window-configuration-change-hook
               'my-nov-window-configuration-change-hook
               nil t)))
               nil t)))
-
 (add-hook 'nov-post-html-render-hook 'my-nov-post-html-render-hook)
 (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-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
 
 
 ;(add-hook 'nov-mode-hook 'variable-pitch-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
 #+END_SRC
 * Magit
 * Magit
 #+BEGIN_SRC emacs-lisp
 #+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!
 (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!
       +magit-hub-enable-by-default t)  ;; And I want it on by default!

+ 33 - 36
emacs/.config/doom/init.el

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