dev: merge branch 'master'

This commit is contained in:
Matt Nish-Lapidus 2024-08-31 10:36:01 -04:00
commit cf4462683f
5 changed files with 64 additions and 32 deletions

View file

@ -59,7 +59,14 @@ Fixes #3939: unsortable dired entries on Windows."
(not (eq revert-buffer-function #'dired-virtual-revert)))
;; To be consistent with vertico/ivy/helm+wgrep integration
(define-key dired-mode-map (kbd "C-c C-e") #'wdired-change-to-wdired-mode))
(define-key dired-mode-map (kbd "C-c C-e") #'wdired-change-to-wdired-mode)
;; On ESC, abort `wdired-mode' (will prompt)
(add-hook! 'doom-escape-hook
(defun +dired-wdired-exit-h ()
(when (eq major-mode 'wdired-mode)
(wdired-exit)
t))))
(use-package! dirvish

View file

@ -128,6 +128,9 @@ If no viewer is found, `latex-preview-pane-mode' is used.")
:hook (TeX-mode . +latex-TeX-fold-buffer-h)
:hook (TeX-mode . TeX-fold-mode)
:config
;; Reveal folds when moving cursor into them. This saves us the trouble of
;; having to whitelist all motion commands in `TeX-fold-auto-reveal-commands'.
(setq TeX-fold-auto-reveal t)
(defun +latex-TeX-fold-buffer-h ()
(run-with-idle-timer 0 nil 'TeX-fold-buffer))
;; Fold after all AUCTeX macro insertions.

View file

@ -46,4 +46,25 @@
;; Add support for the Kitty keyboard protocol.
(use-package! kkp
:hook (after-init . global-kkp-mode))
:hook (after-init . global-kkp-mode)
:config
;; HACK: Emacs falls back to RET, TAB, and/or DEL if [return], [tab], and/or
;; [backspace] are unbound, but this isn't the case for all input events,
;; like these, which don't fall back to M-RET, M-TAB, etc. Therefore making
;; these keybinds inaccessible in KKP supported terminals.
;; REVIEW: See benjaminor/kkp#13.
(define-key! local-function-key-map
[M-return] (kbd "M-RET")
[M-tab] (kbd "M-TAB")
[M-backspace] (kbd "M-DEL")
[M-delete] (kbd "M-DEL"))
;; HACK: Allow C-i to function independently of TAB in KKP-supported
;; terminals. Requires the `input-decode-map' entry in
;; lisp/doom-keybinds.el.
(define-key! key-translation-map
[?\C-i] (cmd! (if-let (((kkp--terminal-has-active-kkp-p))
(keys (this-single-command-raw-keys))
((> (length keys) 2))
((equal (cl-subseq keys -3) [27 91 49])))
[C-i] [?\C-i]))))