about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--+bindings.el165
-rw-r--r--config.el88
-rw-r--r--init.el106
-rw-r--r--packages.el12
4 files changed, 223 insertions, 148 deletions
diff --git a/+bindings.el b/+bindings.el
index bcd49e0511c6..a0c4467319b2 100644
--- a/+bindings.el
+++ b/+bindings.el
@@ -330,11 +330,10 @@ private/hlissner/snippets."
      :desc "Store link"             :n  "l" #'org-store-link
      :desc "Browse notes"           :n  "N" #'+hlissner/browse-notes
      :desc "Org capture"            :n  "x" #'+org-capture/open
-     :desc "Browse mode notes"      :n  "m" #'+org/browse-notes-for-major-mode
-     :desc "Browse project notes"   :n  "p" #'+org/browse-notes-for-project
      :desc "Create clubhouse story" :n  "c" #'org-clubhouse-create-story
      :desc "Archive subtree"        :n  "k" #'org-archive-subtree
-     :desc "Goto clocked-in note"   :n  "g" #'org-clock-goto)
+     :desc "Goto clocked-in note"   :n  "g" #'org-clock-goto
+     :desc "Clock Out"              :n  "o" #'org-clock-out)
 
    (:desc "open" :prefix "o"
      :desc "Default browser"       :n  "b" #'browse-url-of-file
@@ -354,6 +353,11 @@ private/hlissner/snippets."
      :desc "APP: twitter"          :n "T" #'=twitter
      :desc "APP: regex"            :n "X" #'=regex
 
+     (:desc "spotify" :prefix "s"
+       :desc "Search track"  :n "t" #'counsel-spotify-search-track
+       :desc "Search album"  :n "a" #'counsel-spotify-search-album
+       :desc "Search artist" :n "A" #'counsel-spotify-search-artist)
+
      ;; macos
      (:when IS-MAC
        :desc "Reveal in Finder"          :n "o" #'+macos/reveal-in-finder
@@ -534,9 +538,6 @@ private/hlissner/snippets."
  ;; evil-exchange
  :n  "gx"  #'evil-exchange
 
- ;; evil-matchit
- :nv [tab] #'+evil/matchit-or-toggle-fold
-
  ;; evil-magit
  (:after evil-magit
    :map (magit-status-mode-map magit-revision-mode-map)
@@ -1065,7 +1066,8 @@ If invoked with a prefix ARG eval the expression after inserting it"
               "c" 'cider-eval-last-sexp-in-context)
         "!" (general-key-dispatch 'fireplace-replace
               "!" 'cider-eval-current-sexp-and-replace
-              "c" 'cider-eval-last-sexp-and-replace)))
+              "c" 'cider-eval-last-sexp-and-replace)
+        "y" 'cider-copy-last-result))
 
 
 ;; >) ; slurp forward
@@ -1094,70 +1096,91 @@ If invoked with a prefix ARG eval the expression after inserting it"
     ("cljs" (cider-interactive-eval "(with-out-string (cljs.test/run-tests))"))
     ("clj"  (cider-test-run-ns-tests))))
 
+(defun cider-copy-last-result ()
+  (interactive)
+  (cider-interactive-eval
+   "*1"
+   (nrepl-make-response-handler
+    (current-buffer)
+    (lambda (_ value)
+      (kill-new value)
+      (message "Copied last result (%s) to clipboard"
+               (if (= (length value) 1) "1 char"
+                 (format "%d chars" (length value)))))
+    nil nil nil)))
+
+
 (map!
-  (:map haskell-mode-map
-     ;; :n "K"     'lsp-info-under-point
-     ;; :n "g d"   'lsp-ui-peek-find-definitions
-     ;; :n "g r"   'lsp-ui-peek-find-references
-     ;; :n "g \\"  '+haskell/repl
-     :n "K"     'intero-info
-     :n "g d"   'intero-goto-definition
-     :n "g SPC" 'intero-repl-load
-     :n "g \\"  'intero-repl
-     :n "g y"   'intero-type-at
-     ;; :n "g RET" 'grfn/run-sputnik-test-for-file
 
+ (:map magit-mode-map
+   :n "#" 'forge-dispatch)
+
+ (:map haskell-mode-map
+   ;; :n "K"     'lsp-info-under-point
+   ;; :n "g d"   'lsp-ui-peek-find-definitions
+   ;; :n "g r"   'lsp-ui-peek-find-references
+   ;; :n "g \\"  '+haskell/repl
+   :n "K"     'intero-info
+   :n "g d"   'intero-goto-definition
+   :n "g SPC" 'intero-repl-load
+   :n "g \\"  'intero-repl
+   :n "g y"   'intero-type-at
+   ;; :n "g RET" 'grfn/run-sputnik-test-for-file
+
+   (:localleader
+     :desc "Apply action"  :n "e" 'intero-repl-eval-region
+     :desc "Rename symbol" :n "r" 'intero-apply-suggestions))
+
+ (:after agda2-mode
+   (:map agda2-mode-map
+     :n "g SPC" 'agda2-load
+     :n "g d"   'agda2-goto-definition-keyboard
+     :n "] g"   'agda2-next-goal
+     :n "[ g"   'agda2-previous-goal
+
+     (:localleader
+       :desc "Give"                               :n "SPC" 'agda2-give
+       :desc "Refine"                             :n "r"   'agda2-refine
+       :desc "Auto"                               :n "a"   'agda2-auto
+       :desc "Goal type and context"              :n "t"   'agda2-goal-and-context
+       :desc "Goal type and context and inferred" :n ";"   'agda2-goal-and-context-and-inferred)))
+
+ (:after clojure-mode
+   (:map clojure-mode-map
+     :n "] f" 'forward-sexp
+     :n "[ f" 'backward-sexp))
+
+ (:after cider-mode
+   (:map cider-mode-map
+     :n "g SPC" 'cider-eval-buffer
+     :n "g \\"  'cider-switch-to-repl-buffer
+     :n "K"     'cider-doc
+     :n "g K"   'cider-grimoire
+     :n "g d"   'cider-find-dwim
+     :n "C-w ]" 'cider-find-dwim-other-window
+     :n "g RET" 'cider-test-run-ns-tests
+
+     "C-c C-r r" 'cljr-add-require-to-ns
+     "C-c C-r i" 'cljr-add-import-to-ns
+
+     (:localleader
+       ;; :desc "Inspect last result" :n "i" 'cider-inspect-last-result
+       ;; :desc "Search for documentation" :n "h s" 'cider-apropos-doc
+       :desc "Add require to ns" :n "n r" 'cljr-add-require-to-ns
+       :desc "Add import to ns" :n "n i" 'cljr-add-import-to-ns))
+   (:map cider-repl-mode-map
+     :n "g \\" 'cider-switch-to-last-clojure-buffer))
+
+ (:after w3m
+   (:map w3m-mode-map
+     "/" 'evil-search-forward
+     "?" 'evil-search-backward))
+
+ (:after org
+   :n "C-c C-x C-o" #'org-clock-out
+   (:map org-mode-map
+     [remap counsel-imenu] #'counsel-org-goto
+     "M-k" #'org-move-subtree-up
+     "M-j" #'org-move-subtree-down
      (:localleader
-       :desc "Apply action"  :n "e" 'intero-repl-eval-region
-       :desc "Rename symbol" :n "r" 'intero-apply-suggestions))
-
-  (:after agda2-mode
-    (:map agda2-mode-map
-      :n "g SPC" 'agda2-load
-      :n "g d"   'agda2-goto-definition-keyboard
-      :n "] g"   'agda2-next-goal
-      :n "[ g"   'agda2-previous-goal
-
-      (:localleader
-        :desc "Give"                               :n "SPC" 'agda2-give
-        :desc "Refine"                             :n "r"   'agda2-refine
-        :desc "Auto"                               :n "a"   'agda2-auto
-        :desc "Goal type and context"              :n "t"   'agda2-goal-and-context
-        :desc "Goal type and context and inferred" :n ";"   'agda2-goal-and-context-and-inferred)))
-
-  (:after clojure-mode
-    (:map clojure-mode-map
-      :n "] f" 'forward-sexp
-      :n "[ f" 'backward-sexp))
-
-  (:after cider-mode
-    (:map cider-mode-map
-      :n "g SPC" 'cider-eval-buffer
-      :n "g \\"  'cider-switch-to-repl-buffer
-      :n "K"     'cider-doc
-      :n "g K"   'cider-grimoire
-      :n "g d"   'cider-find-dwim
-      :n "C-w ]" 'cider-find-dwim-other-window
-      :n "g RET" 'cider-test-run-ns-tests
-
-      "C-c C-r r" 'cljr-add-require-to-ns
-      "C-c C-r i" 'cljr-add-import-to-ns
-
-      (:localleader
-        ;; :desc "Inspect last result" :n "i" 'cider-inspect-last-result
-        ;; :desc "Search for documentation" :n "h s" 'cider-apropos-doc
-        :desc "Add require to ns" :n "n r" 'cljr-add-require-to-ns
-        :desc "Add import to ns" :n "n i" 'cljr-add-import-to-ns))
-    (:map cider-repl-mode-map
-      :n "g \\" 'cider-switch-to-last-clojure-buffer))
-
-  (:after w3m
-    (:map w3m-mode-map
-      "/" 'evil-search-forward
-      "?" 'evil-search-backward))
-
-  (:after org
-    (:map org-mode-map
-      [remap counsel-imenu] #'counsel-org-goto
-      (:localleader
-        :n "g" #'counsel-org-goto))))
+       :n "g" #'counsel-org-goto))))
diff --git a/config.el b/config.el
index 5463d8319609..ffc25fa51796 100644
--- a/config.el
+++ b/config.el
@@ -12,6 +12,8 @@
 (after! rust
   (setq rust-format-on-save t))
 
+(load! "utils")
+
 ; (defconst rust-src-path
 ;   (-> "/Users/griffin/.cargo/bin/rustc --print sysroot"
 ;       shell-command-to-string
@@ -106,7 +108,9 @@
 (alist-set 'theme-overrides 'grfn-solarized-light
            `((font-lock-doc-face ((t (:foreground ,+solarized-s-base1))))
              (font-lock-preprocessor-face ((t (:foreground ,+solarized-red))))
-             (font-lock-keyword-face ((t (:foreground ,+solarized-green))))
+             (font-lock-keyword-face ((t (:foreground ,+solarized-green :bold nil))))
+             (font-lock-builtin-face ((t (:foreground ,+solarized-s-base01
+                                          :bold t))))
 
              (elixir-attribute-face ((t (:foreground ,+solarized-blue))))
              (elixir-atom-face ((t (:foreground ,+solarized-cyan))))
@@ -117,7 +121,8 @@
              (haskell-keyword-face ((t (:foreground ,+solarized-cyan))))))
 
 (setq solarized-use-variable-pitch nil
-      solarized-scale-org-headlines nil)
+      solarized-scale-org-headlines nil
+      solarized-use-less-bold t)
 
 (add-to-list 'custom-theme-load-path "~/.doom.d/themes")
 (load-theme 'grfn-solarized-light t)
@@ -129,7 +134,8 @@
 
 (add-hook! doom-post-init
   (set-face-attribute 'bold nil :weight 'ultra-light)
-  (set-face-bold-p 'bold nil))
+  (set-face-bold 'bold nil)
+  (enable-theme 'grfn-solarized-light))
 
 (defun rx-words (&rest words)
   (rx-to-string
@@ -273,7 +279,16 @@
 ;;             (hook-name)
 ;;             (symbol-name mode)))))
 
-(def-package! org-clubhouse)
+(def-package! org-clubhouse
+  :config
+  (setq org-clubhouse-state-alist
+        '(("PROPOSED" . "Proposed")
+          ("BACKLOG"  . "Backlog")
+          ("TODO"     . "Scheduled")
+          ("ACTIVE"   . "In Progress")
+          ("PR"       . "In Review")
+          ("TESTING"  . "In Testing")
+          ("DONE"     . "Completed"))))
 
 ; (require 'doom-themes)
 
@@ -409,7 +424,8 @@
    org-agenda-custom-commands
    '(("p" "Sprint Tasks" tags-todo "sprint")
      ("i" "Inbox" tags "inbox")
-     ("r" "Running jobs" todo "RUNNING")))
+     ("r" "Running jobs" todo "RUNNING")
+     ("w" "@Work" tags-todo "@work")))
 
   (set-face-foreground 'org-block +solarized-s-base00)
   (add-hook! org-mode
@@ -420,9 +436,10 @@
   )
 
 (after! magit
-  (setq git-commit-summary-max-length 50)
-  (require 'magit-gh-pulls)
-  (add-hook 'magit-mode-hook 'turn-on-magit-gh-pulls))
+  (setq git-commit-summary-max-length 50))
+
+;; (def-package! forge
+;;   :after magit)
 
 (comment
 
@@ -471,7 +488,7 @@
 (load! "slack-snippets")
 
 (after! magit
-  (require 'evil-magit)
+  ;; (require 'evil-magit)
   ;; (require 'magithub)
   )
 
@@ -581,12 +598,12 @@
 
 ;; Auto-format Haskell on save, with a combination of hindent + brittany
 
-(define-minor-mode brittany-haskell-mode
-  :init-value nil
-  :group 'haskell
-  :lighter "Brittany-Haskell"
-  :keymap '()
-  )
+; (define-minor-mode brittany-haskell-mode
+;   :init-value nil
+;   :group 'haskell
+;   :lighter "Brittany-Haskell"
+;   :keymap '()
+;   )
 
 
 (defun urbint/format-haskell-source ()
@@ -620,6 +637,7 @@
 (require 'slack)
 (setq slack-buffer-emojify 't
       slack-prefer-current-team 't)
+
 (require 'alert)
 (setq alert-default-style 'libnotify)
 
@@ -634,13 +652,15 @@
 
 (setq projectile-create-missing-test-files 't)
 
-(defun magit-commit-wip ()
-  (interactive)
-  (magit-commit '("-m" "wip")))
-
 (after! magit
-  (magit-define-popup-action 'magit-commit-popup
-    ?W "WIP" 'magit-commit-wip))
+  (define-suffix-command magit-commit-wip ()
+    (interactive)
+    (magit-commit-create '("-m" "wip")))
+
+  (transient-append-suffix
+    #'magit-commit
+    ["c"]
+    (list "W" "Commit WIP" #'magit-commit-wip)))
 
 ;; (defun grfn/split-window-more-sensibly (&optional window)
 ;;   (let ((window (or window (selected-window))))
@@ -838,11 +858,14 @@
     (context 2)
     (checking 3)
     (match 1)
-    (domonad 0)))
+    (domonad 0)
+    (describe 1)
+    (before 1)
+    (it 2)))
 
 (def-package! flycheck-clojure
-  :disabled t
-  :after flycheck
+  ;; :disabled t
+  :after (flycheck cider)
   :config
   (flycheck-clojure-setup))
 
@@ -878,3 +901,20 @@
   (add-to-list 'org-babel-load-languages '(ipython . t))
   (setq ob-ipython-command
         "/home/griffin/code/urb/ciml-video-classifier/bin/jupyter"))
+
+(def-package! counsel-spotify)
+
+(def-package! evil-snipe :disabled t)
+(evil-snipe-mode -1)
+
+(def-package! rainbow-mode)
+
+(def-package! org-alert
+  :config
+  (org-alert-enable)
+  (setq alert-default-style 'libnotify
+        org-alert-headline-title "org"))
+
+(def-package! ob-async)
+
+(enable-theme 'grfn-solarized-light)
diff --git a/init.el b/init.el
index af5ae023701b..ca4a89069e84 100644
--- a/init.el
+++ b/init.el
@@ -6,12 +6,10 @@
        (evil +everywhere); come to the dark side, we have cookies
        file-templates    ; auto-snippets for empty files
        (lookup           ; helps you navigate your code and documentation
-        +devdocs         ; ...on devdocs.io online
         +docsets)        ; ...or in Dash docsets locally
        snippets          ; my elves. They type so I don't have to
        spellcheck        ; tasing you for misspelling mispelling
-       (syntax-checker   ; tasing you for every semicolon you forget
-        +childframe)     ; use childframes for error popups (Emacs 26+ only)
+       syntax-checker    ; tasing you for every semicolon you forget
        workspaces        ; tab emulation, persistence & separate workspaces
 
        :completion
@@ -26,12 +24,11 @@
        :ui
        doom              ; what makes DOOM look the way it does
        doom-dashboard    ; a nifty splash screen for Emacs
-       doom-modeline     ; a snazzy Atom-inspired mode-line
        doom-quit         ; DOOM quit-message prompts when you quit Emacs
        evil-goggles      ; display visual hints when editing in evil
        fci               ; a `fill-column' indicator
        hl-todo           ; highlight TODO/FIXME/NOTE tags
-      ;modeline          ; snazzy, Atom-inspired modeline, plus API
+       modeline          ; snazzy, Atom-inspired modeline, plus API
        nav-flash         ; blink the current line after jumping
       ;neotree           ; a project drawer, like NERDTree for vim
       ;treemacs          ; a project drawer, like neotree but cooler
@@ -46,26 +43,32 @@
        window-select     ; visually switch windows
 
        :editor
-      ;(format +onsave)  ; automated prettiness
-      ;multiple-cursors  ; editing in many places at once
-      ;parinfer          ; turn lisp into python, sort of
+       fold
+       ;; (format +onsave)  ; automated prettiness
+       ;;lispy             ; vim for lisp, for people who dont like vim
+       ;;multiple-cursors  ; editing in many places at once
+       ;;parinfer          ; turn lisp into python, sort of
        rotate-text       ; cycle region at point between text candidates
 
        :emacs
-       dired             ; making dired pretty [functional]
-       ediff             ; comparing files in Emacs
+       (dired            ; making dired pretty [functional]
+       ;;+ranger         ; bringing the goodness of ranger to dired
+       ;;+icons          ; colorful icons for dired-mode
+        )
        electric          ; smarter, keyword-based electric-indent
-      ;eshell            ; a consistent, cross-platform shell (WIP)
-       hideshow          ; basic code-folding support
+       ;;eshell            ; a consistent, cross-platform shell (WIP)
        imenu             ; an imenu sidebar and searchable code index
-      ;term              ; terminals in Emacs
+       ;;term              ; terminals in Emacs
        vc                ; version-control and Emacs, sitting in a tree
 
        :tools
        docker
        editorconfig      ; let someone else argue about tabs vs spaces
-      ;ein               ; tame Jupyter notebooks with emacs
+       ein               ; tame Jupyter notebooks with emacs
+       flycheck          ; tasing you for every semicolon you forget
+       flyspell          ; tasing you for misspelling mispelling
        gist              ; interacting with github gists
+       lsp
       ;macos             ; MacOS-specific commands
        make              ; run make tasks from Emacs
        magit             ;
@@ -73,58 +76,61 @@
        pdf               ; pdf enhancements
       ;prodigy           ; FIXME managing external services & code builders
       ;rgb               ; creating color strings
-      ;tmux              ; an API for interacting with tmux
-      ;upload            ; map local to remote projects via ssh/ftp
-      ;wakatime
+       ;;terraform         ; infrastructure as code
+       ;;tmux              ; an API for interacting with tmux
+       ;;upload            ; map local to remote projects via ssh/ftp
+       ;;wakatime
 
        :lang
-      ;assembly          ; assembly for fun or debugging
-      ;(cc +irony +rtags); C/C++/Obj-C madness
+       ;;assembly          ; assembly for fun or debugging
+       ;;(cc +irony +rtags); C/C++/Obj-C madness
        clojure           ; java with a lisp
-      ;common-lisp       ; if you've seen one lisp, you've seen them all
-      ;crystal           ; ruby at the speed of c
-      ;csharp            ; unity, .NET, and mono shenanigans
+       ;;common-lisp       ; if you've seen one lisp, you've seen them all
+       coq               ; proofs-as-programs
+       ;;crystal           ; 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
-      ;elm               ; care for a cup of TEA?
+       ;;elm               ; care for a cup of TEA?
        emacs-lisp        ; drown in parentheses
-      ;ess               ; emacs speaks statistics
-      ;go                ; the hipster dialect
-      (haskell +intero) ; a language that's lazier than I am
-       ;; haskell           ; a language that's lazier than I am
-      ;hy                ; readability of scheme w/ speed of python
-      ;(java +meghanada) ; the poster child for carpal tunnel syndrome
+       ;;ess               ; emacs speaks statistics
+       ;;go                ; 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))))))
-      ;julia             ; a better, faster MATLAB
-       latex             ; writing papers in Emacs has never been so fun
-      ;ledger            ; an accounting system in Emacs
-      ;lua               ; one-based indices? one-based indices
+       julia             ; a better, faster MATLAB
+       ;;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
-       nix               ; I hereby declare "nix geht mehr!"
-      ;ocaml             ; an objective camel
+       ;;nim               ; 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
         +attach          ; custom attachment system
         +babel           ; running code in org
         +capture         ; org-capture in and outside of Emacs
         +export          ; Exporting org to whatever you want
         +present)        ; Emacs for presentations
-      ;perl              ; write code no one else can comprehend
-      ;php               ; perl's insecure younger brother
-      ;plantuml          ; diagrams for confusing people more
-      ;purescript        ; javascript, but functional
+       ;;perl              ; write code no one else can comprehend
+       ;;php               ; perl's insecure younger brother
+       ;;plantuml          ; diagrams for confusing people more
+       purescript        ; javascript, but functional
        python            ; beautiful is better than ugly
-      ;qt                ; the 'cutest' gui framework ever
-      ;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
-       (sh +fish)        ; she sells (ba|z)sh shells on the C xor
-      ;solidity          ; do you need a blockchain? No.
-      ;swift             ; who asked for emoji variables?
-       web               ; the tubes
+       ;;qt                ; the 'cutest' gui framework ever
+       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
+       (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?
+       ;;web               ; the tubes
+       ;;vala              ; GObjective-C
 
        ;; Applications are complex and opinionated modules that transform Emacs
        ;; toward a specific purpose. They may have additional dependencies and
diff --git a/packages.el b/packages.el
index acf776dab14c..e57037e8319b 100644
--- a/packages.el
+++ b/packages.el
@@ -3,6 +3,8 @@
 
 ;; (package! 'tide :disable t)
 
+(package! moody)
+
 ;; Editor
 (package! solarized-theme)
 (package! fill-column-indicator)
@@ -15,14 +17,17 @@
 (package! writeroom-mode)
 (package! dash)
 (package! w3m)
+(package! rainbow-mode)
 
 ;;; Org
 (package! org-clubhouse
   :recipe (org-clubhouse
            :fetcher file
            :path "~/code/urb/org-clubhouse"))
+(package! org-alert)
 (package! ob-http)
 (package! ob-ipython)
+(package! ob-async)
 
 ;; Presentation
 (package! epresent)
@@ -35,10 +40,8 @@
 
 ;; Git
 (package! evil-magit)
-(package! magithub)
-(package! magit-gh-pulls)
 (package! marshal)
-; (package! auth-password-store)
+(package! forge)
 
 ;; Elisp
 (package! dash)
@@ -87,3 +90,6 @@
 
 ;;; Python
 (package! yapfify)
+
+;;; Desktop interaction
+(package! counsel-spotify)