Explorar el Código

[emacs] Update init for emacs

Colin Powell hace 4 años
padre
commit
64fb67fcd2
Se han modificado 3 ficheros con 45 adiciones y 29 borrados
  1. 8 8
      emacs/.doom.d/config.el
  2. 24 8
      emacs/.doom.d/config.org
  3. 13 13
      emacs/.doom.d/init.el

+ 8 - 8
emacs/.doom.d/config.el

@@ -4,9 +4,9 @@
 (setq ivy-read-action-function #'ivy-hydra-read-action)
 
 (setq doom-theme 'doom-challenger-deep
-      doom-font (font-spec :family "JetBrains Mono NL" :size 14 :weight 'semi-light)
-      doom-big-font (font-spec :family "JetBrains Mono NL" :size 17)
-      doom-variable-pitch-font (font-spec :family "Overpass" :size 17))
+      doom-font (font-spec :family "JetBrains Mono NL" :size 12 :weight 'semi-light)
+      doom-big-font (font-spec :family "JetBrains Mono NL" :size 16)
+      doom-variable-pitch-font (font-spec :family "Overpass" :size 16))
 
 ;; Applies to current frame
 (set-frame-parameter nil 'internal-border-width 10) ; applies to the current frame
@@ -231,18 +231,13 @@
 
 ;(add-hook 'nov-mode-hook 'variable-pitch-mode)
 
-;(load! "+mail")    ;; Mail stuff
-
-; Use w3m to parse HTML email
 (setq mm-text-html-renderer 'w3m)
 (setq w3m-fill-column 88)
 
-; Kill email message buffers when you close them
 (setq message-kill-buffer-on-exit t)
 (setq message-auto-save-directory "~/Mail/colin@unbl.ink/Drafts/")
 (setq message-directory "~/Mail/colin@unbl.ink/")
 
-;;; Setup sending email with msmtp
 ;; sendmail-program "/usr/local/bin/msmtpq" <--- this doesn't work as advertised right now
 (setq send-mail-function 'sendmail-send-it
       sendmail-program "/usr/local/bin/msmtp"
@@ -252,6 +247,11 @@
       message-sendmail-extra-arguments '("--read-envelope-from")
       mail-envelope-from 'header)
 
+(setq notmuch-saved-searches '((:name "inbox" :query "tag:inbox" :key "i")
+                               (:name "unread" :query "tag:inbox and tag:unread" :key "u")
+                               (:name "jira" :query "tag:jira and date:yesterday..today" :key "j")
+                               (:name "github" :query "tag:github and date:yesterday..today" :key "g")))
+
 (after! notmuch
   (set-popup-rule! "^\\*notmuch*" :ignore t)
   )

+ 24 - 8
emacs/.doom.d/config.org

@@ -19,9 +19,9 @@ 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.
 #+BEGIN_SRC emacs-lisp
 (setq doom-theme 'doom-challenger-deep
-      doom-font (font-spec :family "JetBrains Mono NL" :size 14 :weight 'semi-light)
-      doom-big-font (font-spec :family "JetBrains Mono NL" :size 17)
-      doom-variable-pitch-font (font-spec :family "Overpass" :size 17))
+      doom-font (font-spec :family "JetBrains Mono NL" :size 12 :weight 'semi-light)
+      doom-big-font (font-spec :family "JetBrains Mono NL" :size 16)
+      doom-variable-pitch-font (font-spec :family "Overpass" :size 16))
 #+END_SRC
 ** Borders
 Barring the unfortunate end of X11 development and my eventual transition to
@@ -315,19 +315,26 @@ Reading novels in Emacs, how novel!
 * Mail
 ** Basics
 I use notmuch to read and write email from within Emacs.
-#+BEGIN_SRC emacs-lisp
-;(load! "+mail")    ;; Mail stuff
 
-; Use w3m to parse HTML email
+Here, we'll plan to use w3m to parse HTML email. You do have to make sure w3m is
+somehow installed on your machine.
+
+#+BEGIN_SRC emacs-lisp
 (setq mm-text-html-renderer 'w3m)
 (setq w3m-fill-column 88)
+#+END_SRC
 
-; Kill email message buffers when you close them
+A few nice to haves for messages. First we kill email message buffers when they
+are closed. Then we set our auto save directory and generic message directory.
+#+BEGIN_SRC emacs-lisp
 (setq message-kill-buffer-on-exit t)
 (setq message-auto-save-directory "~/Mail/colin@unbl.ink/Drafts/")
 (setq message-directory "~/Mail/colin@unbl.ink/")
+#+END_SRC
 
-;;; Setup sending email with msmtp
+We'll use `msmtp` to send our email. Again, make sure this is installed.
+
+#+BEGIN_SRC emacs-lisp
 ;; sendmail-program "/usr/local/bin/msmtpq" <--- this doesn't work as advertised right now
 (setq send-mail-function 'sendmail-send-it
       sendmail-program "/usr/local/bin/msmtp"
@@ -338,6 +345,15 @@ I use notmuch to read and write email from within Emacs.
       mail-envelope-from 'header)
 #+END_SRC
 
+
+Set our custom saved searches so we can conveniently jump to different mail views.
+#+begin_src emacs-lisp
+(setq notmuch-saved-searches '((:name "inbox" :query "tag:inbox" :key "i")
+                               (:name "unread" :query "tag:inbox and tag:unread" :key "u")
+                               (:name "jira" :query "tag:jira and date:yesterday..today" :key "j")
+                               (:name "github" :query "tag:github and date:yesterday..today" :key "g")))
+#+end_src
+
 We want to make sure notmuch opens in a full window
 #+begin_src emacs-lisp
 (after! notmuch

+ 13 - 13
emacs/.doom.d/init.el

@@ -19,12 +19,10 @@
        ;;japanese
 
        :completion
-       (company          ; the ultimate code completion backend
-        +childframe)
+       company          ; the ultimate code completion backend
        ;;helm            ; the *other* search engine for love and life
        ;;ido             ; the other *other* search engine...
        (ivy              ; a search engine for love and life
-        +childframe
         +fuzzy
         +icons)
 
@@ -33,22 +31,20 @@
        doom              ; what makes DOOM look the way it does
        doom-dashboard    ; a nifty splash screen for Emacs
        doom-quit         ; DOOM quit-message prompts when you quit Emacs
-       (emoji +unicode)  ;
-       ;;fill-column       ; a `fill-column' indicator
+       (emoji +github +unicode)  ;
+       ;;fill-column     ; a `fill-column' indicator
        hl-todo           ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
        ;;hydra
-       ;;indent-guides     ; highlighted indent columns
+       ;;indent-guides   ; highlighted indent columns
        ligatures         ;
-       minimap           ; show a map of the code on the side
+       ;;minimap         ; show a map of the code on the side
        modeline          ; snazzy, Atom-inspired modeline, plus API
        nav-flash         ; blink cursor line after big motions
-       ;;neotree           ; a project drawer, like NERDTree for vim
+       ;;neotree         ; a project drawer, like NERDTree for vim
        ophints           ; highlight the region an operation acts on
-       (popup
-        +all
-        +defaults)   ; tame sudden yet inevitable temporary windows
-       ;;tabs              ; an tab bar for Emacs
-       treemacs          ; a project drawer, like neotree but cooler
+       (popup +defaults) ; tame sudden yet inevitable temporary windows
+       ;;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
@@ -112,6 +108,10 @@
        ;;tmux              ; an API for interacting with tmux
        ;;upload            ; map local to remote projects via ssh/ftp
 
+       :os
+       (:if IS-MAC macos)  ; improve compatibility with macOS
+       tty               ; improve the terminal Emacs experience
+
        :lang
        ;;agda              ; types of types of types of types...
        ;;cc                ; C/C++/Obj-C madness