dev: merge branch 'master' of github.com:doomemacs
This commit is contained in:
commit
3770a8d88f
20 changed files with 130 additions and 46 deletions
|
@ -486,7 +486,8 @@ files, so this replace calls to `pp' with the much faster `prin1'."
|
|||
|
||||
(defun doom-set-jump-h ()
|
||||
"Run `better-jumper-set-jump' but return nil, for short-circuiting hooks."
|
||||
(better-jumper-set-jump)
|
||||
(when (get-buffer-window)
|
||||
(better-jumper-set-jump))
|
||||
nil)
|
||||
|
||||
;; Creates a jump point before killing a buffer. This allows you to undo
|
||||
|
@ -495,7 +496,7 @@ files, so this replace calls to `pp' with the much faster `prin1'."
|
|||
;;
|
||||
;; I'm not advising `kill-buffer' because I only want this to affect
|
||||
;; interactively killed buffers.
|
||||
(advice-add #'kill-current-buffer :around #'doom-set-jump-a)
|
||||
(add-hook 'kill-buffer-hook #'doom-set-jump-h)
|
||||
|
||||
;; Create a jump point before jumping with imenu.
|
||||
(advice-add #'imenu :around #'doom-set-jump-a))
|
||||
|
|
|
@ -568,7 +568,7 @@ elsewhere."
|
|||
nil))))
|
||||
;; Merge given plist with pre-existing one
|
||||
(cl-loop for (key value) on (list ,@plist) by 'cddr
|
||||
when value
|
||||
when (or (eq key :pin) value)
|
||||
do (cl-callf plist-put plist key value))
|
||||
;; Some basic key validation; throws an error on invalid properties
|
||||
(condition-case e
|
||||
|
|
|
@ -247,6 +247,12 @@
|
|||
Defaults to ~/.config/doom, ~/.doom.d or the value of the DOOMDIR envvar;
|
||||
whichever is found first. Must end in a slash.")
|
||||
|
||||
(defvar doom-bin-dir (expand-file-name "bin/" doom-emacs-dir)
|
||||
"Where Doom's executables are stored.
|
||||
|
||||
Defaults to $EMACSDIR/bin, where $EMACSDIR is `doom-emacs-dir'. Must end in a
|
||||
slash.")
|
||||
|
||||
;; DEPRECATED: .local will be removed entirely in 3.0
|
||||
(defvar doom-local-dir
|
||||
(if-let (localdir (getenv-internal "DOOMLOCALDIR"))
|
||||
|
|
|
@ -55,20 +55,30 @@ And jumps to your `doom!' block."
|
|||
|
||||
(defmacro doom--if-compile (command on-success &optional on-failure)
|
||||
(declare (indent 2))
|
||||
`(let ((default-directory doom-emacs-dir))
|
||||
(with-current-buffer (compile ,command t)
|
||||
(let ((w (get-buffer-window (current-buffer))))
|
||||
(select-window w)
|
||||
(add-hook
|
||||
'compilation-finish-functions
|
||||
(lambda (_buf status)
|
||||
(if (equal status "finished\n")
|
||||
(progn
|
||||
(delete-window w)
|
||||
,on-success)
|
||||
,on-failure))
|
||||
nil 'local)))))
|
||||
`(let ((default-directory doom-emacs-dir)
|
||||
(exec-path (cons doom-bin-dir exec-path)))
|
||||
;; Ensure the bin/doom operates with the same environment as this
|
||||
;; running session.
|
||||
(letenv! (("EMACS" (doom-path invocation-directory invocation-name))
|
||||
("EMACSDIR" doom-emacs-dir)
|
||||
("DOOMDIR" doom-user-dir)
|
||||
("DOOMLOCALDIR" doom-local-dir)
|
||||
("DEBUG" (and doom-debug-mode "1")))
|
||||
(with-current-buffer (compile ,command t)
|
||||
(let ((w (get-buffer-window (current-buffer))))
|
||||
(select-window w)
|
||||
(add-hook
|
||||
'compilation-finish-functions
|
||||
(lambda (_buf status)
|
||||
(if (equal status "finished\n")
|
||||
(progn
|
||||
(delete-window w)
|
||||
,on-success)
|
||||
,on-failure))
|
||||
nil 'local))))))
|
||||
|
||||
(defvar doom-reload-command "doom sync -B -e"
|
||||
"Command that `doom/reload' runs.")
|
||||
;;;###autoload
|
||||
(defun doom/reload ()
|
||||
"Reloads your private config.
|
||||
|
@ -83,7 +93,7 @@ package list, and lastly, reloads your private config.el.
|
|||
Runs `doom-after-reload-hook' afterwards."
|
||||
(interactive)
|
||||
(mapc #'require (cdr doom-incremental-packages))
|
||||
(doom--if-compile (format "%S sync -e" doom-bin)
|
||||
(doom--if-compile doom-reload-command
|
||||
(doom-context-with '(reload modules)
|
||||
(doom-run-hooks 'doom-before-reload-hook)
|
||||
(doom-load (file-name-concat doom-user-dir doom-module-init-file) t)
|
||||
|
@ -131,10 +141,12 @@ imported into Emacs."
|
|||
(doom-load-envvars-file doom-env-file)
|
||||
(message "Reloaded %S" (abbreviate-file-name doom-env-file))))))
|
||||
|
||||
(defvar doom-upgrade-command "doom upgrade -B --force"
|
||||
"Command that `doom/upgrade' runs.")
|
||||
;;;###autoload
|
||||
(defun doom/upgrade ()
|
||||
"Run 'doom upgrade' then prompt to restart Emacs."
|
||||
(interactive)
|
||||
(doom--if-compile (format "%S upgrade --force" doom-bin)
|
||||
(doom--if-compile doom-upgrade-command
|
||||
(when (y-or-n-p "You must restart Emacs for the upgrade to take effect.\n\nRestart Emacs?")
|
||||
(doom/restart-and-restore))))
|
||||
|
|
|
@ -13,11 +13,15 @@ Read RSS feeds in the comfort of Emacs.
|
|||
- +org ::
|
||||
Enable [[doom-package:elfeed-org]], so you can configure your feeds with an org file
|
||||
(={org-directory}/elfeed.org=) rather than Elisp.
|
||||
- +youtube ::
|
||||
Enable [[doom-package:elfeed-tube]], for tighter integration between elfeed and
|
||||
your Youtube subscriptions.
|
||||
|
||||
** Packages
|
||||
- [[doom-package:elfeed]]
|
||||
- [[doom-package:elfeed-goodies]]
|
||||
- [[doom-package:elfeed-org]] if [[doom-module:+org]]
|
||||
- [[doom-package:elfeed-tube]] if [[doom-module:+youtube]]
|
||||
|
||||
** Hacks
|
||||
- By default ~elfeed-search-filter~ is set to ~@2-weeks-ago~ and makes the last
|
||||
|
|
|
@ -89,3 +89,17 @@ easier to scroll through.")
|
|||
:after elfeed
|
||||
:config
|
||||
(elfeed-goodies/setup))
|
||||
|
||||
|
||||
(use-package! elfeed-tube
|
||||
:when (modulep! +youtube)
|
||||
:after elfeed
|
||||
:config (elfeed-tube-setup)
|
||||
(map! (:map elfeed-show-mode-map
|
||||
[remap save-buffer] #'elfeed-tube-save
|
||||
"F" #'elfeed-tube-fetch)
|
||||
(:map elfeed-search-mode-map
|
||||
[remap save-buffer] #'elfeed-tube-save
|
||||
"F" #'elfeed-tube-fetch
|
||||
"C-c C-f" #'elfeed-tube-mpv-follow-mode
|
||||
"C-c C-w" #'elfeed-tube-mpv-where)))
|
||||
|
|
9
modules/app/rss/doctor.el
Normal file
9
modules/app/rss/doctor.el
Normal file
|
@ -0,0 +1,9 @@
|
|||
;;; app/rss/doctor.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (modulep! +youtube)
|
||||
(unless (executable-find "mpv")
|
||||
(warn! "Couldn't find the mpv executable. Live transcripts with elfeed-tube-mpv will not work."))
|
||||
|
||||
(unless (or (executable-find "youtube-dl")
|
||||
(executable-find "yt-dlp"))
|
||||
(warn! "Couldn't find the 'youtube-dl' or 'yt-dlp' executables. Live transcripts with elfeed-tube-mpv will not work.")))
|
|
@ -5,3 +5,5 @@
|
|||
(package! elfeed-goodies :pin "544ef42ead011d960a0ad1c1d34df5d222461a6b")
|
||||
(when (modulep! +org)
|
||||
(package! elfeed-org :pin "d62d23e25c5e3be3d70b7fbe1eaeb6e43f93a061"))
|
||||
(when (modulep! +youtube)
|
||||
(package! elfeed-tube :pin "0c3fbc21259e1fa794f3179a53b410ba610231f2"))
|
||||
|
|
|
@ -75,13 +75,13 @@ orderless."
|
|||
(apply fn args)))
|
||||
|
||||
(setq orderless-affix-dispatch-alist
|
||||
`((?! . ,#'orderless-without-literal)
|
||||
(?& . ,#'orderless-annotation)
|
||||
(?% . ,#'char-fold-to-regexp)
|
||||
(?` . ,#'orderless-initialism)
|
||||
(?= . ,#'orderless-literal)
|
||||
(?^ . ,#'orderless-literal-prefix)
|
||||
(?~ . ,#'orderless-flex)))
|
||||
'((?! . orderless-without-literal)
|
||||
(?& . orderless-annotation)
|
||||
(?% . char-fold-to-regexp)
|
||||
(?` . orderless-initialism)
|
||||
(?= . orderless-literal)
|
||||
(?^ . orderless-literal-prefix)
|
||||
(?~ . orderless-flex)))
|
||||
|
||||
(defun +vertico-orderless-dispatch (pattern _index _total)
|
||||
(cond
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
lisp-mode
|
||||
racket-mode
|
||||
fennel-mode
|
||||
hy-mode) . parinfer-rust-mode)
|
||||
hy-mode
|
||||
dune-mode) . parinfer-rust-mode)
|
||||
:init
|
||||
(setq parinfer-rust-library
|
||||
(file-name-concat
|
||||
|
|
|
@ -188,13 +188,18 @@ Fixes #3939: unsortable dired entries on Windows."
|
|||
|
||||
;; HACK: Kill Dirvish session before switching projects/workspaces, otherwise
|
||||
;; it errors out on trying to delete/change dedicated windows.
|
||||
(add-hook! '(persp-before-kill-functions projectile-before-switch-project-hook)
|
||||
(add-hook! '(persp-before-kill-functions
|
||||
persp-before-switch-functions
|
||||
projectile-before-switch-project-hook)
|
||||
(defun +dired--cleanup-dirvish-h (&rest _)
|
||||
(when-let ((win
|
||||
(or (and (featurep 'dirvish-side)
|
||||
(dirvish-side--session-visible-p))
|
||||
(and dirvish--this (selected-window)))))
|
||||
(delete-window win))))
|
||||
(when-let ((dv (cl-loop for w in (window-list)
|
||||
if (or (window-parameter w 'window-side)
|
||||
(window-dedicated-p w))
|
||||
if (with-current-buffer (window-buffer w) (dirvish-curr))
|
||||
return it)))
|
||||
(let (dirvish-reuse-session)
|
||||
(with-selected-window (dv-root-window dv)
|
||||
(dirvish-quit))))))
|
||||
|
||||
;; HACK: If a directory has a .dir-locals.el, its settings could
|
||||
;; interfere/crash Dirvish trying to preview it.
|
||||
|
|
|
@ -122,13 +122,34 @@
|
|||
(with-current-buffer nrepl-server-buffer
|
||||
(buffer-string)))))))
|
||||
|
||||
;; When in cider-debug-mode, override evil keys to not interfere with debug keys
|
||||
(after! evil
|
||||
(add-hook! cider--debug-mode
|
||||
(defun +clojure--cider-setup-debug ()
|
||||
"Setup cider debug to override evil keys cleanly"
|
||||
(evil-make-overriding-map cider--debug-mode-map 'normal)
|
||||
(evil-normalize-keymaps))))
|
||||
(if (modulep! :editor evil +everywhere)
|
||||
;; Match evil-collection keybindings to debugging overlay
|
||||
(after! (cider-debug evil-collection-cider)
|
||||
(mapc
|
||||
(lambda (replacement)
|
||||
(let* ((from (car replacement))
|
||||
(to (cadr replacement))
|
||||
(item (assoc from cider-debug-prompt-commands)))
|
||||
;; Position matters, hence the update-in-place
|
||||
(setf (car item) (car to))
|
||||
(setf (cdr item) (cdr to))))
|
||||
'((?h (?H "here" "Here"))
|
||||
(?i (?I "in" "In"))
|
||||
(?j (?J "inject" "inJect"))
|
||||
(?l (?L "locals" "Locals"))))
|
||||
|
||||
;; Prevent evil-snipe from overriding evil-collection
|
||||
(add-hook! cider--debug-mode
|
||||
'turn-off-evil-snipe-mode
|
||||
'turn-off-evil-snipe-override-mode))
|
||||
|
||||
;; When in cider-debug-mode, override evil keys to not interfere with debug keys
|
||||
(add-hook! cider--debug-mode
|
||||
(defun +clojure--cider-setup-debug ()
|
||||
"Setup cider debug to override evil keys cleanly"
|
||||
(evil-make-overriding-map cider--debug-mode-map 'normal)
|
||||
(evil-normalize-keymaps)))))
|
||||
|
||||
(when (modulep! :ui modeline +light)
|
||||
(defvar-local cider-modeline-icon nil)
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
;; The `.for' extension is automatically recognized by Emacs and invokes
|
||||
;; `fortran-mode', but not its capital variant `.FOR'. Many old files are
|
||||
;; named the latter way, so we account for that manually here.
|
||||
:mode ("\\.FOR$" . fortran-mode)
|
||||
:mode ("\\.FOR\\'" . fortran-mode)
|
||||
:config
|
||||
;; Or else Flycheck will get very mad.
|
||||
(setq flycheck-gfortran-language-standard "legacy")
|
||||
|
|
|
@ -47,7 +47,7 @@ If the depth is 2, the first two directories are removed: net.lissner.game.")
|
|||
|
||||
|
||||
(use-package! groovy-mode
|
||||
:mode "\\.g\\(?:radle\\|roovy\\)$"
|
||||
:mode "\\.g\\(?:radle\\|roovy\\)\\'"
|
||||
:config
|
||||
(set-docsets! 'groovy-mode "Groovy" "Groovy_JDK")
|
||||
(set-eval-handler! 'groovy-mode "groovy")
|
||||
|
|
|
@ -134,3 +134,10 @@
|
|||
|
||||
(when (modulep! +tree-sitter)
|
||||
(add-hook 'tuareg-mode-local-vars-hook #'tree-sitter!))
|
||||
|
||||
|
||||
(use-package! dune
|
||||
:defer t
|
||||
:config
|
||||
(set-formatter! 'format-dune-file '("dune" "format-dune-file")
|
||||
:modes '(dune-mode)))
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
|
||||
(use-package! hack-mode
|
||||
:when (modulep! +hack)
|
||||
:mode "\\.hh$")
|
||||
:mode "\\.hh\\'")
|
||||
|
||||
|
||||
(use-package! composer
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
(package! php-extras
|
||||
:recipe (:host github :repo "arnested/php-extras")
|
||||
:pin "d410c5af663c30c01d461ac476d1cbfbacb49367")
|
||||
(package! php-mode :pin "4792988a120d6ac515ba16605278d04cb8be0d69")
|
||||
(package! php-mode :pin "59814bd80c59894022bc5950fb3bdf02420e8a89")
|
||||
(package! php-refactor-mode :pin "7a794b0618df2882b1bd586fdd698dba0bc5130d")
|
||||
(package! phpunit :pin "650a50898de1fa4eeb47360b12aeb1126b2448c2")
|
||||
(package! composer :pin "42cf9848d438f8dc4c07ac684a83280ace7bb94c")
|
||||
(package! composer :pin "791a7104be2ef2748757a186094c1e8f7f531a01")
|
||||
|
||||
(when (modulep! +hack)
|
||||
(package! hack-mode
|
||||
|
@ -16,4 +16,4 @@
|
|||
:pin "ccf20511f0f2ed45d00d423c703bb91ab6a8b80c"))
|
||||
|
||||
;; For building php-extras
|
||||
(package! async :pin "cff2bd0be3c78a2eb76717eed60302972fe9b8c5")
|
||||
(package! async :pin "f317b0c9c3e60a959f45d035ed5e31a78f1263ac")
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
;;; Packages
|
||||
|
||||
(use-package! rustic
|
||||
:mode ("\\.rs$" . rustic-mode)
|
||||
:mode ("\\.rs\\'" . rustic-mode)
|
||||
:preface
|
||||
;; HACK `rustic' sets up some things too early. I'd rather disable it and let
|
||||
;; our respective modules standardize how they're initialized.
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
:config
|
||||
(set-popup-rule! "^\\*vterm" :size 0.25 :vslot -4 :select t :quit nil :ttl 0)
|
||||
|
||||
(map! :map vterm-mode-map "C-q" #'vterm-send-next-key)
|
||||
|
||||
;; Once vterm is dead, the vterm buffer is useless. Why keep it around? We can
|
||||
;; spawn another if want one.
|
||||
(setq vterm-kill-buffer-on-exit t)
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
|
||||
(use-package! jinja2-mode
|
||||
:mode "\\.j2$"
|
||||
:mode "\\.j2\\'"
|
||||
:config
|
||||
;; The default behavior is to reindent the whole buffer on save. This is
|
||||
;; disruptive and imposing. There are indentation commands available; the user
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue