dev: merge from master
This commit is contained in:
commit
4223eb22ed
11 changed files with 31 additions and 45 deletions
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
(defvar evil-collection-key-blacklist)
|
(defvar evil-collection-key-blacklist)
|
||||||
|
|
||||||
|
;; must be set before evil/evil-collection is loaded
|
||||||
|
(defvar evil-want-keybinding nil)
|
||||||
|
|
||||||
;; We load evil-collection ourselves for these reasons:
|
;; We load evil-collection ourselves for these reasons:
|
||||||
;;
|
;;
|
||||||
;; 1. To truly lazy load it. Some of its modules, like
|
;; 1. To truly lazy load it. Some of its modules, like
|
||||||
|
@ -23,9 +26,7 @@
|
||||||
(not (doom-context-p 'reload))
|
(not (doom-context-p 'reload))
|
||||||
(modulep! +everywhere))
|
(modulep! +everywhere))
|
||||||
|
|
||||||
(setq evil-collection-company-use-tng (modulep! :completion company +tng)
|
(setq evil-collection-company-use-tng (modulep! :completion company +tng))
|
||||||
;; must be set before evil/evil-collection is loaded
|
|
||||||
evil-want-keybinding nil)
|
|
||||||
|
|
||||||
(defvar +evil-collection-disabled-list
|
(defvar +evil-collection-disabled-list
|
||||||
'(anaconda-mode
|
'(anaconda-mode
|
||||||
|
@ -42,6 +43,7 @@
|
||||||
help
|
help
|
||||||
image
|
image
|
||||||
indent
|
indent
|
||||||
|
kmacro
|
||||||
kotlin-mode
|
kotlin-mode
|
||||||
lispy
|
lispy
|
||||||
outline
|
outline
|
||||||
|
@ -339,6 +341,9 @@ and complains if a module is loaded too early (during startup)."
|
||||||
(+evil-collection-init 'replace))
|
(+evil-collection-init 'replace))
|
||||||
(add-transient-hook! 'indent-rigidly
|
(add-transient-hook! 'indent-rigidly
|
||||||
(+evil-collection-init '(indent "indent")))
|
(+evil-collection-init '(indent "indent")))
|
||||||
|
(when (>= emacs-major-version 30)
|
||||||
|
(add-transient-hook! 'kmacro-menu-mode
|
||||||
|
(+evil-collection-init 'kmacro)))
|
||||||
(add-transient-hook! 'minibuffer-setup-hook
|
(add-transient-hook! 'minibuffer-setup-hook
|
||||||
(when evil-collection-setup-minibuffer
|
(when evil-collection-setup-minibuffer
|
||||||
(+evil-collection-init 'minibuffer)
|
(+evil-collection-init 'minibuffer)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
;; -*- no-byte-compile: t; -*-
|
;; -*- no-byte-compile: t; -*-
|
||||||
;;; editor/evil/packages.el
|
;;; editor/evil/packages.el
|
||||||
|
|
||||||
(package! evil :pin "0ad84c52169068021ec3372bf52503631f2261de")
|
(package! evil :pin "30ebe6df27c36fdf2ea3c82a916edec31acc2647")
|
||||||
(package! evil-args :pin "a8151556f63c9d45d0c44c8a7ef9e5a542f3cdc7")
|
(package! evil-args :pin "a8151556f63c9d45d0c44c8a7ef9e5a542f3cdc7")
|
||||||
(package! evil-easymotion :pin "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9")
|
(package! evil-easymotion :pin "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9")
|
||||||
(package! evil-embrace :pin "3081d37811b6a3dfaaf01d578c7ab7a746c6064d")
|
(package! evil-embrace :pin "3081d37811b6a3dfaaf01d578c7ab7a746c6064d")
|
||||||
|
@ -35,4 +35,4 @@
|
||||||
(package! neotree)
|
(package! neotree)
|
||||||
(autoload 'neotree-make-executor "neotree" nil nil 'macro))
|
(autoload 'neotree-make-executor "neotree" nil nil 'macro))
|
||||||
|
|
||||||
(package! evil-collection :pin "acb056b1d0d3aad2f32b1ca9c019a9a2e976f03e"))
|
(package! evil-collection :pin "e49d8e96ccc83d2bf7583c124582fc1ef076b15c"))
|
||||||
|
|
|
@ -7,5 +7,5 @@
|
||||||
(when (modulep! :editor evil)
|
(when (modulep! :editor evil)
|
||||||
(package! evil-vimish-fold :pin "b6e0e6b91b8cd047e80debef1a536d9d49eef31a"))
|
(package! evil-vimish-fold :pin "b6e0e6b91b8cd047e80debef1a536d9d49eef31a"))
|
||||||
(when (modulep! :tools tree-sitter)
|
(when (modulep! :tools tree-sitter)
|
||||||
(package! ts-fold :pin "5b8abb69cdef3128f1fdb69176b9963b13ceaf02"
|
(package! ts-fold :pin "55f80a202a8f7582a1c1b0bdccc9963ab2c4c54a"
|
||||||
:recipe (:host github :repo "emacs-tree-sitter/ts-fold")))
|
:recipe (:host github :repo "emacs-tree-sitter/ts-fold")))
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
(cond
|
(cond
|
||||||
((modulep! :editor evil)
|
((modulep! :editor evil)
|
||||||
(package! evil-multiedit :pin "23b53bc8743fb82a8854ba907b1d277374c93a79")
|
(package! evil-multiedit :pin "23b53bc8743fb82a8854ba907b1d277374c93a79")
|
||||||
(package! evil-mc :pin "bdf893ea6f52fd0f10bece8ddae813658e17bbb4"))
|
(package! evil-mc :pin "cff3374bfe1b7b1932743425d7fc5d4ab66d747e"))
|
||||||
|
|
||||||
((package! multiple-cursors :pin "c870c18462461df19382ecd2f9374c8b902cd804")))
|
((package! multiple-cursors :pin "c870c18462461df19382ecd2f9374c8b902cd804")))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
;; -*- no-byte-compile: t; -*-
|
;; -*- no-byte-compile: t; -*-
|
||||||
;;; editor/parinfer/packages.el
|
;;; editor/parinfer/packages.el
|
||||||
|
|
||||||
(package! parinfer-rust-mode :pin "a96c768e9dc4427c9ea18812a2f09e209a5e1a5e")
|
(package! parinfer-rust-mode :pin "0d16bd75ad36d881194b58c572562023aa04eb58")
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
:recipe (:host github
|
:recipe (:host github
|
||||||
:repo "doomemacs/snippets"
|
:repo "doomemacs/snippets"
|
||||||
:files (:defaults "*"))
|
:files (:defaults "*"))
|
||||||
:pin "3a0b029c5d104521ede8dcbeaff2972f56f067dc")
|
:pin "b672e69bbf5623e8af0fed27b23a1093fa217315")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
;; -*- no-byte-compile: t; -*-
|
;; -*- no-byte-compile: t; -*-
|
||||||
;;; editor/word-wrap/packages.el
|
;;; editor/word-wrap/packages.el
|
||||||
|
|
||||||
(package! adaptive-wrap :pin "a3b179ea21aeb4e8cfaf5646bb66d9d045263780")
|
(package! adaptive-wrap :pin "d75665b9c88e65f91dadd1e5880905bbdb7c09b7")
|
||||||
(package! visual-fill-column
|
(package! visual-fill-column
|
||||||
:recipe (:host github :repo "emacsmirror/visual-fill-column")
|
:recipe (:host github :repo "emacsmirror/visual-fill-column")
|
||||||
:pin "e04d3521b6dc2435de4c4a4b9cac5feb194f0d5b")
|
:pin "e04d3521b6dc2435de4c4a4b9cac5feb194f0d5b")
|
||||||
|
|
|
@ -1059,7 +1059,8 @@ between the two."
|
||||||
'(("^\\*Org Links" :slot -1 :vslot -1 :size 2 :ttl 0)
|
'(("^\\*Org Links" :slot -1 :vslot -1 :size 2 :ttl 0)
|
||||||
("^ ?\\*\\(?:Agenda Com\\|Calendar\\|Org Export Dispatcher\\)"
|
("^ ?\\*\\(?:Agenda Com\\|Calendar\\|Org Export Dispatcher\\)"
|
||||||
:slot -1 :vslot -1 :size #'+popup-shrink-to-fit :ttl 0)
|
:slot -1 :vslot -1 :size #'+popup-shrink-to-fit :ttl 0)
|
||||||
("^\\*Org \\(?:Select\\|Attach\\)" :slot -1 :vslot -2 :ttl 0 :size 0.25)
|
("^\\*Org \\(?:Select\\|Attach\\|Table Edit\\)" :slot -1 :vslot -2 :ttl 0 :size 0.25)
|
||||||
|
("^\\*Edit Formulas\\*$" :slot -1 :vslot -2 :ttl 0 :size 0.25)
|
||||||
("^\\*Org Agenda" :ignore t)
|
("^\\*Org Agenda" :ignore t)
|
||||||
("^\\*Org Src" :size 0.42 :quit nil :select t :autosave t :modeline t :ttl nil)
|
("^\\*Org Src" :size 0.42 :quit nil :select t :autosave t :modeline t :ttl nil)
|
||||||
("^\\*Org-Babel")
|
("^\\*Org-Babel")
|
||||||
|
|
|
@ -50,14 +50,6 @@ to this commmand."
|
||||||
(+popup/close nil 'force))))
|
(+popup/close nil 'force))))
|
||||||
(global-set-key [remap quit-window] #'+popup/quit-window)
|
(global-set-key [remap quit-window] #'+popup/quit-window)
|
||||||
|
|
||||||
(defadvice! +popup-override-display-buffer-alist-a (fn &rest args)
|
|
||||||
"When `pop-to-buffer' is called with non-nil ACTION, that ACTION should
|
|
||||||
override `display-buffer-alist'."
|
|
||||||
:around #'switch-to-buffer-other-tab
|
|
||||||
:around #'switch-to-buffer-other-window
|
|
||||||
:around #'switch-to-buffer-other-frame
|
|
||||||
(let ((display-buffer-alist nil))
|
|
||||||
(apply fn args)))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
@ -295,20 +287,11 @@ Ugh, such an ugly hack."
|
||||||
(popup-p (+popup-window-p window)))
|
(popup-p (+popup-window-p window)))
|
||||||
(prog1 (apply fn args)
|
(prog1 (apply fn args)
|
||||||
(when (and popup-p (window-live-p window))
|
(when (and popup-p (window-live-p window))
|
||||||
(delete-window window)))))
|
(delete-window window))))))
|
||||||
|
|
||||||
;; Ensure todo, agenda, and other minor popups are delegated to the popup system.
|
|
||||||
(defadvice! +popup--org-pop-to-buffer-a (fn buf &optional norecord)
|
|
||||||
"Use `pop-to-buffer' instead of `switch-to-buffer' to open buffer.'"
|
|
||||||
:around #'org-switch-to-buffer-other-window
|
|
||||||
(if +popup-mode
|
|
||||||
(pop-to-buffer buf nil norecord)
|
|
||||||
(funcall fn buf norecord))))
|
|
||||||
|
|
||||||
|
|
||||||
;;;###package org-journal
|
;;;###package org-journal
|
||||||
(defadvice! +popup--use-popup-window-a (fn &rest args)
|
(defadvice! +popup--use-popup-window-a (fn &rest args)
|
||||||
:around #'org-journal-search-by-string
|
:around #'org-journal--search-by-string
|
||||||
(letf! ((#'switch-to-buffer #'pop-to-buffer))
|
(letf! ((#'switch-to-buffer #'pop-to-buffer))
|
||||||
(apply fn args)))
|
(apply fn args)))
|
||||||
|
|
||||||
|
|
|
@ -63,20 +63,20 @@ error if NAME doesn't exist."
|
||||||
"Get the name of the current workspace."
|
"Get the name of the current workspace."
|
||||||
(safe-persp-name (+workspace-current)))
|
(safe-persp-name (+workspace-current)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +workspace-list-names ()
|
||||||
|
"Return the list of names of open workspaces."
|
||||||
|
(cl-remove persp-nil-name persp-names-cache :count 1))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +workspace-list ()
|
(defun +workspace-list ()
|
||||||
"Return a list of workspace structs (satisifes `+workspace-p')."
|
"Return a list of workspace structs (satisifes `+workspace-p')."
|
||||||
;; We don't use `hash-table-values' because it doesn't ensure order in older
|
;; We don't use `hash-table-values' because it doesn't ensure order in older
|
||||||
;; versions of Emacs
|
;; versions of Emacs
|
||||||
(cl-loop for name in persp-names-cache
|
(cl-loop for name in (+workspace-list-names)
|
||||||
if (gethash name *persp-hash*)
|
if (gethash name *persp-hash*)
|
||||||
collect it))
|
collect it))
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun +workspace-list-names ()
|
|
||||||
"Return the list of names of open workspaces."
|
|
||||||
persp-names-cache)
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +workspace-buffer-list (&optional persp)
|
(defun +workspace-buffer-list (&optional persp)
|
||||||
"Return a list of buffers in PERSP.
|
"Return a list of buffers in PERSP.
|
||||||
|
@ -193,7 +193,7 @@ throws an error."
|
||||||
(let ((old-name (+workspace-current-name)))
|
(let ((old-name (+workspace-current-name)))
|
||||||
(unless (equal old-name name)
|
(unless (equal old-name name)
|
||||||
(setq +workspace--last
|
(setq +workspace--last
|
||||||
(or (and (not (string= old-name persp-nil-name))
|
(or (and (not (+workspace--protected-p old-name))
|
||||||
old-name)
|
old-name)
|
||||||
+workspaces-main))
|
+workspaces-main))
|
||||||
(persp-frame-switch name))
|
(persp-frame-switch name))
|
||||||
|
@ -398,7 +398,7 @@ end of the workspace list."
|
||||||
"Cycle n workspaces to the right (default) or left."
|
"Cycle n workspaces to the right (default) or left."
|
||||||
(interactive (list 1))
|
(interactive (list 1))
|
||||||
(let ((current-name (+workspace-current-name)))
|
(let ((current-name (+workspace-current-name)))
|
||||||
(if (equal current-name persp-nil-name)
|
(if (+workspace--protected-p current-name)
|
||||||
(+workspace-switch +workspaces-main t)
|
(+workspace-switch +workspaces-main t)
|
||||||
(condition-case-unless-debug ex
|
(condition-case-unless-debug ex
|
||||||
(let* ((persps (+workspace-list-names))
|
(let* ((persps (+workspace-list-names))
|
||||||
|
@ -446,9 +446,10 @@ the next."
|
||||||
(interactive "p")
|
(interactive "p")
|
||||||
(let* ((current-name (+workspace-current-name))
|
(let* ((current-name (+workspace-current-name))
|
||||||
(count (or count 1))
|
(count (or count 1))
|
||||||
(index (- (cl-position current-name persp-names-cache :test #'equal)
|
(persps (+workspace-list-names))
|
||||||
|
(index (- (cl-position current-name persps :test #'equal)
|
||||||
count))
|
count))
|
||||||
(names (remove current-name persp-names-cache)))
|
(names (remove current-name persps)))
|
||||||
(unless names
|
(unless names
|
||||||
(user-error "Only one workspace"))
|
(user-error "Only one workspace"))
|
||||||
(let ((index (min (max 0 index) (length names))))
|
(let ((index (min (max 0 index) (length names))))
|
||||||
|
@ -575,7 +576,7 @@ This be hooked to `projectile-after-switch-project-hook'."
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(if (and (not (null +workspaces-on-switch-project-behavior))
|
(if (and (not (null +workspaces-on-switch-project-behavior))
|
||||||
(or (eq +workspaces-on-switch-project-behavior t)
|
(or (eq +workspaces-on-switch-project-behavior t)
|
||||||
(equal (safe-persp-name (get-current-persp)) persp-nil-name)
|
(+workspace--protected-p (safe-persp-name (get-current-persp)))
|
||||||
(+workspace-buffer-list)))
|
(+workspace-buffer-list)))
|
||||||
(let* ((persp
|
(let* ((persp
|
||||||
(let ((project-name (doom-project-name +workspaces--project-dir)))
|
(let ((project-name (doom-project-name +workspaces--project-dir)))
|
||||||
|
|
|
@ -73,10 +73,6 @@ stored in `persp-save-dir'.")
|
||||||
"Ensure a main workspace exists."
|
"Ensure a main workspace exists."
|
||||||
(when persp-mode
|
(when persp-mode
|
||||||
(let (persp-before-switch-functions)
|
(let (persp-before-switch-functions)
|
||||||
;; Try our best to hide the nil perspective.
|
|
||||||
(when (equal (car persp-names-cache) persp-nil-name)
|
|
||||||
(pop persp-names-cache))
|
|
||||||
;; ...and create a *real* main workspace to fill this role.
|
|
||||||
(unless (or (persp-get-by-name +workspaces-main)
|
(unless (or (persp-get-by-name +workspaces-main)
|
||||||
;; Start from 2 b/c persp-mode counts the nil workspace
|
;; Start from 2 b/c persp-mode counts the nil workspace
|
||||||
(> (hash-table-count *persp-hash*) 2))
|
(> (hash-table-count *persp-hash*) 2))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue