Update
This commit is contained in:
@@ -187,7 +187,40 @@
|
|||||||
("M-." . my-embark-preview))
|
("M-." . my-embark-preview))
|
||||||
:init
|
:init
|
||||||
;; Optionally replace the key help with a completing-read interface
|
;; Optionally replace the key help with a completing-read interface
|
||||||
(setq prefix-help-command #'embark-prefix-help-command))
|
(setq prefix-help-command #'embark-prefix-help-command)
|
||||||
|
:config
|
||||||
|
(eval-when-compile
|
||||||
|
(defmacro my/embark-ace-action (fn)
|
||||||
|
`(defun ,(intern (concat "my/embark-ace-" (symbol-name fn))) ()
|
||||||
|
(interactive)
|
||||||
|
(with-demoted-errors "%s"
|
||||||
|
(require 'ace-window)
|
||||||
|
(let ((aw-dispatch-always t))
|
||||||
|
(aw-switch-to-window (aw-select nil))
|
||||||
|
(call-interactively (symbol-function ',fn)))))))
|
||||||
|
|
||||||
|
(define-key embark-file-map (kbd "o") (my/embark-ace-action find-file))
|
||||||
|
(define-key embark-buffer-map (kbd "o") (my/embark-ace-action switch-to-buffer))
|
||||||
|
(define-key embark-bookmark-map (kbd "o") (my/embark-ace-action bookmark-jump))
|
||||||
|
(eval-when-compile
|
||||||
|
(defmacro my/embark-split-action (fn split-type)
|
||||||
|
`(defun ,(intern (concat "my/embark-"
|
||||||
|
(symbol-name fn)
|
||||||
|
"-"
|
||||||
|
(car (last (split-string
|
||||||
|
(symbol-name split-type) "-"))))) ()
|
||||||
|
(interactive)
|
||||||
|
(funcall #',split-type)
|
||||||
|
(call-interactively #',fn))))
|
||||||
|
|
||||||
|
(define-key embark-file-map (kbd "2") (my/embark-split-action find-file split-window-below))
|
||||||
|
(define-key embark-buffer-map (kbd "2") (my/embark-split-action switch-to-buffer split-window-below))
|
||||||
|
(define-key embark-bookmark-map (kbd "2") (my/embark-split-action bookmark-jump split-window-below))
|
||||||
|
|
||||||
|
(define-key embark-file-map (kbd "3") (my/embark-split-action find-file split-window-right))
|
||||||
|
(define-key embark-buffer-map (kbd "3") (my/embark-split-action switch-to-buffer split-window-right))
|
||||||
|
(define-key embark-bookmark-map (kbd "3") (my/embark-split-action bookmark-jump split-window-right)))
|
||||||
|
|
||||||
(use-package embark-consult
|
(use-package embark-consult
|
||||||
:bind (:map minibuffer-mode-map
|
:bind (:map minibuffer-mode-map
|
||||||
("C-c C-o" . embark-export))
|
("C-c C-o" . embark-export))
|
||||||
|
|||||||
@@ -62,7 +62,8 @@
|
|||||||
(pcase system-type
|
(pcase system-type
|
||||||
('darwin ; macOS
|
('darwin ; macOS
|
||||||
(set-face-attribute 'default nil :font "Sarasa Term SC-20") ; 20 * 1.5
|
(set-face-attribute 'default nil :font "Sarasa Term SC-20") ; 20 * 1.5
|
||||||
;; (set-face-attribute 'variable-pitch nil :font "Bookerly-18" :weight 'light)
|
(set-face-attribute 'variable-pitch nil :font "Bookerly-18" :weight 'light)
|
||||||
|
(set-face-attribute 'fixed-pitch nil :font "Sarasa Term SC-20")
|
||||||
|
|
||||||
(add-to-list 'default-frame-alist '(height . 53))
|
(add-to-list 'default-frame-alist '(height . 53))
|
||||||
(add-to-list 'default-frame-alist '(width . 120)))
|
(add-to-list 'default-frame-alist '(width . 120)))
|
||||||
@@ -72,9 +73,8 @@
|
|||||||
(add-to-list 'default-frame-alist '(height . 40))
|
(add-to-list 'default-frame-alist '(height . 40))
|
||||||
(add-to-list 'default-frame-alist '(width . 90))))
|
(add-to-list 'default-frame-alist '(width . 90))))
|
||||||
|
|
||||||
;; (use-package mixed-pitch
|
(use-package mixed-pitch
|
||||||
;; :hook text-mode
|
:hook org-mode)
|
||||||
;; :hook org-mode)
|
|
||||||
|
|
||||||
(use-package diff-hl
|
(use-package diff-hl
|
||||||
:init (global-diff-hl-mode))
|
:init (global-diff-hl-mode))
|
||||||
|
|||||||
@@ -33,9 +33,10 @@
|
|||||||
'grep-find-template "rg --color=auto --null -nH --no-heading -e <R> <D>")))
|
'grep-find-template "rg --color=auto --null -nH --no-heading -e <R> <D>")))
|
||||||
|
|
||||||
(use-package pdf-tools
|
(use-package pdf-tools
|
||||||
:init
|
:config
|
||||||
(pdf-tools-install))
|
(pdf-tools-install))
|
||||||
|
|
||||||
|
(use-package keycast
|
||||||
|
:hook (elpaca-after-init . keycast-mode-line-mode))
|
||||||
|
|
||||||
(provide 'init-utils)
|
(provide 'init-utils)
|
||||||
|
|||||||
@@ -141,11 +141,6 @@
|
|||||||
"\\*rustfmt\\*$" rustic-compilation-mode rustic-cargo-clippy-mode
|
"\\*rustfmt\\*$" rustic-compilation-mode rustic-cargo-clippy-mode
|
||||||
rustic-cargo-outdated-mode rustic-cargo-run-mode rustic-cargo-test-mode
|
rustic-cargo-outdated-mode rustic-cargo-run-mode rustic-cargo-test-mode
|
||||||
"\\*haskell\\*"))
|
"\\*haskell\\*"))
|
||||||
(add-to-list 'display-buffer-alist
|
|
||||||
'("\\.pdf\\'"
|
|
||||||
(display-buffer-reuse-window display-buffer-in-direction)
|
|
||||||
(direction . right)
|
|
||||||
(window-width . 0.5)))
|
|
||||||
(add-to-list 'display-buffer-alist
|
(add-to-list 'display-buffer-alist
|
||||||
'("\\*OCaml\\*"
|
'("\\*OCaml\\*"
|
||||||
(display-buffer-reuse-window display-buffer-in-direction)
|
(display-buffer-reuse-window display-buffer-in-direction)
|
||||||
|
|||||||
Reference in New Issue
Block a user