Add tools/gist
This commit is contained in:
parent
eb8759041f
commit
e12ee964ca
7 changed files with 76 additions and 6 deletions
33
modules/tools/gist/config.el
Normal file
33
modules/tools/gist/config.el
Normal file
|
@ -0,0 +1,33 @@
|
|||
;;; tools/gist/config.el
|
||||
|
||||
;; NOTE On occasion, the cache gets corrupted, causing wrong-type-argument
|
||||
;; errors. If that happens, try `+gist/kill-cache'. You may have to restart
|
||||
;; Emacs.
|
||||
|
||||
(def-package! gist
|
||||
:commands (gist-list gist-region-or-buffer-private gist-region-or-buffer)
|
||||
:init
|
||||
(add-hook 'gist-mode-hook #'doom-buffer-mode)
|
||||
:config
|
||||
(set! :popup "*github:gists*" :size 15 :select t :autokill t)
|
||||
|
||||
;; evil-ify gist listing
|
||||
(set! :evil-state 'gist-list-mode 'normal)
|
||||
(map! :map gist-list-menu-mode-map
|
||||
:n "RET" '+gist/open-current
|
||||
:n "d" 'gist-kill-current
|
||||
:n "r" 'gist-list-reload
|
||||
:n "c" 'gist-add-buffer
|
||||
:n "y" 'gist-print-current-url
|
||||
:n "b" 'gist-browse-current-url
|
||||
:n "s" 'gist-star
|
||||
:n "S" 'gist-unstar
|
||||
:n "f" 'gist-fork
|
||||
:n "q" 'quit-window)
|
||||
|
||||
(when (bound-and-true-p shackle-mode)
|
||||
(defun +gist*list-render (orig-fn &rest args)
|
||||
(funcall orig-fn (car args) t)
|
||||
(unless (cadr args)
|
||||
(doom-popup-buffer (current-buffer))))
|
||||
(advice-add #'gist-list-render :around #'+gist*list-render)))
|
Loading…
Add table
Add a link
Reference in a new issue