refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been deprecated. They have identical interfaces, and can be replaced without issue. featurep! was never quite the right name for this macro. It implied that it had some connection to featurep, which it doesn't (only that it was similar in purpose; still, Doom modules are not features). To undo such implications and be consistent with its namespace (and since we're heading into a storm of breaking changes with the v3 release anyway), now was the best opportunity to begin the transition.
This commit is contained in:
parent
0407621aff
commit
ad6a3d0f33
316 changed files with 1109 additions and 1103 deletions
|
@ -170,7 +170,7 @@ interface.
|
|||
|
||||
See `doom-localleader-key' and `doom-localleader-alt-key' to change the
|
||||
localleader prefix."
|
||||
(if (featurep! :editor evil)
|
||||
(if (modulep! :editor evil)
|
||||
;; :non-normal-prefix doesn't apply to non-evil sessions (only evil's
|
||||
;; emacs state)
|
||||
`(general-define-key
|
||||
|
|
|
@ -549,12 +549,15 @@ WARNINGS:
|
|||
(lambda () ,@body)
|
||||
'append)))
|
||||
|
||||
(defmacro featurep! (category &optional module flag)
|
||||
"Returns t if CATEGORY MODULE is enabled.
|
||||
;; DEPRECATED Remove in 3.0
|
||||
(define-obsolete-function-alias 'featurep! 'modulep! "3.0.0")
|
||||
|
||||
(defmacro modulep! (category &optional module flag)
|
||||
"Return t if FEATURES are all present.
|
||||
|
||||
If FLAG is provided, returns t if CATEGORY MODULE has FLAG enabled.
|
||||
|
||||
(featurep! :config default)
|
||||
(modulep! :config default)
|
||||
|
||||
Module FLAGs are set in your config's `doom!' block, typically in
|
||||
~/.doom.d/init.el. Like so:
|
||||
|
@ -562,13 +565,13 @@ Module FLAGs are set in your config's `doom!' block, typically in
|
|||
:config (default +flag1 -flag2)
|
||||
|
||||
CATEGORY and MODULE can be omitted When this macro is used from inside a module
|
||||
(except your DOOMDIR, which is a special module). e.g. (featurep! +flag)"
|
||||
(except your DOOMDIR, which is a special module). e.g. (modulep! +flag)"
|
||||
(and (cond (flag (memq flag (doom-module-get category module :flags)))
|
||||
(module (doom-module-p category module))
|
||||
(doom--current-flags (memq category doom--current-flags))
|
||||
((if-let (module (doom-module-from-path))
|
||||
(memq category (doom-module-get (car module) (cdr module) :flags))
|
||||
(error "(featurep! %s %s %s) couldn't figure out what module it was called from (in %s)"
|
||||
(error "(modulep! %s %s %s) couldn't figure out what module it was called from (in %s)"
|
||||
category module flag (file!)))))
|
||||
t))
|
||||
|
||||
|
|
|
@ -361,7 +361,8 @@ without needing to check if they are available."
|
|||
(unless (eq (char-after) ?\()
|
||||
(backward-char))
|
||||
(let ((sexp (sexp-at-point)))
|
||||
(when (memq (car-safe sexp) '(featurep! require!))
|
||||
;; DEPRECATED `featurep!'
|
||||
(when (memq (car-safe sexp) '(featurep! modulep! require!))
|
||||
(format "%s %s" (nth 1 sexp) (nth 2 sexp)))))))
|
||||
((when buffer-file-name
|
||||
(when-let (mod (doom-module-from-path buffer-file-name))
|
||||
|
@ -382,7 +383,7 @@ If VISIT-DIR is non-nil, visit the module's directory rather than its
|
|||
documentation.
|
||||
|
||||
Automatically selects a) the module at point (in private init files), b) the
|
||||
module derived from a `featurep!' or `require!' call, c) the module that the
|
||||
module derived from a `modulep!' or `require!' call, c) the module that the
|
||||
current file is in, or d) the module associated with the current major mode (see
|
||||
`doom--help-major-mode-module-alist')."
|
||||
(interactive
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
(defun =calendar ()
|
||||
"Activate (or switch to) `calendar' in its workspace."
|
||||
(interactive)
|
||||
(if (featurep! :ui workspaces)
|
||||
(if (modulep! :ui workspaces)
|
||||
(progn
|
||||
(+workspace-switch "Calendar" t)
|
||||
(doom/switch-to-scratch-buffer)
|
||||
|
@ -28,7 +28,7 @@
|
|||
(defun +calendar/quit ()
|
||||
"TODO"
|
||||
(interactive)
|
||||
(if (featurep! :ui workspaces)
|
||||
(if (modulep! :ui workspaces)
|
||||
(when (+workspace-exists-p "Calendar")
|
||||
(+workspace/delete "Calendar"))
|
||||
(when (window-configuration-p +calendar--wconf)
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
(set-popup-rule! "^\\*cfw:details" :quit t :ttl 0 :select t :size 0.4)
|
||||
|
||||
(define-key cfw:calendar-mode-map "q" #'+calendar/quit)
|
||||
(when (featurep! :editor evil +everywhere)
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
(set-evil-initial-state! '(cfw:calendar-mode cfw:details-mode) 'motion)
|
||||
(add-hook! (cfw:calendar-mode cfw:details-mode) #'evil-normalize-keymaps)
|
||||
(map! (:map cfw:calendar-mode-map
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
(defvar +irc--workspace-name "*IRC*")
|
||||
|
||||
(defun +irc-setup-wconf (&optional inhibit-workspace)
|
||||
(when (and (featurep! :ui workspaces)
|
||||
(when (and (modulep! :ui workspaces)
|
||||
(not inhibit-workspace))
|
||||
(+workspace-switch +irc--workspace-name 'auto-create))
|
||||
(let ((buffers (doom-buffers-in-mode 'circe-mode nil t)))
|
||||
|
@ -58,7 +58,7 @@ workspace for it."
|
|||
(cancel-timer +irc--defer-timer))
|
||||
(disable-circe-notifications)
|
||||
(mapc #'kill-buffer (doom-buffers-in-mode 'circe-mode (buffer-list) t))
|
||||
(when (featurep! :ui workspaces)
|
||||
(when (modulep! :ui workspaces)
|
||||
(when (equal (+workspace-current-name) +irc--workspace-name)
|
||||
(+workspace/delete +irc--workspace-name)))))
|
||||
|
||||
|
@ -68,8 +68,8 @@ workspace for it."
|
|||
argument) is non-nil only show channels in current server."
|
||||
(interactive "P")
|
||||
(call-interactively
|
||||
(cond ((featurep! :completion ivy) #'+irc/ivy-jump-to-channel)
|
||||
((featurep! :completion vertico) #'+irc/vertico-jump-to-channel)
|
||||
(cond ((modulep! :completion ivy) #'+irc/ivy-jump-to-channel)
|
||||
((modulep! :completion vertico) #'+irc/vertico-jump-to-channel)
|
||||
((user-error "No jump-to-channel backend is enabled. Enable vertico or ivy!")))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; app/irc/autoload/ivy.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :completion ivy)
|
||||
;;;###if (modulep! :completion ivy)
|
||||
|
||||
;;;###autoload
|
||||
(defun +irc/ivy-jump-to-channel (&optional this-server)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; app/irc/autoload/vertico.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :completion vertico)
|
||||
;;;###if (modulep! :completion vertico)
|
||||
|
||||
;;;###autoload
|
||||
(defun +irc/vertico-jump-to-channel ()
|
||||
|
|
|
@ -141,7 +141,7 @@ playback.")
|
|||
;; Fail gracefully if not in a circe buffer
|
||||
(global-set-key [remap tracking-next-buffer] #'+irc/tracking-next-buffer)
|
||||
|
||||
(when (featurep! :completion vertico)
|
||||
(when (modulep! :completion vertico)
|
||||
(after! consult
|
||||
(add-to-list 'consult-buffer-sources '+irc--consult-circe-source 'append)))
|
||||
|
||||
|
@ -198,7 +198,7 @@ playback.")
|
|||
(define-key lui-mode-map "\C-u" #'lui-kill-to-beginning-of-line)
|
||||
(setq lui-fill-type nil)
|
||||
|
||||
(when (featurep! :checkers spell)
|
||||
(when (modulep! :checkers spell)
|
||||
(setq lui-flyspell-p t))
|
||||
|
||||
(after! evil
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
(defun =rss ()
|
||||
"Activate (or switch to) `elfeed' in its workspace."
|
||||
(interactive)
|
||||
(if (featurep! :ui workspaces)
|
||||
(if (modulep! :ui workspaces)
|
||||
(progn
|
||||
(+workspace-switch +rss-workspace-name t)
|
||||
(doom/switch-to-scratch-buffer)
|
||||
|
@ -98,7 +98,7 @@
|
|||
(remove-hook 'kill-buffer-hook #'+rss-cleanup-h :local)
|
||||
(kill-buffer b)))
|
||||
(mapc #'kill-buffer show-buffers))
|
||||
(if (and (featurep! :ui workspaces)
|
||||
(if (and (modulep! :ui workspaces)
|
||||
(+workspace-exists-p +rss-workspace-name))
|
||||
(+workspace/delete +rss-workspace-name)
|
||||
(when (window-configuration-p +rss--wconf)
|
||||
|
|
|
@ -56,7 +56,7 @@ easier to scroll through.")
|
|||
(define-key! elfeed-show-mode-map
|
||||
[remap next-buffer] #'+rss/next
|
||||
[remap previous-buffer] #'+rss/previous))
|
||||
(when (featurep! :editor evil +everywhere)
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
(evil-define-key 'normal elfeed-search-mode-map
|
||||
"q" #'elfeed-kill-buffer
|
||||
"r" #'elfeed-search-update--force
|
||||
|
@ -68,7 +68,7 @@ easier to scroll through.")
|
|||
|
||||
|
||||
(use-package! elfeed-org
|
||||
:when (featurep! +org)
|
||||
:when (modulep! +org)
|
||||
:after elfeed
|
||||
:preface
|
||||
(setq rmh-elfeed-org-files (list "elfeed.org"))
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
|
||||
(package! elfeed :pin "162d7d545ed41c27967d108c04aa31f5a61c8e16")
|
||||
(package! elfeed-goodies :pin "c9d9cd196746add3010d74f43b5c9866562f39fb")
|
||||
(when (featurep! +org)
|
||||
(when (modulep! +org)
|
||||
(package! elfeed-org :pin "d28c858303e60dcb3a6eb18ea85ee3cb9e3dd623"))
|
||||
|
|
|
@ -29,7 +29,7 @@ that works with the ui/popup module."
|
|||
(interactive "P")
|
||||
(condition-case _
|
||||
(progn
|
||||
(if (and (not arg) (featurep! :ui workspaces))
|
||||
(if (and (not arg) (modulep! :ui workspaces))
|
||||
(+workspace/new +twitter-workspace-name)
|
||||
(setq +twitter--old-wconf (current-window-configuration))
|
||||
(delete-other-windows)
|
||||
|
@ -52,7 +52,7 @@ that works with the ui/popup module."
|
|||
(when (eq major-mode 'twittering-mode)
|
||||
(twittering-kill-buffer)
|
||||
(cond ((one-window-p) (+twitter/quit-all))
|
||||
((featurep! :ui workspaces)
|
||||
((modulep! :ui workspaces)
|
||||
(+workspace/close-window-or-workspace))
|
||||
((delete-window)))))
|
||||
|
||||
|
@ -60,7 +60,7 @@ that works with the ui/popup module."
|
|||
(defun +twitter/quit-all ()
|
||||
"Close all open `twitter-mode' buffers and the associated workspace, if any."
|
||||
(interactive)
|
||||
(when (featurep! :ui workspaces)
|
||||
(when (modulep! :ui workspaces)
|
||||
(+workspace/delete +twitter-workspace-name))
|
||||
(when +twitter--old-wconf
|
||||
(set-window-configuration +twitter--old-wconf)
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
:group 'twittering-mode)
|
||||
|
||||
(add-hook 'doom-real-buffer-functions #'+twitter-buffer-p)
|
||||
(when (featurep! :ui popup)
|
||||
(when (modulep! :ui popup)
|
||||
(setq twittering-pop-to-buffer-function #'+twitter-display-buffer-fn))
|
||||
|
||||
;; Custom header-line for twitter buffers
|
||||
|
@ -54,7 +54,7 @@
|
|||
[remap twittering-kill-buffer] #'+twitter/quit
|
||||
[remap delete-window] #'+twitter/quit
|
||||
[remap +workspace/close-window-or-workspace] #'+twitter/quit)
|
||||
(when (featurep! :editor evil +everywhere)
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
(define-key! twittering-mode-map
|
||||
[remap evil-window-delete] #'+twitter/quit
|
||||
"f" #'twittering-favorite
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; checkers/spell/autoload/+flyspell.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +flyspell)
|
||||
;;;###if (modulep! +flyspell)
|
||||
|
||||
;;;###autodef
|
||||
(defalias 'flyspell-mode! #'flyspell-mode)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; checkers/spell/autoload/+spell-fu.el -*- lexical-binding: t; -*-
|
||||
;;;###if (not (featurep! +flyspell))
|
||||
;;;###if (not (modulep! +flyspell))
|
||||
|
||||
(defun +spell--correct (replace poss word orig-pt start end)
|
||||
(cond ((eq replace 'ignore)
|
||||
|
@ -61,9 +61,9 @@
|
|||
(ispell-set-spellchecker-params)
|
||||
(save-current-buffer
|
||||
(ispell-accept-buffer-local-defs))
|
||||
(if (not (or (featurep! :completion ivy)
|
||||
(featurep! :completion helm)
|
||||
(featurep! :completion vertico)))
|
||||
(if (not (or (modulep! :completion ivy)
|
||||
(modulep! :completion helm)
|
||||
(modulep! :completion vertico)))
|
||||
(call-interactively #'ispell-word)
|
||||
(cl-destructuring-bind (start . end)
|
||||
(or (bounds-of-thing-at-point 'word)
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
;; if their binary is found.
|
||||
;; If one of the flags `+aspell', `+hunspell' or `+enchant' is given,
|
||||
;; only enable that spell checker.
|
||||
(pcase (cond ((featurep! +aspell) 'aspell)
|
||||
((featurep! +hunspell) 'hunspell)
|
||||
((featurep! +enchant) 'enchant)
|
||||
(pcase (cond ((modulep! +aspell) 'aspell)
|
||||
((modulep! +hunspell) 'hunspell)
|
||||
((modulep! +enchant) 'enchant)
|
||||
((executable-find "aspell") 'aspell)
|
||||
((executable-find "hunspell") 'hunspell)
|
||||
((executable-find "enchant-2") 'enchant))
|
||||
|
@ -66,7 +66,7 @@
|
|||
;;
|
||||
;;; Implementations
|
||||
|
||||
(eval-if! (not (featurep! +flyspell))
|
||||
(eval-if! (not (modulep! +flyspell))
|
||||
|
||||
(use-package! spell-fu
|
||||
:when (executable-find "aspell")
|
||||
|
@ -74,9 +74,9 @@
|
|||
:general ([remap ispell-word] #'+spell/correct)
|
||||
:preface
|
||||
(defvar +spell-correct-interface
|
||||
(cond ((featurep! :completion ivy)
|
||||
(cond ((modulep! :completion ivy)
|
||||
#'+spell-correct-ivy-fn)
|
||||
((featurep! :completion helm)
|
||||
((modulep! :completion helm)
|
||||
#'+spell-correct-helm-fn)
|
||||
(#'+spell-correct-generic-fn))
|
||||
"Function to use to display corrections.")
|
||||
|
@ -129,7 +129,7 @@
|
|||
"Faces in certain major modes that spell-fu will not spellcheck.")
|
||||
|
||||
(setq spell-fu-directory (concat doom-etc-dir "spell-fu"))
|
||||
(when (featurep! +everywhere)
|
||||
(when (modulep! +everywhere)
|
||||
(add-hook! '(yaml-mode-hook
|
||||
conf-mode-hook
|
||||
prog-mode-hook)
|
||||
|
@ -184,7 +184,7 @@ directory first)."
|
|||
git-commit-mode-hook)
|
||||
#'flyspell-mode)
|
||||
|
||||
(when (featurep! +everywhere)
|
||||
(when (modulep! +everywhere)
|
||||
(add-hook! '(yaml-mode-hook
|
||||
conf-mode-hook
|
||||
prog-mode-hook)
|
||||
|
@ -228,11 +228,11 @@ e.g. proselint and langtool."
|
|||
:commands flyspell-correct-previous
|
||||
:general ([remap ispell-word] #'flyspell-correct-at-point)
|
||||
:config
|
||||
(cond ((and (featurep! :completion helm)
|
||||
(cond ((and (modulep! :completion helm)
|
||||
(require 'flyspell-correct-helm nil t)))
|
||||
((and (featurep! :completion ivy)
|
||||
((and (modulep! :completion ivy)
|
||||
(require 'flyspell-correct-ivy nil t)))
|
||||
((featurep! :completion vertico)) ; vertico doesn't need any extra configuration
|
||||
((modulep! :completion vertico)) ; vertico doesn't need any extra configuration
|
||||
((require 'flyspell-correct-popup nil t) ; only use popup if no compatible completion UI is enabled
|
||||
(setq flyspell-popup-correct-delay 0.8)
|
||||
(define-key popup-menu-keymap [escape] #'keyboard-quit))))
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
;;; checkers/spell/doctor.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (or (not (featurep! +flyspell))
|
||||
(featurep! +aspell))
|
||||
(when (or (not (modulep! +flyspell))
|
||||
(modulep! +aspell))
|
||||
(unless (executable-find "aspell")
|
||||
(warn! "Couldn't find aspell executable; spell checker will not work")))
|
||||
|
||||
(when (featurep! +hunspell)
|
||||
(when (modulep! +hunspell)
|
||||
(unless (executable-find "hunspell")
|
||||
(warn! "Couldn't find hunspell executable; spell checker will not work")))
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; checkers/spell/packages.el
|
||||
|
||||
(if (not (featurep! +flyspell))
|
||||
(if (not (modulep! +flyspell))
|
||||
(package! spell-fu :pin "8185467b24f05bceb428a0e9909651ec083cc54e")
|
||||
(package! flyspell-correct :pin "e9fde6f93af991b0528d6ed47d44bed470dc70af")
|
||||
(cond ((featurep! :completion ivy)
|
||||
(cond ((modulep! :completion ivy)
|
||||
(package! flyspell-correct-ivy))
|
||||
((featurep! :completion helm)
|
||||
((modulep! :completion helm)
|
||||
(package! flyspell-correct-helm))
|
||||
((not (featurep! :completion vertico))
|
||||
((not (modulep! :completion vertico))
|
||||
(package! flyspell-correct-popup)))
|
||||
(package! flyspell-lazy :pin "0fc5996bcee20b46cbd227ae948d343c3bef7339"))
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
|
||||
(use-package! flycheck-posframe
|
||||
:when (featurep! +childframe)
|
||||
:when (modulep! +childframe)
|
||||
:hook (flycheck-mode . +syntax-init-popups-h)
|
||||
:config
|
||||
(setq flycheck-posframe-warning-prefix "! "
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
(package! flycheck :pin "784f184cdd9f9cb4e3dbb997c09d93e954142842")
|
||||
(package! flycheck-popup-tip :pin "ef86aad907f27ca076859d8d9416f4f7727619c6")
|
||||
(when (featurep! +childframe)
|
||||
(when (modulep! +childframe)
|
||||
(package! flycheck-posframe :pin "8f60c9bf124ab9597d681504a73fdf116a0bde12"))
|
||||
|
||||
;; TODO flymake?
|
||||
|
|
|
@ -40,13 +40,13 @@
|
|||
company-dabbrev-ignore-case nil
|
||||
company-dabbrev-downcase nil)
|
||||
|
||||
(when (featurep! +tng)
|
||||
(when (modulep! +tng)
|
||||
(add-hook 'global-company-mode-hook #'company-tng-mode))
|
||||
|
||||
:config
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(add-hook 'company-mode-hook #'evil-normalize-keymaps)
|
||||
(unless (featurep! +childframe)
|
||||
(unless (modulep! +childframe)
|
||||
;; Don't persist company popups when switching back to normal mode.
|
||||
;; `company-box' aborts on mode switch so it doesn't need this.
|
||||
(add-hook! 'evil-normal-state-entry-hook
|
||||
|
@ -95,7 +95,7 @@
|
|||
|
||||
|
||||
(use-package! company-box
|
||||
:when (featurep! +childframe)
|
||||
:when (modulep! +childframe)
|
||||
:hook (company-mode . company-box-mode)
|
||||
:config
|
||||
(setq company-box-show-single-candidate t
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
|
||||
(package! company :pin "1005540b1cdf176cbcf893b2fa83d2075cbbe3ca")
|
||||
(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4")
|
||||
(when (featurep! +childframe)
|
||||
(when (modulep! +childframe)
|
||||
(package! company-box :pin "f9cbbc7df8efbb56a8d31a5b422d158660d9109e"))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; completion/helm/autoload/evil.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload (autoload '+helm:project-search "completion/helm/autoload/evil" nil t)
|
||||
(evil-define-command +helm:project-search (all-files-p query)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"A version of `helm-buffers-list' with its buffer list restricted to the
|
||||
current workspace."
|
||||
(interactive)
|
||||
(unless (featurep! :ui workspaces)
|
||||
(unless (modulep! :ui workspaces)
|
||||
(user-error "This command requires the :ui workspaces module"))
|
||||
(with-no-warnings
|
||||
(with-persp-buffer-list nil (helm-buffers-list))))
|
||||
|
@ -28,7 +28,7 @@ current workspace."
|
|||
"A version of `helm-mini' with its buffer list restricted to the current
|
||||
workspace."
|
||||
(interactive)
|
||||
(unless (featurep! :ui workspaces)
|
||||
(unless (modulep! :ui workspaces)
|
||||
(user-error "This command requires the :ui workspaces module"))
|
||||
(with-no-warnings
|
||||
(with-persp-buffer-list nil (helm-mini))))
|
||||
|
|
|
@ -63,17 +63,17 @@ Can be negative.")
|
|||
;; disable special behavior for left/right, M-left/right keys.
|
||||
helm-ff-lynx-style-map nil)
|
||||
|
||||
(when (featurep! :editor evil +everywhere)
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
(setq helm-default-prompt-display-function #'+helm--set-prompt-display))
|
||||
|
||||
:init
|
||||
(when (featurep! +childframe)
|
||||
(when (modulep! +childframe)
|
||||
;; If this is set to 'iconify-top-level then Emacs will be minimized upon
|
||||
;; helm completion.
|
||||
(setq iconify-child-frame 'make-invisible)
|
||||
(setq helm-display-function #'+helm-posframe-display-fn))
|
||||
|
||||
(let ((fuzzy (featurep! +fuzzy)))
|
||||
(let ((fuzzy (modulep! +fuzzy)))
|
||||
(setq helm-apropos-fuzzy-match fuzzy
|
||||
helm-bookmark-show-location fuzzy
|
||||
helm-buffers-fuzzy-matching fuzzy
|
||||
|
@ -117,7 +117,7 @@ Can be negative.")
|
|||
(advice-add fn :around #'doom-use-helpful-a)))
|
||||
|
||||
(use-package! helm-flx
|
||||
:when (featurep! +fuzzy)
|
||||
:when (modulep! +fuzzy)
|
||||
:hook (helm-mode . helm-flx-mode)
|
||||
:config (helm-flx-mode +1))
|
||||
|
||||
|
@ -154,7 +154,7 @@ Can be negative.")
|
|||
|
||||
|
||||
(use-package! helm-org
|
||||
:when (featurep! :lang org)
|
||||
:when (modulep! :lang org)
|
||||
:defer t
|
||||
:init
|
||||
(after! helm-mode
|
||||
|
@ -188,7 +188,7 @@ Can be negative.")
|
|||
|
||||
(use-package! helm-icons
|
||||
:after helm
|
||||
:when (featurep! +icons)
|
||||
:when (modulep! +icons)
|
||||
:init
|
||||
(setq helm-icons-provider 'all-the-icons)
|
||||
:config
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
:pin "11fb36af119b784539d31c6160002de1957408aa")
|
||||
(package! helm-projectile :pin "58123f14c392021714fc5d23b9f95c7f95ce07f1")
|
||||
(package! swiper-helm :pin "93fb6db87bc6a5967898b5fd3286954cc72a0008")
|
||||
(when (featurep! +fuzzy)
|
||||
(when (modulep! +fuzzy)
|
||||
(package! helm-flx :pin "27dd9e3ce385a3ca15092150e65781de14b5b00b"))
|
||||
(when (featurep! +childframe)
|
||||
(when (modulep! +childframe)
|
||||
(package! posframe :pin "c91d4d53fa479ceb604071008ce0a901770eff57"))
|
||||
(when (featurep! :lang org)
|
||||
(when (modulep! :lang org)
|
||||
(package! helm-org :pin "d67186d3a64e610c03a5f3d583488f018fb032e4"))
|
||||
(when (featurep! +icons)
|
||||
(when (modulep! +icons)
|
||||
(package! helm-icons :pin "8d2f5e705c8b78a390677cf242024739c932fc95"))
|
||||
(package! helm-descbinds :pin "b72515982396b6e336ad7beb6767e95a80fca192")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;; completion/ivy/autoload/evil.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload (autoload '+ivy:project-search "completion/ivy/autoload/evil" nil t)
|
||||
(evil-define-command +ivy:project-search (query &optional all-files-p)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; completion/ivy/autoload/hydras.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :ui hydra)
|
||||
;;;###if (modulep! :ui hydra)
|
||||
|
||||
;;;###autoload
|
||||
(after! ivy-hydra
|
||||
|
|
|
@ -281,7 +281,7 @@ The point of this is to avoid Emacs locking up indexing massive file trees."
|
|||
(replace-regexp-in-string
|
||||
"[! |]" (lambda (substr)
|
||||
(cond ((and (string= substr " ")
|
||||
(not (featurep! +fuzzy)))
|
||||
(not (modulep! +fuzzy)))
|
||||
" ")
|
||||
((string= substr "|")
|
||||
"\\\\\\\\|")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; completion/ivy/autoload/posframe.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +childframe)
|
||||
;;;###if (modulep! +childframe)
|
||||
|
||||
;;;###autoload
|
||||
(defun +ivy-display-at-frame-center-near-bottom-fn (str)
|
||||
|
|
|
@ -22,11 +22,11 @@ results buffer.")
|
|||
:hook (doom-first-input . ivy-mode)
|
||||
:init
|
||||
(let ((standard-search-fn
|
||||
(if (featurep! +prescient)
|
||||
(if (modulep! +prescient)
|
||||
#'+ivy-prescient-non-fuzzy
|
||||
#'ivy--regex-plus))
|
||||
(alt-search-fn
|
||||
(if (featurep! +fuzzy)
|
||||
(if (modulep! +fuzzy)
|
||||
#'ivy--regex-fuzzy
|
||||
;; Ignore order for non-fuzzy searches by default
|
||||
#'ivy--regex-ignore-order)))
|
||||
|
@ -116,7 +116,7 @@ results buffer.")
|
|||
:config
|
||||
(setq ivy-rich-parse-remote-buffer nil)
|
||||
|
||||
(when (featurep! +icons)
|
||||
(when (modulep! +icons)
|
||||
(cl-pushnew '(+ivy-rich-buffer-icon)
|
||||
(cadr (plist-get ivy-rich-display-transformers-list
|
||||
'ivy-switch-buffer))
|
||||
|
@ -160,7 +160,7 @@ results buffer.")
|
|||
|
||||
|
||||
(use-package! all-the-icons-ivy
|
||||
:when (featurep! +icons)
|
||||
:when (modulep! +icons)
|
||||
:after ivy
|
||||
:config
|
||||
;; `all-the-icons-ivy' is incompatible with ivy-rich's switch-buffer
|
||||
|
@ -335,7 +335,7 @@ results buffer.")
|
|||
;; no highlighting visited files; slows down the filtering
|
||||
(ivy-set-display-transformer #'counsel-projectile-find-file nil)
|
||||
|
||||
(when (featurep! +prescient)
|
||||
(when (modulep! +prescient)
|
||||
(setq counsel-projectile-sort-files t)))
|
||||
|
||||
|
||||
|
@ -345,7 +345,7 @@ results buffer.")
|
|||
|
||||
|
||||
(use-package! ivy-posframe
|
||||
:when (featurep! +childframe)
|
||||
:when (modulep! +childframe)
|
||||
:hook (ivy-mode . ivy-posframe-mode)
|
||||
:config
|
||||
(setq ivy-fixed-height-minibuffer nil
|
||||
|
@ -369,23 +369,23 @@ results buffer.")
|
|||
|
||||
|
||||
(use-package! flx
|
||||
:when (featurep! +fuzzy)
|
||||
:unless (featurep! +prescient)
|
||||
:when (modulep! +fuzzy)
|
||||
:unless (modulep! +prescient)
|
||||
:defer t ; is loaded by ivy
|
||||
:preface (setq ivy--flx-featurep (featurep! +fuzzy))
|
||||
:preface (setq ivy--flx-featurep (modulep! +fuzzy))
|
||||
:init (setq ivy-flx-limit 10000))
|
||||
|
||||
(use-package! ivy-avy
|
||||
:after ivy)
|
||||
|
||||
(use-package! ivy-prescient
|
||||
:when (featurep! +prescient)
|
||||
:when (modulep! +prescient)
|
||||
:hook (ivy-mode . ivy-prescient-mode)
|
||||
:hook (ivy-prescient-mode . prescient-persist-mode)
|
||||
:commands +ivy-prescient-non-fuzzy
|
||||
:init
|
||||
(setq prescient-filter-method
|
||||
(if (featurep! +fuzzy)
|
||||
(if (modulep! +fuzzy)
|
||||
'(literal regexp initialism fuzzy)
|
||||
'(literal regexp initialism)))
|
||||
:config
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
(package! ivy-rich :pin "600b8183ed0be8668dcc548cc2c8cb94b001363b")
|
||||
(package! wgrep :pin "f9687c28bbc2e84f87a479b6ce04407bb97cfb23")
|
||||
|
||||
(if (featurep! +prescient)
|
||||
(if (modulep! +prescient)
|
||||
(package! ivy-prescient :pin "c5295a9eecbd2935bb57684a4422638e03bf738c")
|
||||
(when (featurep! +fuzzy)
|
||||
(when (modulep! +fuzzy)
|
||||
(package! flx :pin "e3b3f0533e44c5250ce73d728b59a7e96c692b5d")))
|
||||
|
||||
(when (featurep! +childframe)
|
||||
(when (modulep! +childframe)
|
||||
(package! ivy-posframe :pin "533a8e368fcabfd534761a5c685ce713376fa594"))
|
||||
|
||||
(when (featurep! +icons)
|
||||
(when (modulep! +icons)
|
||||
(package! all-the-icons-ivy :pin "a70cbfa1effe36efc946a823a580cec686d5e88d"))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;; completion/vertico/autoload/evil.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload (autoload '+vertico:project-search "completion/vertico/autoload/evil" nil t)
|
||||
(evil-define-command +vertico:project-search (query &optional all-files-p)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; completion/vertico/autoload/magit.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :tools magit)
|
||||
;;;###if (modulep! :tools magit)
|
||||
|
||||
;;;###autoload
|
||||
(defun +vertico/embark-magit-status (file)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; completion/vertico/autoload/workspaces.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :ui workspaces)
|
||||
;;;###if (modulep! :ui workspaces)
|
||||
|
||||
(defun +vertico--workspace-buffer-state ()
|
||||
(let ((preview
|
||||
|
|
|
@ -152,7 +152,7 @@ orderless."
|
|||
(consult-customize
|
||||
consult-theme
|
||||
:preview-key (list (kbd "C-SPC") :debounce 0.5 'any))
|
||||
(when (featurep! :lang org)
|
||||
(when (modulep! :lang org)
|
||||
(defvar +vertico--consult-org-source
|
||||
(list :name "Org Buffer"
|
||||
:category 'buffer
|
||||
|
@ -185,7 +185,7 @@ orderless."
|
|||
("C-x C-d" . consult-dir)
|
||||
("C-x C-j" . consult-dir-jump-file))
|
||||
:config
|
||||
(when (featurep! :tools docker)
|
||||
(when (modulep! :tools docker)
|
||||
(defun +vertico--consult-dir-docker-hosts ()
|
||||
"Get a list of hosts from docker."
|
||||
(when (require 'docker-tramp nil t)
|
||||
|
@ -213,7 +213,7 @@ orderless."
|
|||
(add-to-list 'consult-dir-sources 'consult-dir--source-tramp-local t))
|
||||
|
||||
(use-package! consult-flycheck
|
||||
:when (featurep! :checkers syntax)
|
||||
:when (modulep! :checkers syntax)
|
||||
:after (consult flycheck))
|
||||
|
||||
|
||||
|
@ -263,9 +263,9 @@ orderless."
|
|||
(setf (alist-get 'package embark-keymap-alist) #'+vertico/embark-doom-package-map)
|
||||
(map! (:map embark-file-map
|
||||
:desc "Open target with sudo" "s" #'doom/sudo-find-file
|
||||
(:when (featurep! :tools magit)
|
||||
(:when (modulep! :tools magit)
|
||||
:desc "Open magit-status of target" "g" #'+vertico/embark-magit-status)
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
:desc "Open in new workspace" "TAB" #'+vertico/embark-open-in-new-workspace))))
|
||||
|
||||
|
||||
|
@ -275,7 +275,7 @@ orderless."
|
|||
(map! :map minibuffer-local-map
|
||||
:desc "Cycle marginalia views" "M-A" #'marginalia-cycle)
|
||||
:config
|
||||
(when (featurep! +icons)
|
||||
(when (modulep! +icons)
|
||||
(add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup))
|
||||
(advice-add #'marginalia--project-root :override #'doom-project-root)
|
||||
(pushnew! marginalia-command-categories
|
||||
|
@ -304,7 +304,7 @@ orderless."
|
|||
|
||||
|
||||
(use-package! vertico-posframe
|
||||
:when (featurep! +childframe)
|
||||
:when (modulep! +childframe)
|
||||
:hook (vertico-mode . vertico-posframe-mode)
|
||||
:config
|
||||
(add-hook 'doom-after-reload-hook #'posframe-delete-all))
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
(package! consult :pin "6319aec3513cd587a8817269bc32c8283d419710")
|
||||
(package! compat :pin "cc1924fd8b3f9b75b26bf93f084ea938c06f9615")
|
||||
(package! consult-dir :pin "d397ca6ea67af4d3c59a330a778affd825f0efd9")
|
||||
(when (featurep! :checkers syntax)
|
||||
(when (modulep! :checkers syntax)
|
||||
(package! consult-flycheck :pin "9b40f136c017fadf6239d7602d16bf73b4ad5198"))
|
||||
|
||||
(package! embark :pin "5d0459d27aa7cf738b5af36cf862723a62bef955")
|
||||
|
@ -21,10 +21,10 @@
|
|||
|
||||
(package! wgrep :pin "f9687c28bbc2e84f87a479b6ce04407bb97cfb23")
|
||||
|
||||
(when (featurep! +icons)
|
||||
(when (modulep! +icons)
|
||||
(package! all-the-icons-completion :pin "286e2c064a1298be0d8d4100dc91d7a7a554d04a"))
|
||||
|
||||
(when (featurep! +childframe)
|
||||
(when (modulep! +childframe)
|
||||
(package! vertico-posframe
|
||||
:recipe (:host github :repo "tumashu/vertico-posframe")
|
||||
:pin "7ca364d319e7ba8ccba26a0d57513f3e66f1b05b"))
|
||||
|
|
|
@ -41,36 +41,36 @@
|
|||
:desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace
|
||||
:desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines
|
||||
:desc "List errors" "x" #'+default/diagnostics
|
||||
(:when (and (featurep! :tools lsp) (not (featurep! :tools lsp +eglot)))
|
||||
(:when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot)))
|
||||
:desc "LSP Code actions" "a" #'lsp-execute-code-action
|
||||
:desc "LSP Organize imports" "o" #'lsp-organize-imports
|
||||
:desc "LSP Rename" "r" #'lsp-rename
|
||||
:desc "LSP" "l" #'+default/lsp-command-map
|
||||
(:when (featurep! :completion ivy)
|
||||
(:when (modulep! :completion ivy)
|
||||
:desc "Jump to symbol in current workspace" "j" #'lsp-ivy-workspace-symbol
|
||||
:desc "Jump to symbol in any workspace" "J" #'lsp-ivy-global-workspace-symbol)
|
||||
(:when (featurep! :completion helm)
|
||||
(:when (modulep! :completion helm)
|
||||
:desc "Jump to symbol in current workspace" "j" #'helm-lsp-workspace-symbol
|
||||
:desc "Jump to symbol in any workspace" "J" #'helm-lsp-global-workspace-symbol)
|
||||
(:when (featurep! :completion vertico)
|
||||
(:when (modulep! :completion vertico)
|
||||
:desc "Jump to symbol in current workspace" "j" #'consult-lsp-symbols
|
||||
:desc "Jump to symbol in any workspace" "J" (cmd!! #'consult-lsp-symbols 'all-workspaces))
|
||||
(:when (featurep! :ui treemacs +lsp)
|
||||
(:when (modulep! :ui treemacs +lsp)
|
||||
:desc "Errors list" "X" #'lsp-treemacs-errors-list
|
||||
:desc "Incoming call hierarchy" "y" #'lsp-treemacs-call-hierarchy
|
||||
:desc "Outgoing call hierarchy" "Y" (cmd!! #'lsp-treemacs-call-hierarchy t)
|
||||
:desc "References tree" "R" (cmd!! #'lsp-treemacs-references t)
|
||||
:desc "Symbols" "S" #'lsp-treemacs-symbols))
|
||||
(:when (featurep! :tools lsp +eglot)
|
||||
(:when (modulep! :tools lsp +eglot)
|
||||
:desc "LSP Execute code action" "a" #'eglot-code-actions
|
||||
:desc "LSP Rename" "r" #'eglot-rename
|
||||
:desc "LSP Find declaration" "j" #'eglot-find-declaration
|
||||
(:when (featurep! :completion vertico)
|
||||
(:when (modulep! :completion vertico)
|
||||
:desc "Jump to symbol in current workspace" "j" #'consult-eglot-symbols)))
|
||||
|
||||
;;; <leader> f --- file
|
||||
(:prefix-map ("f" . "file")
|
||||
(:when (featurep! :tools editorconfig)
|
||||
(:when (modulep! :tools editorconfig)
|
||||
:desc "Open project editorconfig" "c" #'editorconfig-find-current-editorconfig)
|
||||
:desc "Copy this file" "C" #'doom/copy-this-file
|
||||
:desc "Find directory" "d" #'dired
|
||||
|
@ -93,7 +93,7 @@
|
|||
:desc "Switch to scratch buffer" "X" #'doom/switch-to-scratch-buffer)
|
||||
|
||||
;;; <leader> r --- remote
|
||||
(:when (featurep! :tools upload)
|
||||
(:when (modulep! :tools upload)
|
||||
(:prefix-map ("r" . "remote")
|
||||
:desc "Browse remote" "b" #'ssh-deploy-browse-remote-base-handler
|
||||
:desc "Browse relative" "B" #'ssh-deploy-browse-remote-handler
|
||||
|
@ -114,13 +114,13 @@
|
|||
(:prefix-map ("s" . "search")
|
||||
:desc "Search project for symbol" "." #'+default/search-project-for-symbol-at-point
|
||||
:desc "Search buffer" "b"
|
||||
(cond ((featurep! :completion vertico) #'consult-line)
|
||||
((featurep! :completion ivy) #'swiper)
|
||||
((featurep! :completion helm) #'swiper))
|
||||
(cond ((modulep! :completion vertico) #'consult-line)
|
||||
((modulep! :completion ivy) #'swiper)
|
||||
((modulep! :completion helm) #'swiper))
|
||||
:desc "Search all open buffers" "B"
|
||||
(cond ((featurep! :completion vertico) (cmd!! #'consult-line-multi 'all-buffers))
|
||||
((featurep! :completion ivy) #'swiper-all)
|
||||
((featurep! :completion helm) #'swiper-all))
|
||||
(cond ((modulep! :completion vertico) (cmd!! #'consult-line-multi 'all-buffers))
|
||||
((modulep! :completion ivy) #'swiper-all)
|
||||
((modulep! :completion helm) #'swiper-all))
|
||||
:desc "Search current directory" "d" #'+default/search-cwd
|
||||
:desc "Search other directory" "D" #'+default/search-other-cwd
|
||||
:desc "Search .emacs.d" "e" #'+default/search-emacsd
|
||||
|
@ -137,9 +137,9 @@
|
|||
:desc "Search other project" "P" #'+default/search-other-project
|
||||
:desc "Search buffer" "s" #'+default/search-buffer
|
||||
:desc "Search buffer for thing at point" "S"
|
||||
(cond ((featurep! :completion vertico) #'+vertico/search-symbol-at-point)
|
||||
((featurep! :completion ivy) #'swiper-isearch-thing-at-point)
|
||||
((featurep! :completion helm) #'swiper-isearch-thing-at-point))
|
||||
(cond ((modulep! :completion vertico) #'+vertico/search-symbol-at-point)
|
||||
((modulep! :completion ivy) #'swiper-isearch-thing-at-point)
|
||||
((modulep! :completion helm) #'swiper-isearch-thing-at-point))
|
||||
:desc "Dictionary" "t" #'+lookup/dictionary-definition
|
||||
:desc "Thesaurus" "T" #'+lookup/synonyms)
|
||||
|
||||
|
@ -156,16 +156,16 @@
|
|||
(:prefix-map ("n" . "notes")
|
||||
:desc "Search notes for symbol" "." #'+default/search-notes-for-symbol-at-point
|
||||
:desc "Org agenda" "a" #'org-agenda
|
||||
(:when (featurep! :tools biblio)
|
||||
(:when (modulep! :tools biblio)
|
||||
:desc "Bibliographic entries" "b"
|
||||
(cond ((featurep! :completion vertico) #'citar-open-entry)
|
||||
((featurep! :completion ivy) #'ivy-bibtex)
|
||||
((featurep! :completion helm) #'helm-bibtex)))
|
||||
(cond ((modulep! :completion vertico) #'citar-open-entry)
|
||||
((modulep! :completion ivy) #'ivy-bibtex)
|
||||
((modulep! :completion helm) #'helm-bibtex)))
|
||||
|
||||
:desc "Toggle last org-clock" "c" #'+org/toggle-last-clock
|
||||
:desc "Cancel current org-clock" "C" #'org-clock-cancel
|
||||
:desc "Open deft" "d" #'deft
|
||||
(:when (featurep! :lang org +noter)
|
||||
(:when (modulep! :lang org +noter)
|
||||
:desc "Org noter" "e" #'org-noter)
|
||||
|
||||
:desc "Find file in notes" "f" #'+default/find-in-notes
|
||||
|
@ -181,12 +181,12 @@
|
|||
:desc "View search" "v" #'org-search-view
|
||||
:desc "Org export to clipboard" "y" #'+org/export-to-clipboard
|
||||
:desc "Org export to clipboard as RTF" "Y" #'+org/export-to-clipboard-as-rich-text
|
||||
(:when (featurep! :lang org +journal)
|
||||
(:when (modulep! :lang org +journal)
|
||||
(:prefix ("j" . "journal")
|
||||
:desc "New Entry" "j" #'org-journal-new-entry
|
||||
:desc "New Scheduled Entry" "J" #'org-journal-new-scheduled-entry
|
||||
:desc "Search Forever" "s" #'org-journal-search-forever))
|
||||
(:when (featurep! :lang org +roam)
|
||||
(:when (modulep! :lang org +roam)
|
||||
(:prefix ("r" . "roam")
|
||||
:desc "Switch to buffer" "b" #'org-roam-switch-to-buffer
|
||||
:desc "Org Roam Capture" "c" #'org-roam-capture
|
||||
|
@ -202,7 +202,7 @@
|
|||
:desc "Today" "t" #'org-roam-dailies-find-today
|
||||
:desc "Tomorrow" "m" #'org-roam-dailies-find-tomorrow
|
||||
:desc "Yesterday" "y" #'org-roam-dailies-find-yesterday)))
|
||||
(:when (featurep! :lang org +roam2)
|
||||
(:when (modulep! :lang org +roam2)
|
||||
(:prefix ("r" . "roam")
|
||||
:desc "Open random node" "a" #'org-roam-node-random
|
||||
:desc "Find node" "f" #'org-roam-node-find
|
||||
|
@ -236,25 +236,25 @@
|
|||
:desc "REPL" "r" #'+eval/open-repl-other-window
|
||||
:desc "REPL (same window)" "R" #'+eval/open-repl-same-window
|
||||
:desc "Dired" "-" #'dired-jump
|
||||
(:when (featurep! :ui neotree)
|
||||
(:when (modulep! :ui neotree)
|
||||
:desc "Project sidebar" "p" #'+neotree/open
|
||||
:desc "Find file in project sidebar" "P" #'+neotree/find-this-file)
|
||||
(:when (featurep! :ui treemacs)
|
||||
(:when (modulep! :ui treemacs)
|
||||
:desc "Project sidebar" "p" #'+treemacs/toggle
|
||||
:desc "Find file in project rsidebar" "P" #'treemacs-find-file)
|
||||
(:when (featurep! :term shell)
|
||||
(:when (modulep! :term shell)
|
||||
:desc "Toggle shell popup" "t" #'+shell/toggle
|
||||
:desc "Open shell here" "T" #'+shell/here)
|
||||
(:when (featurep! :term term)
|
||||
(:when (modulep! :term term)
|
||||
:desc "Toggle terminal popup" "t" #'+term/toggle
|
||||
:desc "Open terminal here" "T" #'+term/here)
|
||||
(:when (featurep! :term vterm)
|
||||
(:when (modulep! :term vterm)
|
||||
:desc "Toggle vterm popup" "t" #'+vterm/toggle
|
||||
:desc "Open vterm here" "T" #'+vterm/here)
|
||||
(:when (featurep! :term eshell)
|
||||
(:when (modulep! :term eshell)
|
||||
:desc "Toggle eshell popup" "e" #'+eshell/toggle
|
||||
:desc "Open eshell here" "E" #'+eshell/here)
|
||||
(:when (featurep! :os macos)
|
||||
(:when (modulep! :os macos)
|
||||
:desc "Reveal in Finder" "o" #'+macos/reveal-in-finder
|
||||
:desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder
|
||||
:desc "Send to Transmit" "u" #'+macos/send-to-transmit
|
||||
|
@ -263,13 +263,13 @@
|
|||
:desc "Send project to Launchbar" "L" #'+macos/send-project-to-launchbar
|
||||
:desc "Open in iTerm" "i" #'+macos/open-in-iterm
|
||||
:desc "Open in new iTerm window" "I" #'+macos/open-in-iterm-new-window)
|
||||
(:when (featurep! :tools docker)
|
||||
(:when (modulep! :tools docker)
|
||||
:desc "Docker" "D" #'docker)
|
||||
(:when (featurep! :email mu4e)
|
||||
(:when (modulep! :email mu4e)
|
||||
:desc "mu4e" "m" #'=mu4e)
|
||||
(:when (featurep! :email notmuch)
|
||||
(:when (modulep! :email notmuch)
|
||||
:desc "notmuch" "m" #'=notmuch)
|
||||
(:when (featurep! :email wanderlust)
|
||||
(:when (modulep! :email wanderlust)
|
||||
:desc "wanderlust" "m" #'=wanderlust))
|
||||
|
||||
|
||||
|
@ -281,9 +281,9 @@
|
|||
:desc "List project todos" "t" #'magit-todos-list
|
||||
:desc "Open project scratch buffer" "x" #'doom/open-project-scratch-buffer
|
||||
:desc "Switch to project scratch buffer" "X" #'doom/switch-to-project-scratch-buffer
|
||||
(:when (and (featurep! :tools taskrunner)
|
||||
(or (featurep! :completion ivy)
|
||||
(featurep! :completion helm)))
|
||||
(:when (and (modulep! :tools taskrunner)
|
||||
(or (modulep! :completion ivy)
|
||||
(modulep! :completion helm)))
|
||||
:desc "List project tasks" "z" #'+taskrunner/project-tasks)
|
||||
;; later expanded by projectile
|
||||
(:prefix ("4" . "in other window"))
|
||||
|
@ -322,24 +322,24 @@
|
|||
:desc "Indent style" "I" #'doom/toggle-indent-style
|
||||
:desc "Line numbers" "l" #'doom/toggle-line-numbers
|
||||
:desc "Soft line wrapping" "w" #'visual-line-mode
|
||||
(:when (featurep! :editor word-wrap)
|
||||
(:when (modulep! :editor word-wrap)
|
||||
:desc "Soft line wrapping" "w" #'+word-wrap-mode)
|
||||
(:when (featurep! :checkers syntax)
|
||||
(:when (modulep! :checkers syntax)
|
||||
:desc "Flycheck" "f" #'flycheck-mode)
|
||||
(:when (featurep! :ui indent-guides)
|
||||
(:when (modulep! :ui indent-guides)
|
||||
:desc "Indent guides" "i" #'highlight-indent-guides-mode)
|
||||
(:when (featurep! :ui minimap)
|
||||
(:when (modulep! :ui minimap)
|
||||
:desc "Minimap mode" "m" #'minimap-mode)
|
||||
(:when (featurep! :lang org +present)
|
||||
(:when (modulep! :lang org +present)
|
||||
:desc "org-tree-slide mode" "p" #'org-tree-slide-mode)
|
||||
:desc "Read-only mode" "r" #'read-only-mode
|
||||
(:when (and (featurep! :checkers spell) (not (featurep! :checkers spell +flyspell)))
|
||||
(:when (and (modulep! :checkers spell) (not (modulep! :checkers spell +flyspell)))
|
||||
:desc "Spell checker" "s" #'spell-fu-mode)
|
||||
(:when (featurep! :checkers spell +flyspell)
|
||||
(:when (modulep! :checkers spell +flyspell)
|
||||
:desc "Spell checker" "s" #'flyspell-mode)
|
||||
(:when (featurep! :lang org +pomodoro)
|
||||
(:when (modulep! :lang org +pomodoro)
|
||||
:desc "Pomodoro timer" "t" #'org-pomodoro)
|
||||
(:when (featurep! :ui zen)
|
||||
(:when (modulep! :ui zen)
|
||||
:desc "Zen mode" "z" #'+zen/toggle
|
||||
:desc "Zen mode (fullscreen)" "Z" #'+zen/toggle-fullscreen))
|
||||
|
||||
|
@ -348,13 +348,13 @@
|
|||
:desc "Git revert file" "R" #'vc-revert
|
||||
:desc "Kill link to remote" "y" #'+vc/browse-at-remote-kill
|
||||
:desc "Kill link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage
|
||||
(:when (featurep! :ui vc-gutter)
|
||||
(:when (modulep! :ui vc-gutter)
|
||||
:desc "Git revert hunk" "r" #'+vc-gutter/revert-hunk
|
||||
:desc "Git stage hunk" "s" #'+vc-gutter/stage-hunk
|
||||
:desc "Git time machine" "t" #'git-timemachine-toggle
|
||||
:desc "Jump to next hunk" "n" #'+vc-gutter/next-hunk
|
||||
:desc "Jump to previous hunk" "p" #'+vc-gutter/previous-hunk)
|
||||
(:when (featurep! :tools magit)
|
||||
(:when (modulep! :tools magit)
|
||||
:desc "Magit dispatch" "/" #'magit-dispatch
|
||||
:desc "Magit file dispatch" "." #'magit-file-dispatch
|
||||
:desc "Forge dispatch" "'" #'forge-dispatch
|
||||
|
@ -383,7 +383,7 @@
|
|||
:desc "Browse issues" "I" #'forge-browse-issues
|
||||
:desc "Browse pull requests" "P" #'forge-browse-pullreqs)
|
||||
(:prefix ("l" . "list")
|
||||
(:when (featurep! :tools gist)
|
||||
(:when (modulep! :tools gist)
|
||||
:desc "List gists" "g" #'gist-list)
|
||||
:desc "List repositories" "r" #'magit-list-repositories
|
||||
:desc "List submodules" "s" #'magit-list-submodules
|
||||
|
@ -400,7 +400,7 @@
|
|||
|
||||
;;; <leader> w --- workspaces/windows
|
||||
(:prefix-map ("w" . "workspaces/windows")
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
:desc "Display workspaces" "d" #'+workspace/display
|
||||
:desc "Rename workspace" "r" #'+workspace/rename
|
||||
:desc "Create workspace" "c" #'+workspace/new
|
||||
|
@ -429,7 +429,7 @@
|
|||
:desc "Redo window config" "U" #'winner-redo)
|
||||
|
||||
;;; <leader> m --- multiple cursors
|
||||
(:when (featurep! :editor multiple-cursors)
|
||||
(:when (modulep! :editor multiple-cursors)
|
||||
(:prefix-map ("m" . "multiple-cursors")
|
||||
:desc "Edit lines" "l" #'mc/edit-lines
|
||||
:desc "Mark next" "n" #'mc/mark-next-like-this
|
||||
|
@ -446,26 +446,26 @@
|
|||
|
||||
;; APPs
|
||||
;;; <leader> M --- mu4e
|
||||
(:when (featurep! :email mu4e)
|
||||
(:when (modulep! :email mu4e)
|
||||
(:prefix-map ("M" . "mu4e")
|
||||
:desc "Open email app" "M" #'=mu4e
|
||||
:desc "Compose email" "c" #'+mu4e/compose))
|
||||
|
||||
;;; <leader> I --- IRC
|
||||
(:when (featurep! :app irc)
|
||||
(:when (modulep! :app irc)
|
||||
(:prefix-map ("I" . "irc")
|
||||
:desc "Open irc app" "I" #'=irc
|
||||
:desc "Next unread buffer" "a" #'tracking-next-buffer
|
||||
:desc "Quit irc" "q" #'+irc/quit
|
||||
:desc "Reconnect all" "r" #'circe-reconnect-all
|
||||
:desc "Send message" "s" #'+irc/send-message
|
||||
(:when (featurep! :completion ivy)
|
||||
(:when (modulep! :completion ivy)
|
||||
:desc "Jump to channel" "j" #'+irc/ivy-jump-to-channel)
|
||||
(:when (featurep! :completion vertico)
|
||||
(:when (modulep! :completion vertico)
|
||||
:desc "Jump to channel" "j" #'+irc/vertico-jump-to-channel)))
|
||||
|
||||
;;; <leader> T --- twitter
|
||||
(:when (featurep! :app twitter)
|
||||
(:when (modulep! :app twitter)
|
||||
(:prefix-map ("T" . "twitter")
|
||||
:desc "Open twitter app" "T" #'=twitter
|
||||
:desc "Quit twitter" "q" #'+twitter/quit
|
||||
|
@ -479,27 +479,27 @@
|
|||
(map! "C-'" #'imenu
|
||||
|
||||
;;; search
|
||||
(:when (featurep! :completion ivy)
|
||||
(:when (modulep! :completion ivy)
|
||||
"C-S-s" #'swiper
|
||||
"C-S-r" #'ivy-resume)
|
||||
(:when (featurep! :completion helm)
|
||||
(:when (modulep! :completion helm)
|
||||
"C-S-s" #'swiper-helm
|
||||
"C-S-r" #'helm-resume)
|
||||
(:when (featurep! :completion vertico)
|
||||
(:when (modulep! :completion vertico)
|
||||
"C-S-r" #'vertico-repeat)
|
||||
|
||||
;;; objed
|
||||
(:when (featurep! :editor objed +manual)
|
||||
(:when (modulep! :editor objed +manual)
|
||||
"M-SPC" #'objed-activate)
|
||||
|
||||
;;; buffer management
|
||||
"C-x b" #'switch-to-buffer
|
||||
"C-x 4 b" #'switch-to-buffer-other-window
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
"C-x b" #'persp-switch-to-buffer
|
||||
"C-x B" #'switch-to-buffer
|
||||
"C-x 4 B" #'switch-to-buffer-other-window
|
||||
(:when (featurep! :completion ivy)
|
||||
(:when (modulep! :completion ivy)
|
||||
"C-x 4 b" #'+ivy/switch-workspace-buffer-other-window))
|
||||
"C-x C-b" #'ibuffer
|
||||
"C-x K" #'doom/kill-this-buffer-in-all-windows
|
||||
|
@ -518,12 +518,12 @@
|
|||
[C-tab] #'company-complete-common-or-cycle
|
||||
[tab] #'company-complete-common-or-cycle
|
||||
[backtab] #'company-select-previous
|
||||
"C-RET" (cond ((featurep! :completion vertico) #'completion-at-point)
|
||||
((featurep! :completion ivy) #'counsel-company)
|
||||
((featurep! :completion helm) #'helm-company))
|
||||
"C-<return>" (cond ((featurep! :completion vertico) #'completion-at-point)
|
||||
((featurep! :completion ivy) #'counsel-company)
|
||||
((featurep! :completion helm) #'helm-company))
|
||||
"C-RET" (cond ((modulep! :completion vertico) #'completion-at-point)
|
||||
((modulep! :completion ivy) #'counsel-company)
|
||||
((modulep! :completion helm) #'helm-company))
|
||||
"C-<return>" (cond ((modulep! :completion vertico) #'completion-at-point)
|
||||
((modulep! :completion ivy) #'counsel-company)
|
||||
((modulep! :completion helm) #'helm-company))
|
||||
:map company-search-map
|
||||
"C-n" #'company-search-repeat-forward
|
||||
"C-p" #'company-search-repeat-backward
|
||||
|
@ -565,7 +565,7 @@
|
|||
"o" #'link-hint-open-link)
|
||||
|
||||
;;; ivy & counsel
|
||||
(:when (featurep! :completion ivy)
|
||||
(:when (modulep! :completion ivy)
|
||||
(:after ivy
|
||||
:map ivy-minibuffer-map
|
||||
"TAB" #'ivy-alt-done
|
||||
|
@ -577,7 +577,7 @@
|
|||
"C-M-y" #'counsel-yank-pop)
|
||||
|
||||
;;; neotree
|
||||
(:when (featurep! :ui neotree)
|
||||
(:when (modulep! :ui neotree)
|
||||
"<f9>" #'+neotree/open
|
||||
"<C-f9>" #'+neotree/find-this-file
|
||||
(:after neotree
|
||||
|
@ -600,7 +600,7 @@
|
|||
"P" #'neotree-select-previous-sibling-node))
|
||||
|
||||
;;; popups
|
||||
(:when (featurep! :ui popup)
|
||||
(:when (modulep! :ui popup)
|
||||
"C-x p" #'+popup/other
|
||||
"C-`" #'+popup/toggle
|
||||
"C-~" #'+popup/raise)
|
||||
|
@ -621,12 +621,12 @@
|
|||
"C-M-<backspace>" #'sp-splice-sexp)
|
||||
|
||||
;;; treemacs
|
||||
(:when (featurep! :ui treemacs)
|
||||
(:when (modulep! :ui treemacs)
|
||||
"<f9>" #'+treemacs/toggle
|
||||
"<C-f9>" #'treemacs-find-file))
|
||||
|
||||
(map! :leader
|
||||
(:when (featurep! :editor fold)
|
||||
(:when (modulep! :editor fold)
|
||||
(:prefix ("C-f" . "fold")
|
||||
"C-d" #'vimish-fold-delete
|
||||
"C-a C-d" #'vimish-fold-delete-all
|
||||
|
|
|
@ -22,5 +22,5 @@
|
|||
;;
|
||||
;;; Keybinds
|
||||
|
||||
(when (featurep! +bindings)
|
||||
(when (modulep! +bindings)
|
||||
(load! "+emacs-bindings"))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; config/default/+bindings.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (featurep! :editor evil +everywhere)
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
;; NOTE SPC u replaces C-u as the universal argument.
|
||||
|
||||
;; Minibuffer
|
||||
|
@ -38,18 +38,18 @@
|
|||
;;; Global keybindings
|
||||
|
||||
;; Smart tab, these will only work in GUI Emacs
|
||||
(map! :i [tab] (cmds! (and (featurep! :editor snippets)
|
||||
(map! :i [tab] (cmds! (and (modulep! :editor snippets)
|
||||
(yas-maybe-expand-abbrev-key-filter 'yas-expand))
|
||||
#'yas-expand
|
||||
(and (bound-and-true-p company-mode)
|
||||
(featurep! :completion company +tng))
|
||||
(modulep! :completion company +tng))
|
||||
#'company-indent-or-complete-common)
|
||||
:m [tab] (cmds! (and (featurep! :editor snippets)
|
||||
:m [tab] (cmds! (and (modulep! :editor snippets)
|
||||
(evil-visual-state-p)
|
||||
(or (eq evil-visual-selection 'line)
|
||||
(not (memq (char-after) (list ?\( ?\[ ?\{ ?\} ?\] ?\))))))
|
||||
#'yas-insert-snippet
|
||||
(and (featurep! :editor fold)
|
||||
(and (modulep! :editor fold)
|
||||
(save-excursion (end-of-line) (invisible-p (point))))
|
||||
#'+fold/toggle
|
||||
;; Fixes #4548: without this, this tab keybind overrides
|
||||
|
@ -86,12 +86,12 @@
|
|||
(:after geiser-doc :map geiser-doc-mode-map
|
||||
:n "o" #'link-hint-open-link)
|
||||
|
||||
(:unless (featurep! :input layout +bepo)
|
||||
(:unless (modulep! :input layout +bepo)
|
||||
(:after (evil-org evil-easymotion)
|
||||
:map evil-org-mode-map
|
||||
:m "gsh" #'+org/goto-visible))
|
||||
|
||||
(:when (featurep! :editor multiple-cursors)
|
||||
(:when (modulep! :editor multiple-cursors)
|
||||
:prefix "gz"
|
||||
:nv "d" #'evil-mc-make-and-goto-next-match
|
||||
:nv "D" #'evil-mc-make-and-goto-prev-match
|
||||
|
@ -128,7 +128,7 @@
|
|||
;;; Module keybinds
|
||||
|
||||
;;; :completion
|
||||
(map! (:when (featurep! :completion company)
|
||||
(map! (:when (modulep! :completion company)
|
||||
:i "C-@" (cmds! (not (minibufferp)) #'company-complete-common)
|
||||
:i "C-SPC" (cmds! (not (minibufferp)) #'company-complete-common)
|
||||
(:after company
|
||||
|
@ -142,9 +142,9 @@
|
|||
"C-u" #'company-previous-page
|
||||
"C-d" #'company-next-page
|
||||
"C-s" #'company-filter-candidates
|
||||
"C-S-s" (cond ((featurep! :completion vertico) #'completion-at-point)
|
||||
((featurep! :completion ivy) #'counsel-company)
|
||||
((featurep! :completion helm) #'helm-company))
|
||||
"C-S-s" (cond ((modulep! :completion vertico) #'completion-at-point)
|
||||
((modulep! :completion ivy) #'counsel-company)
|
||||
((modulep! :completion helm) #'helm-company))
|
||||
"C-SPC" #'company-complete-common
|
||||
"TAB" #'company-complete-common-or-cycle
|
||||
[tab] #'company-complete-common-or-cycle
|
||||
|
@ -158,7 +158,7 @@
|
|||
"C-s" #'company-filter-candidates
|
||||
[escape] #'company-search-abort)))
|
||||
|
||||
(:when (featurep! :completion ivy)
|
||||
(:when (modulep! :completion ivy)
|
||||
(:after ivy
|
||||
:map ivy-minibuffer-map
|
||||
"C-SPC" #'ivy-call-and-recenter ; preview file
|
||||
|
@ -170,7 +170,7 @@
|
|||
"C-l" #'ivy-done
|
||||
[C-return] #'+ivy/git-grep-other-window-action))
|
||||
|
||||
(:when (featurep! :completion helm)
|
||||
(:when (modulep! :completion helm)
|
||||
(:after helm :map helm-map
|
||||
[remap next-line] #'helm-next-line
|
||||
[remap previous-line] #'helm-previous-line
|
||||
|
@ -179,7 +179,7 @@
|
|||
"C-S-f" #'helm-previous-page
|
||||
"C-S-n" #'helm-next-source
|
||||
"C-S-p" #'helm-previous-source
|
||||
(:when (featurep! :editor evil +everywhere)
|
||||
(:when (modulep! :editor evil +everywhere)
|
||||
"C-j" #'helm-next-line
|
||||
"C-k" #'helm-previous-line
|
||||
"C-S-j" #'helm-next-source
|
||||
|
@ -207,7 +207,7 @@
|
|||
(:after helm-grep :map helm-grep-map
|
||||
[C-return] #'helm-grep-run-other-window-action))
|
||||
|
||||
(:when (featurep! :completion vertico)
|
||||
(:when (modulep! :completion vertico)
|
||||
(:after vertico
|
||||
:map vertico-map
|
||||
"M-RET" #'vertico-exit-input
|
||||
|
@ -219,12 +219,12 @@
|
|||
|
||||
|
||||
;;; :ui
|
||||
(map! (:when (featurep! :ui popup)
|
||||
(map! (:when (modulep! :ui popup)
|
||||
"C-`" #'+popup/toggle
|
||||
"C-~" #'+popup/raise
|
||||
"C-x p" #'+popup/other)
|
||||
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
:n "C-t" #'+workspace/new
|
||||
:n "C-S-t" #'+workspace/display
|
||||
:g "M-1" #'+workspace/switch-to-0
|
||||
|
@ -252,14 +252,14 @@
|
|||
:n "s-0" #'+workspace/switch-to-final)))
|
||||
|
||||
;;; :editor
|
||||
(map! (:when (featurep! :editor format)
|
||||
(map! (:when (modulep! :editor format)
|
||||
:n "gQ" #'+format:region)
|
||||
|
||||
(:when (featurep! :editor rotate-text)
|
||||
(:when (modulep! :editor rotate-text)
|
||||
:n "]r" #'rotate-text
|
||||
:n "[r" #'rotate-text-backward)
|
||||
|
||||
(:when (featurep! :editor multiple-cursors)
|
||||
(:when (modulep! :editor multiple-cursors)
|
||||
;; evil-multiedit
|
||||
:v "R" #'evil-multiedit-match-all
|
||||
:n "M-d" #'evil-multiedit-match-symbol-and-next
|
||||
|
@ -273,13 +273,13 @@
|
|||
:nv "M-D" #'evil-multiedit-match-and-prev
|
||||
[return] #'evil-multiedit-toggle-or-restrict-region)))
|
||||
|
||||
(:when (featurep! :editor snippets)
|
||||
(:when (modulep! :editor snippets)
|
||||
;; auto-yasnippet
|
||||
:i [C-tab] #'aya-expand
|
||||
:nv [C-tab] #'aya-create))
|
||||
|
||||
;;; :tools
|
||||
(when (featurep! :tools eval)
|
||||
(when (modulep! :tools eval)
|
||||
(map! "M-r" #'+eval/buffer))
|
||||
|
||||
|
||||
|
@ -296,18 +296,18 @@
|
|||
:desc "window" "w" evil-window-map
|
||||
:desc "help" "h" help-map
|
||||
|
||||
(:when (featurep! :ui popup)
|
||||
(:when (modulep! :ui popup)
|
||||
:desc "Toggle last popup" "~" #'+popup/toggle)
|
||||
:desc "Find file" "." #'find-file
|
||||
:desc "Switch buffer" "," #'switch-to-buffer
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
:desc "Switch workspace buffer" "," #'persp-switch-to-buffer
|
||||
:desc "Switch buffer" "<" #'switch-to-buffer)
|
||||
:desc "Switch to last buffer" "`" #'evil-switch-to-windows-last-buffer
|
||||
:desc "Resume last search" "'"
|
||||
(cond ((featurep! :completion vertico) #'vertico-repeat)
|
||||
((featurep! :completion ivy) #'ivy-resume)
|
||||
((featurep! :completion helm) #'helm-resume))
|
||||
(cond ((modulep! :completion vertico) #'vertico-repeat)
|
||||
((modulep! :completion ivy) #'ivy-resume)
|
||||
((modulep! :completion helm) #'helm-resume))
|
||||
|
||||
:desc "Search for symbol in project" "*" #'+default/search-project-for-symbol-at-point
|
||||
:desc "Search project" "/" #'+default/search-project
|
||||
|
@ -316,7 +316,7 @@
|
|||
:desc "Jump to bookmark" "RET" #'bookmark-jump
|
||||
|
||||
;;; <leader> TAB --- workspace
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
(:prefix-map ("TAB" . "workspace")
|
||||
:desc "Display tab bar" "TAB" #'+workspace/display
|
||||
:desc "Switch workspace" "." #'+workspace/switch-to
|
||||
|
@ -347,11 +347,11 @@
|
|||
:desc "Toggle narrowing" "-" #'doom/toggle-narrow-buffer
|
||||
:desc "Previous buffer" "[" #'previous-buffer
|
||||
:desc "Next buffer" "]" #'next-buffer
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
:desc "Switch workspace buffer" "b" #'persp-switch-to-buffer
|
||||
:desc "Switch buffer" "B" #'switch-to-buffer
|
||||
:desc "ibuffer workspace" "I" #'+ibuffer/open-for-current-workspace)
|
||||
(:unless (featurep! :ui workspaces)
|
||||
(:unless (modulep! :ui workspaces)
|
||||
:desc "Switch buffer" "b" #'switch-to-buffer)
|
||||
:desc "Clone buffer" "c" #'clone-indirect-buffer
|
||||
:desc "Clone buffer other window" "C" #'clone-indirect-buffer-other-window
|
||||
|
@ -379,19 +379,19 @@
|
|||
|
||||
;;; <leader> c --- code
|
||||
(:prefix-map ("c" . "code")
|
||||
(:when (and (featurep! :tools lsp) (not (featurep! :tools lsp +eglot)))
|
||||
(:when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot)))
|
||||
:desc "LSP Execute code action" "a" #'lsp-execute-code-action
|
||||
:desc "LSP Organize imports" "o" #'lsp-organize-imports
|
||||
(:when (featurep! :completion ivy)
|
||||
(:when (modulep! :completion ivy)
|
||||
:desc "Jump to symbol in current workspace" "j" #'lsp-ivy-workspace-symbol
|
||||
:desc "Jump to symbol in any workspace" "J" #'lsp-ivy-global-workspace-symbol)
|
||||
(:when (featurep! :completion helm)
|
||||
(:when (modulep! :completion helm)
|
||||
:desc "Jump to symbol in current workspace" "j" #'helm-lsp-workspace-symbol
|
||||
:desc "Jump to symbol in any workspace" "J" #'helm-lsp-global-workspace-symbol)
|
||||
(:when (featurep! :completion vertico)
|
||||
(:when (modulep! :completion vertico)
|
||||
:desc "Jump to symbol in current workspace" "j" #'consult-lsp-symbols
|
||||
:desc "Jump to symbol in any workspace" "J" (cmd!! #'consult-lsp-symbols 'all-workspaces))
|
||||
(:when (featurep! :ui treemacs +lsp)
|
||||
(:when (modulep! :ui treemacs +lsp)
|
||||
:desc "Errors list" "X" #'lsp-treemacs-errors-list
|
||||
:desc "Incoming call hierarchy" "y" #'lsp-treemacs-call-hierarchy
|
||||
:desc "Outgoing call hierarchy" "Y" (cmd!! #'lsp-treemacs-call-hierarchy t)
|
||||
|
@ -399,11 +399,11 @@
|
|||
:desc "Symbols" "S" #'lsp-treemacs-symbols)
|
||||
:desc "LSP" "l" #'+default/lsp-command-map
|
||||
:desc "LSP Rename" "r" #'lsp-rename)
|
||||
(:when (featurep! :tools lsp +eglot)
|
||||
(:when (modulep! :tools lsp +eglot)
|
||||
:desc "LSP Execute code action" "a" #'eglot-code-actions
|
||||
:desc "LSP Rename" "r" #'eglot-rename
|
||||
:desc "LSP Find declaration" "j" #'eglot-find-declaration
|
||||
(:when (featurep! :completion vertico)
|
||||
(:when (modulep! :completion vertico)
|
||||
:desc "Jump to symbol in current workspace" "j" #'consult-eglot-symbols))
|
||||
:desc "Compile" "c" #'compile
|
||||
:desc "Recompile" "C" #'recompile
|
||||
|
@ -447,17 +447,17 @@
|
|||
:desc "Revert file" "R" #'vc-revert
|
||||
:desc "Copy link to remote" "y" #'+vc/browse-at-remote-kill
|
||||
:desc "Copy link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage
|
||||
(:when (featurep! :ui hydra)
|
||||
(:when (modulep! :ui hydra)
|
||||
:desc "SMerge" "m" #'+vc/smerge-hydra/body)
|
||||
(:when (featurep! :ui vc-gutter)
|
||||
(:when (featurep! :ui hydra)
|
||||
(:when (modulep! :ui vc-gutter)
|
||||
(:when (modulep! :ui hydra)
|
||||
:desc "VCGutter" "." #'+vc/gutter-hydra/body)
|
||||
:desc "Revert hunk at point" "r" #'+vc-gutter/revert-hunk
|
||||
:desc "stage hunk at point" "s" #'+vc-gutter/stage-hunk
|
||||
:desc "Git time machine" "t" #'git-timemachine-toggle
|
||||
:desc "Jump to next hunk" "]" #'+vc-gutter/next-hunk
|
||||
:desc "Jump to previous hunk" "[" #'+vc-gutter/previous-hunk)
|
||||
(:when (featurep! :tools magit)
|
||||
(:when (modulep! :tools magit)
|
||||
:desc "Magit dispatch" "/" #'magit-dispatch
|
||||
:desc "Magit file dispatch" "." #'magit-file-dispatch
|
||||
:desc "Forge dispatch" "'" #'forge-dispatch
|
||||
|
@ -487,7 +487,7 @@
|
|||
:desc "Browse issues" "I" #'forge-browse-issues
|
||||
:desc "Browse pull requests" "P" #'forge-browse-pullreqs)
|
||||
(:prefix ("l" . "list")
|
||||
(:when (featurep! :tools gist)
|
||||
(:when (modulep! :tools gist)
|
||||
:desc "List gists" "g" #'+gist:list)
|
||||
:desc "List repositories" "r" #'magit-list-repositories
|
||||
:desc "List submodules" "s" #'magit-list-submodules
|
||||
|
@ -518,16 +518,16 @@
|
|||
(:prefix-map ("n" . "notes")
|
||||
:desc "Search notes for symbol" "*" #'+default/search-notes-for-symbol-at-point
|
||||
:desc "Org agenda" "a" #'org-agenda
|
||||
(:when (featurep! :tools biblio)
|
||||
(:when (modulep! :tools biblio)
|
||||
:desc "Bibliographic entries" "b"
|
||||
(cond ((featurep! :completion vertico) #'citar-open-entry)
|
||||
((featurep! :completion ivy) #'ivy-bibtex)
|
||||
((featurep! :completion helm) #'helm-bibtex)))
|
||||
(cond ((modulep! :completion vertico) #'citar-open-entry)
|
||||
((modulep! :completion ivy) #'ivy-bibtex)
|
||||
((modulep! :completion helm) #'helm-bibtex)))
|
||||
|
||||
:desc "Toggle last org-clock" "c" #'+org/toggle-last-clock
|
||||
:desc "Cancel current org-clock" "C" #'org-clock-cancel
|
||||
:desc "Open deft" "d" #'deft
|
||||
(:when (featurep! :lang org +noter)
|
||||
(:when (modulep! :lang org +noter)
|
||||
:desc "Org noter" "e" #'org-noter)
|
||||
|
||||
:desc "Find file in notes" "f" #'+default/find-in-notes
|
||||
|
@ -544,7 +544,7 @@
|
|||
:desc "Org export to clipboard" "y" #'+org/export-to-clipboard
|
||||
:desc "Org export to clipboard as RTF" "Y" #'+org/export-to-clipboard-as-rich-text
|
||||
|
||||
(:when (featurep! :lang org +roam)
|
||||
(:when (modulep! :lang org +roam)
|
||||
(:prefix ("r" . "roam")
|
||||
:desc "Switch to buffer" "b" #'org-roam-switch-to-buffer
|
||||
:desc "Org Roam Capture" "c" #'org-roam-capture
|
||||
|
@ -559,7 +559,7 @@
|
|||
:desc "Tomorrow" "m" #'org-roam-dailies-find-tomorrow
|
||||
:desc "Yesterday" "y" #'org-roam-dailies-find-yesterday)))
|
||||
|
||||
(:when (featurep! :lang org +roam2)
|
||||
(:when (modulep! :lang org +roam2)
|
||||
(:prefix ("r" . "roam")
|
||||
:desc "Open random node" "a" #'org-roam-node-random
|
||||
:desc "Find node" "f" #'org-roam-node-find
|
||||
|
@ -584,7 +584,7 @@
|
|||
:desc "Capture yesterday" "Y" #'org-roam-dailies-capture-yesterday
|
||||
:desc "Find directory" "-" #'org-roam-dailies-find-directory)))
|
||||
|
||||
(:when (featurep! :lang org +journal)
|
||||
(:when (modulep! :lang org +journal)
|
||||
(:prefix ("j" . "journal")
|
||||
:desc "New Entry" "j" #'org-journal-new-entry
|
||||
:desc "New Scheduled Entry" "J" #'org-journal-new-scheduled-entry
|
||||
|
@ -605,25 +605,25 @@
|
|||
:desc "REPL" "r" #'+eval/open-repl-other-window
|
||||
:desc "REPL (same window)" "R" #'+eval/open-repl-same-window
|
||||
:desc "Dired" "-" #'dired-jump
|
||||
(:when (featurep! :ui neotree)
|
||||
(:when (modulep! :ui neotree)
|
||||
:desc "Project sidebar" "p" #'+neotree/open
|
||||
:desc "Find file in project sidebar" "P" #'+neotree/find-this-file)
|
||||
(:when (featurep! :ui treemacs)
|
||||
(:when (modulep! :ui treemacs)
|
||||
:desc "Project sidebar" "p" #'+treemacs/toggle
|
||||
:desc "Find file in project sidebar" "P" #'treemacs-find-file)
|
||||
(:when (featurep! :term shell)
|
||||
(:when (modulep! :term shell)
|
||||
:desc "Toggle shell popup" "t" #'+shell/toggle
|
||||
:desc "Open shell here" "T" #'+shell/here)
|
||||
(:when (featurep! :term term)
|
||||
(:when (modulep! :term term)
|
||||
:desc "Toggle terminal popup" "t" #'+term/toggle
|
||||
:desc "Open terminal here" "T" #'+term/here)
|
||||
(:when (featurep! :term vterm)
|
||||
(:when (modulep! :term vterm)
|
||||
:desc "Toggle vterm popup" "t" #'+vterm/toggle
|
||||
:desc "Open vterm here" "T" #'+vterm/here)
|
||||
(:when (featurep! :term eshell)
|
||||
(:when (modulep! :term eshell)
|
||||
:desc "Toggle eshell popup" "e" #'+eshell/toggle
|
||||
:desc "Open eshell here" "E" #'+eshell/here)
|
||||
(:when (featurep! :os macos)
|
||||
(:when (modulep! :os macos)
|
||||
:desc "Reveal in Finder" "o" #'+macos/reveal-in-finder
|
||||
:desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder
|
||||
:desc "Send to Transmit" "u" #'+macos/send-to-transmit
|
||||
|
@ -632,13 +632,13 @@
|
|||
:desc "Send project to Launchbar" "L" #'+macos/send-project-to-launchbar
|
||||
:desc "Open in iTerm" "i" #'+macos/open-in-iterm
|
||||
:desc "Open in new iTerm window" "I" #'+macos/open-in-iterm-new-window)
|
||||
(:when (featurep! :tools docker)
|
||||
(:when (modulep! :tools docker)
|
||||
:desc "Docker" "D" #'docker)
|
||||
(:when (featurep! :email mu4e)
|
||||
(:when (modulep! :email mu4e)
|
||||
:desc "mu4e" "m" #'=mu4e)
|
||||
(:when (featurep! :email notmuch)
|
||||
(:when (modulep! :email notmuch)
|
||||
:desc "notmuch" "m" #'=notmuch)
|
||||
(:when (featurep! :email wanderlust)
|
||||
(:when (modulep! :email wanderlust)
|
||||
:desc "wanderlust" "m" #'=wanderlust))
|
||||
|
||||
;;; <leader> p --- project
|
||||
|
@ -668,9 +668,9 @@
|
|||
:desc "Test project" "T" #'projectile-test-project
|
||||
:desc "Pop up scratch buffer" "x" #'doom/open-project-scratch-buffer
|
||||
:desc "Switch to scratch buffer" "X" #'doom/switch-to-project-scratch-buffer
|
||||
(:when (and (featurep! :tools taskrunner)
|
||||
(or (featurep! :completion ivy)
|
||||
(featurep! :completion helm)))
|
||||
(:when (and (modulep! :tools taskrunner)
|
||||
(or (modulep! :completion ivy)
|
||||
(modulep! :completion helm)))
|
||||
:desc "List project tasks" "z" #'+taskrunner/project-tasks))
|
||||
|
||||
;;; <leader> q --- quit/session
|
||||
|
@ -689,7 +689,7 @@
|
|||
:desc "Restart Emacs" "R" #'doom/restart)
|
||||
|
||||
;;; <leader> r --- remote
|
||||
(:when (featurep! :tools upload)
|
||||
(:when (modulep! :tools upload)
|
||||
(:prefix-map ("r" . "remote")
|
||||
:desc "Browse remote" "b" #'ssh-deploy-browse-remote-base-handler
|
||||
:desc "Browse relative" "B" #'ssh-deploy-browse-remote-handler
|
||||
|
@ -709,13 +709,13 @@
|
|||
;;; <leader> s --- search
|
||||
(:prefix-map ("s" . "search")
|
||||
:desc "Search buffer" "b"
|
||||
(cond ((featurep! :completion vertico) #'+default/search-buffer)
|
||||
((featurep! :completion ivy) #'swiper)
|
||||
((featurep! :completion helm) #'swiper))
|
||||
(cond ((modulep! :completion vertico) #'+default/search-buffer)
|
||||
((modulep! :completion ivy) #'swiper)
|
||||
((modulep! :completion helm) #'swiper))
|
||||
:desc "Search all open buffers" "B"
|
||||
(cond ((featurep! :completion vertico) (cmd!! #'consult-line-multi 'all-buffers))
|
||||
((featurep! :completion ivy) #'swiper-all)
|
||||
((featurep! :completion helm) #'swiper-all))
|
||||
(cond ((modulep! :completion vertico) (cmd!! #'consult-line-multi 'all-buffers))
|
||||
((modulep! :completion ivy) #'swiper-all)
|
||||
((modulep! :completion helm) #'swiper-all))
|
||||
:desc "Search current directory" "d" #'+default/search-cwd
|
||||
:desc "Search other directory" "D" #'+default/search-other-cwd
|
||||
:desc "Search .emacs.d" "e" #'+default/search-emacsd
|
||||
|
@ -734,9 +734,9 @@
|
|||
:desc "Jump to mark" "r" #'evil-show-marks
|
||||
:desc "Search buffer" "s" #'+default/search-buffer
|
||||
:desc "Search buffer for thing at point" "S"
|
||||
(cond ((featurep! :completion vertico) #'+vertico/search-symbol-at-point)
|
||||
((featurep! :completion ivy) #'swiper-isearch-thing-at-point)
|
||||
((featurep! :completion helm) #'swiper-isearch-thing-at-point))
|
||||
(cond ((modulep! :completion vertico) #'+vertico/search-symbol-at-point)
|
||||
((modulep! :completion ivy) #'swiper-isearch-thing-at-point)
|
||||
((modulep! :completion helm) #'swiper-isearch-thing-at-point))
|
||||
:desc "Dictionary" "t" #'+lookup/dictionary-definition
|
||||
:desc "Thesaurus" "T" #'+lookup/synonyms)
|
||||
|
||||
|
@ -745,29 +745,29 @@
|
|||
:desc "Big mode" "b" #'doom-big-font-mode
|
||||
:desc "Fill Column Indicator" "c" #'global-display-fill-column-indicator-mode
|
||||
:desc "Flymake" "f" #'flymake-mode
|
||||
(:when (featurep! :checkers syntax)
|
||||
(:when (modulep! :checkers syntax)
|
||||
:desc "Flycheck" "f" #'flycheck-mode)
|
||||
:desc "Frame fullscreen" "F" #'toggle-frame-fullscreen
|
||||
:desc "Evil goggles" "g" #'evil-goggles-mode
|
||||
(:when (featurep! :ui indent-guides)
|
||||
(:when (modulep! :ui indent-guides)
|
||||
:desc "Indent guides" "i" #'highlight-indent-guides-mode)
|
||||
:desc "Indent style" "I" #'doom/toggle-indent-style
|
||||
:desc "Line numbers" "l" #'doom/toggle-line-numbers
|
||||
(:when (featurep! :ui minimap)
|
||||
(:when (modulep! :ui minimap)
|
||||
:desc "Minimap" "m" #'minimap-mode)
|
||||
(:when (featurep! :lang org +present)
|
||||
(:when (modulep! :lang org +present)
|
||||
:desc "org-tree-slide mode" "p" #'org-tree-slide-mode)
|
||||
:desc "Read-only mode" "r" #'read-only-mode
|
||||
(:when (and (featurep! :checkers spell) (not (featurep! :checkers spell +flyspell)))
|
||||
(:when (and (modulep! :checkers spell) (not (modulep! :checkers spell +flyspell)))
|
||||
:desc "Spell checker" "s" #'spell-fu-mode)
|
||||
(:when (featurep! :checkers spell +flyspell)
|
||||
(:when (modulep! :checkers spell +flyspell)
|
||||
:desc "Spell checker" "s" #'flyspell-mode)
|
||||
(:when (featurep! :lang org +pomodoro)
|
||||
(:when (modulep! :lang org +pomodoro)
|
||||
:desc "Pomodoro timer" "t" #'org-pomodoro)
|
||||
:desc "Soft line wrapping" "w" #'visual-line-mode
|
||||
(:when (featurep! :editor word-wrap)
|
||||
(:when (modulep! :editor word-wrap)
|
||||
:desc "Soft line wrapping" "w" #'+word-wrap-mode)
|
||||
(:when (featurep! :ui zen)
|
||||
(:when (modulep! :ui zen)
|
||||
:desc "Zen mode" "z" #'+zen/toggle
|
||||
:desc "Zen mode (fullscreen)" "Z" #'+zen/toggle-fullscreen)))
|
||||
|
||||
|
|
|
@ -17,5 +17,5 @@
|
|||
:prefix doom-leader-key "u" #'universal-argument-more
|
||||
:prefix doom-leader-alt-key "u" #'universal-argument-more)
|
||||
|
||||
(when (featurep! +bindings)
|
||||
(when (modulep! +bindings)
|
||||
(load! "+evil-bindings"))
|
||||
|
|
|
@ -32,7 +32,7 @@ generate `completing-read' candidates."
|
|||
(defun +default/new-buffer ()
|
||||
"TODO"
|
||||
(interactive)
|
||||
(if (featurep! 'evil)
|
||||
(if (modulep! 'evil)
|
||||
(call-interactively #'evil-buffer-new)
|
||||
(let ((buffer (generate-new-buffer "*new*")))
|
||||
(set-window-buffer nil buffer)
|
||||
|
@ -54,17 +54,17 @@ generate `completing-read' candidates."
|
|||
If the the vertico and lsp modules are active, list lsp diagnostics for the
|
||||
current project. Otherwise list them for the current buffer"
|
||||
(interactive)
|
||||
(cond ((and (featurep! :completion vertico)
|
||||
(featurep! :tools lsp)
|
||||
(cond ((and (modulep! :completion vertico)
|
||||
(modulep! :tools lsp)
|
||||
(bound-and-true-p lsp-mode))
|
||||
(consult-lsp-diagnostics arg))
|
||||
((and (featurep! :checkers syntax)
|
||||
((and (modulep! :checkers syntax)
|
||||
(bound-and-true-p flycheck-mode))
|
||||
(if (featurep! :completion vertico)
|
||||
(if (modulep! :completion vertico)
|
||||
(consult-flycheck)
|
||||
(flycheck-list-errors)))
|
||||
((bound-and-true-p flymake-mode)
|
||||
(if (featurep! :completion vertico)
|
||||
(if (modulep! :completion vertico)
|
||||
(consult-flymake)
|
||||
(flymake-show-diagnostics-buffer)))
|
||||
(t
|
||||
|
|
|
@ -10,9 +10,9 @@ If prefix ARG is set, prompt for a directory to search from."
|
|||
(read-directory-name "Search directory: ")
|
||||
default-directory)))
|
||||
(call-interactively
|
||||
(cond ((featurep! :completion ivy) #'+ivy/project-search-from-cwd)
|
||||
((featurep! :completion helm) #'+helm/project-search-from-cwd)
|
||||
((featurep! :completion vertico) #'+vertico/project-search-from-cwd)
|
||||
(cond ((modulep! :completion ivy) #'+ivy/project-search-from-cwd)
|
||||
((modulep! :completion helm) #'+helm/project-search-from-cwd)
|
||||
((modulep! :completion vertico) #'+vertico/project-search-from-cwd)
|
||||
(#'rgrep)))))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -27,9 +27,9 @@ If prefix ARG is set, prompt for a directory to search from."
|
|||
(interactive)
|
||||
(let ((default-directory doom-emacs-dir))
|
||||
(call-interactively
|
||||
(cond ((featurep! :completion ivy) #'+ivy/project-search-from-cwd)
|
||||
((featurep! :completion helm) #'+helm/project-search-from-cwd)
|
||||
((featurep! :completion vertico) #'+vertico/project-search-from-cwd)
|
||||
(cond ((modulep! :completion ivy) #'+ivy/project-search-from-cwd)
|
||||
((modulep! :completion helm) #'+helm/project-search-from-cwd)
|
||||
((modulep! :completion vertico) #'+vertico/project-search-from-cwd)
|
||||
(#'rgrep)))))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -52,13 +52,13 @@ input and search the whole buffer for it."
|
|||
(deactivate-mark)
|
||||
(when multiline-p
|
||||
(narrow-to-region start end)))
|
||||
(cond ((or (featurep! :completion helm)
|
||||
(featurep! :completion ivy))
|
||||
(cond ((or (modulep! :completion helm)
|
||||
(modulep! :completion ivy))
|
||||
(call-interactively
|
||||
(if (and start end (not multiline-p))
|
||||
#'swiper-isearch-thing-at-point
|
||||
#'swiper-isearch)))
|
||||
((featurep! :completion vertico)
|
||||
((modulep! :completion vertico)
|
||||
(if (and start end (not multiline-p))
|
||||
(consult-line
|
||||
(replace-regexp-in-string
|
||||
|
@ -82,9 +82,9 @@ If prefix ARG is set, include ignored/hidden files."
|
|||
(user-error "There are no known projects"))
|
||||
default-directory)))
|
||||
(call-interactively
|
||||
(cond ((featurep! :completion ivy) #'+ivy/project-search)
|
||||
((featurep! :completion helm) #'+helm/project-search)
|
||||
((featurep! :completion vertico) #'+vertico/project-search)
|
||||
(cond ((modulep! :completion ivy) #'+ivy/project-search)
|
||||
((modulep! :completion helm) #'+helm/project-search)
|
||||
((modulep! :completion vertico) #'+vertico/project-search)
|
||||
(#'projectile-ripgrep)))))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -105,11 +105,11 @@ If prefix ARG is set, prompt for a known project to search from."
|
|||
(completing-read "Search project: " projects nil t)
|
||||
(user-error "There are no known projects"))
|
||||
(doom-project-root default-directory)))))
|
||||
(cond ((featurep! :completion ivy)
|
||||
(cond ((modulep! :completion ivy)
|
||||
(+ivy/project-search nil symbol dir))
|
||||
((featurep! :completion helm)
|
||||
((modulep! :completion helm)
|
||||
(+helm/project-search nil symbol dir))
|
||||
((featurep! :completion vertico)
|
||||
((modulep! :completion vertico)
|
||||
(+vertico/project-search nil symbol dir))
|
||||
((rgrep (regexp-quote symbol)))))
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ possible, or just one char if that's not possible."
|
|||
(insert-char ?\s (- ocol (current-column)) nil))))
|
||||
;;
|
||||
((= n 1)
|
||||
(cond ((or (not (featurep! +smartparens))
|
||||
(cond ((or (not (modulep! +smartparens))
|
||||
(not (bound-and-true-p smartparens-mode))
|
||||
(and (memq (char-before) (list ?\ ?\t))
|
||||
(save-excursion
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
minibuffer-local-must-match-map
|
||||
minibuffer-local-isearch-map
|
||||
read-expression-map)
|
||||
(cond ((featurep! :completion ivy)
|
||||
(cond ((modulep! :completion ivy)
|
||||
'(ivy-minibuffer-map
|
||||
ivy-switch-buffer-map))
|
||||
((featurep! :completion helm)
|
||||
((modulep! :completion helm)
|
||||
'(helm-map
|
||||
helm-rg-map
|
||||
helm-read-file-map))))
|
||||
|
@ -83,7 +83,7 @@
|
|||
;;
|
||||
;;; Smartparens config
|
||||
|
||||
(when (featurep! +smartparens)
|
||||
(when (modulep! +smartparens)
|
||||
;; You can disable :unless predicates with (sp-pair "'" nil :unless nil)
|
||||
;; And disable :post-handlers with (sp-pair "{" nil :post-handlers nil)
|
||||
;; or specific :post-handlers with:
|
||||
|
@ -311,7 +311,7 @@ Continues comments if executed from a commented line. Consults
|
|||
"s-l" #'goto-line
|
||||
;; Restore OS undo, save, copy, & paste keys (without cua-mode, because
|
||||
;; it imposes some other functionality and overhead we don't need)
|
||||
"s-f" (if (featurep! :completion vertico) #'consult-line #'swiper)
|
||||
"s-f" (if (modulep! :completion vertico) #'consult-line #'swiper)
|
||||
"s-z" #'undo
|
||||
"s-Z" #'redo
|
||||
"s-c" (if (featurep 'evil) #'evil-yank #'copy-region-as-kill)
|
||||
|
@ -433,7 +433,7 @@ Continues comments if executed from a commented line. Consults
|
|||
which-key-replacement-alist)))
|
||||
|
||||
|
||||
(when (featurep! +bindings)
|
||||
(when (modulep! +bindings)
|
||||
;; Make M-x harder to miss
|
||||
(define-key! 'override
|
||||
"M-x" #'execute-extended-command
|
||||
|
@ -441,15 +441,15 @@ Continues comments if executed from a commented line. Consults
|
|||
|
||||
;; A Doom convention where C-s on popups and interactive searches will invoke
|
||||
;; ivy/helm/vertico for their superior filtering.
|
||||
(when-let (command (cond ((featurep! :completion ivy)
|
||||
(when-let (command (cond ((modulep! :completion ivy)
|
||||
#'counsel-minibuffer-history)
|
||||
((featurep! :completion helm)
|
||||
((modulep! :completion helm)
|
||||
#'helm-minibuffer-history)
|
||||
((featurep! :completion vertico)
|
||||
((modulep! :completion vertico)
|
||||
#'consult-history)))
|
||||
(define-key!
|
||||
:keymaps (append +default-minibuffer-maps
|
||||
(when (featurep! :editor evil +everywhere)
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
'(evil-ex-completion-map)))
|
||||
"C-s" command))
|
||||
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
(package! drag-stuff :pin "6d06d846cd37c052d79acd0f372c13006aa7e7c8")
|
||||
(package! link-hint :pin "676dac6621e321b33a8d396fa27dd0ea619d21e3")
|
||||
|
||||
(unless (featurep! :editor evil)
|
||||
(unless (modulep! :editor evil)
|
||||
(package! expand-region :pin "7e5bbe2763c12bae3e77fe0c49bcad05ff91dbfe"))
|
||||
|
|
|
@ -62,14 +62,14 @@
|
|||
(swiper-isearch search))
|
||||
(evil-ex-define-cmd "sw[iper]" #'+evil:swiper)
|
||||
|
||||
(cond ((featurep! :completion ivy)
|
||||
(cond ((modulep! :completion ivy)
|
||||
(evil-ex-define-cmd "pg[rep]" #'+ivy:project-search)
|
||||
(evil-ex-define-cmd "pg[grep]d" #'+ivy:project-search-from-cwd))
|
||||
|
||||
((featurep! :completion helm)
|
||||
((modulep! :completion helm)
|
||||
(evil-ex-define-cmd "pg[rep]" #'+helm:project-search)
|
||||
(evil-ex-define-cmd "pg[grep]d" #'+helm:project-search-from-cwd))
|
||||
((featurep! :completion vertico)
|
||||
((modulep! :completion vertico)
|
||||
(evil-ex-define-cmd "pg[rep]" #'+vertico:project-search)
|
||||
(evil-ex-define-cmd "pg[grep]d" #'+vertico:project-search-from-cwd)))
|
||||
|
||||
|
@ -104,5 +104,5 @@
|
|||
(evil-ex-define-cmd "cap[ture]" #'org-capture)
|
||||
|
||||
;;; ibuffer
|
||||
(when (featurep! :emacs ibuffer)
|
||||
(when (modulep! :emacs ibuffer)
|
||||
(evil-ex-define-cmd "buffers" #'ibuffer))
|
||||
|
|
|
@ -51,8 +51,8 @@ directives. By default, this only recognizes C directives.")
|
|||
;; errors will abort macros, so suppress them:
|
||||
evil-kbd-macro-suppress-motion-error t
|
||||
evil-undo-system
|
||||
(cond ((featurep! :emacs undo +tree) 'undo-tree)
|
||||
((featurep! :emacs undo) 'undo-fu)
|
||||
(cond ((modulep! :emacs undo +tree) 'undo-tree)
|
||||
((modulep! :emacs undo) 'undo-fu)
|
||||
((> emacs-major-version 27) 'undo-redo)))
|
||||
|
||||
;; Slow this down from 0.02 to prevent blocking in large or folded buffers
|
||||
|
@ -428,7 +428,7 @@ directives. By default, this only recognizes C directives.")
|
|||
|
||||
;; implement dictionary keybinds
|
||||
;; evil already defines 'z=' to `ispell-word' = correct word at point
|
||||
(:when (featurep! :checkers spell)
|
||||
(:when (modulep! :checkers spell)
|
||||
:n "zg" #'+spell/add-word
|
||||
:n "zw" #'+spell/remove-word
|
||||
:m "[s" #'+spell/previous-error
|
||||
|
@ -445,21 +445,21 @@ directives. By default, this only recognizes C directives.")
|
|||
:m "[u" #'+evil:url-decode
|
||||
:m "]y" #'+evil:c-string-encode
|
||||
:m "[y" #'+evil:c-string-decode
|
||||
(:when (featurep! :lang web)
|
||||
(:when (modulep! :lang web)
|
||||
:m "]x" #'+web:encode-html-entities
|
||||
:m "[x" #'+web:decode-html-entities)
|
||||
(:when (featurep! :ui vc-gutter)
|
||||
(:when (modulep! :ui vc-gutter)
|
||||
:m "]d" #'+vc-gutter/next-hunk
|
||||
:m "[d" #'+vc-gutter/previous-hunk)
|
||||
(:when (featurep! :ui hl-todo)
|
||||
(:when (modulep! :ui hl-todo)
|
||||
:m "]t" #'hl-todo-next
|
||||
:m "[t" #'hl-todo-previous)
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
:n "gt" #'+workspace:switch-next
|
||||
:n "gT" #'+workspace:switch-previous
|
||||
:n "]w" #'+workspace/switch-right
|
||||
:n "[w" #'+workspace/switch-left)
|
||||
(:when (featurep! :ui tabs)
|
||||
(:when (modulep! :ui tabs)
|
||||
:n "gt" #'+tabs:next-or-goto
|
||||
:n "gT" #'+tabs:previous-or-goto)
|
||||
|
||||
|
@ -494,14 +494,14 @@ directives. By default, this only recognizes C directives.")
|
|||
:v "g=" #'evil-numbers/inc-at-pt-incremental
|
||||
:v "g-" #'evil-numbers/dec-at-pt-incremental
|
||||
:v "g+" #'evil-numbers/inc-at-pt
|
||||
(:when (featurep! :tools lookup)
|
||||
(:when (modulep! :tools lookup)
|
||||
:nv "K" #'+lookup/documentation
|
||||
:nv "gd" #'+lookup/definition
|
||||
:nv "gD" #'+lookup/references
|
||||
:nv "gf" #'+lookup/file
|
||||
:nv "gI" #'+lookup/implementations
|
||||
:nv "gA" #'+lookup/assignments)
|
||||
(:when (featurep! :tools eval)
|
||||
(:when (modulep! :tools eval)
|
||||
:nv "gr" #'+eval:region
|
||||
:n "gR" #'+eval/buffer
|
||||
:v "gR" #'+eval:replace-region
|
||||
|
@ -610,7 +610,7 @@ directives. By default, this only recognizes C directives.")
|
|||
:v "gL" #'evil-lion-right
|
||||
|
||||
;; Omni-completion
|
||||
(:when (featurep! :completion company)
|
||||
(:when (modulep! :completion company)
|
||||
(:prefix "C-x"
|
||||
:i "C-l" #'+company/whole-lines
|
||||
:i "C-k" #'+company/dict-or-keywords
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
|
||||
(when (and (not noninteractive)
|
||||
(not doom-reloading-p)
|
||||
(featurep! +everywhere))
|
||||
(modulep! +everywhere))
|
||||
|
||||
(setq evil-collection-company-use-tng (featurep! :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)
|
||||
|
||||
|
@ -293,9 +293,9 @@ and complains if a module is loaded too early (during startup)."
|
|||
(append (list doom-leader-key doom-localleader-key
|
||||
doom-leader-alt-key)
|
||||
evil-collection-key-blacklist
|
||||
(when (featurep! :tools lookup)
|
||||
(when (modulep! :tools lookup)
|
||||
'("gd" "gf" "K"))
|
||||
(when (featurep! :tools eval)
|
||||
(when (modulep! :tools eval)
|
||||
'("gr" "gR"))
|
||||
'("[" "]" "gz" "<escape>")))
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
:pin "69c883720b30a892c63bc89f49d4f0e8b8028908")
|
||||
|
||||
;;
|
||||
(when (featurep! +everywhere)
|
||||
(when (modulep! +everywhere)
|
||||
;; `evil-collection-neotree' uses the `neotree-make-executor' macro, but this
|
||||
;; requires neotree be available during byte-compilation (while installing).
|
||||
(when (featurep! :ui neotree)
|
||||
(when (modulep! :ui neotree)
|
||||
(package! neotree)
|
||||
(autoload 'neotree-make-executor "neotree" nil nil 'macro))
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ must be non-read-only, empty, and there must be a rule in
|
|||
;;; Bootstrap
|
||||
|
||||
(after! yasnippet
|
||||
(if (featurep! :editor snippets)
|
||||
(if (modulep! :editor snippets)
|
||||
(add-to-list 'yas-snippet-dirs '+file-templates-dir 'append #'eq)
|
||||
(setq yas-prompt-functions (delq #'yas-dropdown-prompt yas-prompt-functions)
|
||||
yas-snippet-dirs '(+file-templates-dir))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; editor/fold/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
;; Add vimish-fold, outline-mode & hideshow support to folding commands
|
||||
(define-key! 'global
|
||||
[remap evil-toggle-fold] #'+fold/toggle
|
||||
|
@ -72,7 +72,7 @@
|
|||
|
||||
|
||||
(use-package! evil-vimish-fold
|
||||
:when (featurep! :editor evil)
|
||||
:when (modulep! :editor evil)
|
||||
:commands (evil-vimish-fold/next-fold evil-vimish-fold/previous-fold
|
||||
evil-vimish-fold/delete evil-vimish-fold/delete-all
|
||||
evil-vimish-fold/create evil-vimish-fold/create-line)
|
||||
|
@ -88,7 +88,7 @@
|
|||
(vimish-fold-global-mode +1))
|
||||
|
||||
(use-package! ts-fold
|
||||
:when (featurep! :tools tree-sitter)
|
||||
:when (modulep! :tools tree-sitter)
|
||||
:after tree-sitter
|
||||
:config
|
||||
;; we want to use our own face so we nullify this one to have no effect and
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
(package! hideshow :built-in t)
|
||||
|
||||
(package! vimish-fold :pin "a6501cbfe3db791f9ca17fd986c7202a87f3adb8")
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(package! evil-vimish-fold :pin "b6e0e6b91b8cd047e80debef1a536d9d49eef31a"))
|
||||
(when (featurep! :tools tree-sitter)
|
||||
(when (modulep! :tools tree-sitter)
|
||||
(package! ts-fold :pin "01d6485398a553a4fc4bbb3910edeb881c657f1f"
|
||||
:recipe (:host github :repo "jcs090218/ts-fold")))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; editor/format/autoload/evil.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload (autoload '+format:region "editor/format/autoload/evil" nil t)
|
||||
(evil-define-operator +format:region (beg end)
|
||||
|
|
|
@ -51,7 +51,7 @@ This is controlled by `+format-on-save-enabled-modes'."
|
|||
((not (require 'format-all nil t))))
|
||||
(format-all-mode +1)))
|
||||
|
||||
(when (featurep! +onsave)
|
||||
(when (modulep! +onsave)
|
||||
(add-hook 'after-change-major-mode-hook #'+format-enable-on-save-maybe-h))
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||
;;; editor/god/doctor.el
|
||||
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(warn! "god-mode is not really compatible with evil"))
|
||||
|
||||
(when (featurep! :editor objed)
|
||||
(when (modulep! :editor objed)
|
||||
(warn! "god-mode is not really compatible with objed"))
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
|
||||
(use-package! lispyville
|
||||
:when (featurep! :editor evil)
|
||||
:when (modulep! :editor evil)
|
||||
:hook (lispy-mode . lispyville-mode)
|
||||
:init
|
||||
(setq lispyville-key-theme
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
;;; editor/lispyville/packages.el
|
||||
|
||||
(package! lispy :pin "df1b7e614fb0f73646755343e8892ddda310f427")
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(package! lispyville :pin "9c14bed0359f659e246d345c706f895737c3d172"))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; editor/multiple-cursors/autoload/evil-mc.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload
|
||||
(defun +multiple-cursors/evil-mc-toggle-cursors ()
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
;;; Packages
|
||||
|
||||
(use-package! evil-multiedit
|
||||
:when (featurep! :editor evil)
|
||||
:when (modulep! :editor evil)
|
||||
:defer t)
|
||||
|
||||
|
||||
(use-package! iedit
|
||||
:when (featurep! :completion vertico)
|
||||
:when (modulep! :completion vertico)
|
||||
:defer t
|
||||
:init
|
||||
;; Fix conflict with embark.
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
|
||||
(use-package! evil-mc
|
||||
:when (featurep! :editor evil)
|
||||
:when (modulep! :editor evil)
|
||||
:commands (evil-mc-make-cursor-here
|
||||
evil-mc-make-all-cursors
|
||||
evil-mc-undo-all-cursors
|
||||
|
@ -74,7 +74,8 @@
|
|||
(apply fn args)))
|
||||
|
||||
;; REVIEW This is tremendously slow on macos and windows for some reason.
|
||||
(setq evil-mc-enable-bar-cursor (not (or IS-MAC IS-WINDOWS)))
|
||||
(setq evil-mc-enable-bar-cursor (not (or (featurep :os 'macos)
|
||||
(featurep :os 'windows))))
|
||||
|
||||
(after! smartparens
|
||||
;; Make evil-mc cooperate with smartparens better
|
||||
|
@ -171,7 +172,7 @@
|
|||
;; mc doesn't play well with evil, this attempts to assuage some of its
|
||||
;; problems so that any plugins that depend on multiple-cursors (which I have
|
||||
;; no control over) can still use it in relative safety.
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(evil-define-key* '(normal emacs) mc/keymap [escape] #'mc/keyboard-quit)
|
||||
|
||||
(defvar +mc--compat-evil-prev-state nil)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
;;; editor/multiple-cursors/packages.el
|
||||
|
||||
(cond
|
||||
((featurep! :editor evil)
|
||||
((modulep! :editor evil)
|
||||
(package! evil-multiedit :pin "23b53bc8743fb82a8854ba907b1d277374c93a79")
|
||||
(package! evil-mc :pin "63fd2fe0c213a4cc31c464d246f92931c4cb720f"))
|
||||
|
||||
|
|
|
@ -23,5 +23,5 @@
|
|||
(face-remap-remove-relative remap))
|
||||
(setq +objed--extra-face-remaps nil)))
|
||||
|
||||
(unless (featurep! +manual)
|
||||
(unless (modulep! +manual)
|
||||
(objed-mode +1)))
|
||||
|
|
|
@ -72,7 +72,7 @@ Fixes #3939: unsortable dired entries on Windows."
|
|||
|
||||
|
||||
(use-package! ranger
|
||||
:when (featurep! +ranger)
|
||||
:when (modulep! +ranger)
|
||||
:after dired
|
||||
:init (setq ranger-override-dired t)
|
||||
:config
|
||||
|
@ -129,7 +129,7 @@ we have to clean it up ourselves."
|
|||
|
||||
|
||||
(use-package! dirvish
|
||||
:when (featurep! +dirvish)
|
||||
:when (modulep! +dirvish)
|
||||
:defer t
|
||||
:init (after! dired (dirvish-override-dired-mode))
|
||||
:hook (dired-mode . dired-omit-mode)
|
||||
|
@ -138,7 +138,7 @@ we have to clean it up ourselves."
|
|||
dirvish-hide-details nil
|
||||
dirvish-attributes '(git-msg)
|
||||
dired-omit-files (concat dired-omit-files "\\|^\\..*$"))
|
||||
(when (featurep! +icons)
|
||||
(when (modulep! +icons)
|
||||
(push 'all-the-icons dirvish-attributes))
|
||||
(map! :map dirvish-mode-map
|
||||
:n "b" #'dirvish-goto-bookmark
|
||||
|
@ -152,8 +152,8 @@ we have to clean it up ourselves."
|
|||
|
||||
|
||||
(use-package! all-the-icons-dired
|
||||
:when (featurep! +icons)
|
||||
:unless (featurep! +dirvish)
|
||||
:when (modulep! +icons)
|
||||
:unless (modulep! +dirvish)
|
||||
:hook (dired-mode . all-the-icons-dired-mode)
|
||||
:config
|
||||
;; HACK Fixes #1929: icons break file renaming in Emacs 27+, because the icon
|
||||
|
@ -176,8 +176,8 @@ we have to clean it up ourselves."
|
|||
|
||||
|
||||
(use-package! dired-x
|
||||
:unless (featurep! +dirvish)
|
||||
:unless (featurep! +ranger)
|
||||
:unless (modulep! +dirvish)
|
||||
:unless (modulep! +ranger)
|
||||
:hook (dired-mode . dired-omit-mode)
|
||||
:config
|
||||
(setq dired-omit-verbose nil
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
(package! diredfl :pin "f9140b2c42151dca669003d685c9f079b2e3dc37")
|
||||
(package! dired-git-info :pin "9461476a28a5fec0784260f6e318237c662c3430")
|
||||
(package! dired-rsync :pin "7940d9154d0a908693999b0e1ea351a6d365c93d")
|
||||
(when (featurep! +ranger)
|
||||
(when (modulep! +ranger)
|
||||
(package! ranger :pin "2498519cb21dcd5791d240607a72a204d1761668"))
|
||||
(when (featurep! +dirvish)
|
||||
(when (modulep! +dirvish)
|
||||
(package! dirvish :pin "73dcaa404da9ab84d25f2919e6e3af4b1f8e7f37"))
|
||||
(when (and (featurep! +icons)
|
||||
(not (featurep! +dirvish)))
|
||||
(when (and (modulep! +icons)
|
||||
(not (modulep! +dirvish)))
|
||||
(package! all-the-icons-dired :pin "5e9b097f9950cc9f86de922b07903a4e5fefc733"))
|
||||
(package! fd-dired :pin "458464771bb220b6eb87ccfd4c985c436e57dc7e")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; emacs/ibuffer/autoload/workspaces.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :ui workspaces)
|
||||
;;;###if (modulep! :ui workspaces)
|
||||
|
||||
;;;###autoload
|
||||
(defun +ibuffer-workspace (workspace-name)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
ibuffer-filter-group-name-face '(:inherit (success bold))
|
||||
ibuffer-formats
|
||||
`((mark modified read-only locked
|
||||
,@(if (featurep! +icons)
|
||||
,@(if (modulep! +icons)
|
||||
`(;; Here you may adjust by replacing :right with :center
|
||||
;; or :left According to taste, if you want the icon
|
||||
;; further from the name
|
||||
|
@ -39,7 +39,7 @@
|
|||
:header-mouse-map ibuffer-size-header-map)
|
||||
(file-size-human-readable (buffer-size)))
|
||||
|
||||
(when (featurep! :ui workspaces)
|
||||
(when (modulep! :ui workspaces)
|
||||
(define-ibuffer-filter workspace-buffers
|
||||
"Filter for workspace buffers"
|
||||
(:reader (+workspace-get (read-string "workspace name: "))
|
||||
|
@ -48,7 +48,7 @@
|
|||
|
||||
(define-key ibuffer-mode-map [remap ibuffer-visit-buffer] #'+ibuffer/visit-workspace-buffer))
|
||||
|
||||
(when (featurep! :completion ivy)
|
||||
(when (modulep! :completion ivy)
|
||||
(defadvice! +ibuffer--use-counsel-maybe-a (_file &optional _wildcards)
|
||||
"Use `counsel-find-file' instead of `find-file'."
|
||||
:override #'ibuffer-find-file
|
||||
|
@ -71,7 +71,7 @@
|
|||
:hook (ibuffer . ibuffer-projectile-set-filter-groups)
|
||||
:config
|
||||
(setq ibuffer-projectile-prefix
|
||||
(if (featurep! +icons)
|
||||
(if (modulep! +icons)
|
||||
(concat (all-the-icons-octicon
|
||||
"file-directory"
|
||||
:face ibuffer-filter-group-name-face
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; emacs/undo/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package! undo-fu
|
||||
:unless (featurep! +tree)
|
||||
:unless (modulep! +tree)
|
||||
:hook (doom-first-buffer . undo-fu-mode)
|
||||
:config
|
||||
;; Increase undo history limits to reduce likelihood of data loss
|
||||
|
@ -25,7 +25,7 @@
|
|||
|
||||
|
||||
(use-package! undo-fu-session
|
||||
:unless (featurep! +tree)
|
||||
:unless (modulep! +tree)
|
||||
:hook (undo-fu-mode . global-undo-fu-session-mode)
|
||||
:custom (undo-fu-session-directory (concat doom-cache-dir "undo-fu-session/"))
|
||||
:config
|
||||
|
@ -52,7 +52,7 @@
|
|||
|
||||
|
||||
(use-package! undo-tree
|
||||
:when (featurep! +tree)
|
||||
:when (modulep! +tree)
|
||||
;; Branching & persistent undo
|
||||
:hook (doom-first-buffer . global-undo-tree-mode)
|
||||
:custom (undo-tree-history-directory-alist `(("." . ,(concat doom-cache-dir "undo-tree-hist/"))))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; emacs/undo/packages.el
|
||||
|
||||
(if (featurep! +tree)
|
||||
(if (modulep! +tree)
|
||||
(package! undo-tree :pin "e326c6135e62f5fe8536528d3acd5e798f847407")
|
||||
(package! undo-fu :pin "ab8bc10e424bccc847800c31ab41888db789d55d")
|
||||
(package! undo-fu-session :pin "3e810c7c9ab75d2b6f92c7c876290abbc164e750"))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; emacs/vc/autoload/hydra.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :ui hydra)
|
||||
;;;###if (modulep! :ui hydra)
|
||||
|
||||
;;;###autoload (autoload '+vc/smerge-hydra/body "emacs/vc/autoload/hydra" nil t)
|
||||
(defhydra +vc/smerge-hydra (:hint nil
|
||||
|
|
|
@ -93,7 +93,7 @@ info in the `header-line-format' is a more visible indicator."
|
|||
;; Rehash evil keybindings so they are recognized
|
||||
(add-hook 'git-timemachine-mode-hook #'evil-normalize-keymaps))
|
||||
|
||||
(when (featurep! :tools magit)
|
||||
(when (modulep! :tools magit)
|
||||
(add-transient-hook! #'git-timemachine-blame (require 'magit-blame)))
|
||||
|
||||
(map! :map git-timemachine-mode-map
|
||||
|
|
|
@ -56,7 +56,7 @@ default/fallback account."
|
|||
"Start email client."
|
||||
(interactive)
|
||||
(require 'mu4e)
|
||||
(if (featurep! :ui workspaces)
|
||||
(if (modulep! :ui workspaces)
|
||||
;; delete current workspace if empty
|
||||
;; this is useful when mu4e is in the daemon
|
||||
;; as otherwise you can accumulate empty workspaces
|
||||
|
@ -326,7 +326,7 @@ When otherwise called, open a dired buffer and enable `dired-mu4e-attach-ctrl-c-
|
|||
(defun +mu4e-kill-mu4e-h ()
|
||||
;; (prolusion-mail-hide)
|
||||
(cond
|
||||
((and (featurep! :ui workspaces) (+workspace-exists-p +mu4e-workspace-name))
|
||||
((and (modulep! :ui workspaces) (+workspace-exists-p +mu4e-workspace-name))
|
||||
(+workspace/delete +mu4e-workspace-name))
|
||||
|
||||
(+mu4e--old-wconf
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;; email/mu4e/autoload/evil.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload
|
||||
(defun +mu4e/mark (&optional beg end)
|
||||
|
|
|
@ -86,9 +86,9 @@ is non-nil."
|
|||
mu4e-compose-context-policy 'ask-if-none
|
||||
;; use helm/ivy/vertico
|
||||
mu4e-completing-read-function
|
||||
(cond ((featurep! :completion ivy) #'ivy-completing-read)
|
||||
((featurep! :completion helm) #'completing-read)
|
||||
((featurep! :completion vertico) #'completing-read)
|
||||
(cond ((modulep! :completion ivy) #'ivy-completing-read)
|
||||
((modulep! :completion helm) #'completing-read)
|
||||
((modulep! :completion vertico) #'completing-read)
|
||||
(t #'ido-completing-read))
|
||||
mu4e-attachment-dir
|
||||
(concat
|
||||
|
@ -252,7 +252,7 @@ is non-nil."
|
|||
(when (fboundp 'imagemagick-register-types)
|
||||
(imagemagick-register-types))
|
||||
|
||||
(when (featurep! :ui workspaces)
|
||||
(when (modulep! :ui workspaces)
|
||||
(map! :map mu4e-main-mode-map
|
||||
:ne "h" #'+workspace/other))
|
||||
|
||||
|
@ -337,7 +337,7 @@ Acts like a singular `mu4e-view-save-attachments', without the saving."
|
|||
;; Due to evil, none of the marking commands work when making a visual selection in
|
||||
;; the headers view of mu4e. Without overriding any evil commands we may actually
|
||||
;; want to use in and evil selection, this can be easily fixed.
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(map! :map mu4e-headers-mode-map
|
||||
:v "*" #'mu4e-headers-mark-for-something
|
||||
:v "!" #'mu4e-headers-mark-for-read
|
||||
|
@ -362,7 +362,7 @@ This is enacted by `+mu4e~main-action-str-prettier-a' and
|
|||
|
||||
(advice-add #'mu4e--key-val :filter-return #'+mu4e~main-keyval-str-prettier-a)
|
||||
(advice-add #'mu4e--main-action-str :override #'+mu4e~main-action-str-prettier-a)
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
;; As +mu4e~main-action-str-prettier replaces [k]ey with key q]uit should become quit
|
||||
(setq evil-collection-mu4e-end-region-misc "quit"))
|
||||
|
||||
|
@ -376,7 +376,7 @@ This is enacted by `+mu4e~main-action-str-prettier-a' and
|
|||
(advice-add 'mu4e--start :around #'+mu4e-lock-start)
|
||||
(advice-add 'mu4e-quit :after #'+mu4e-lock-file-delete-maybe))
|
||||
|
||||
(unless (featurep! +org)
|
||||
(unless (modulep! +org)
|
||||
(after! mu4e
|
||||
(defun org-msg-mode (&optional _)
|
||||
"Dummy function."
|
||||
|
@ -388,7 +388,7 @@ Ignores all arguments and returns nil."
|
|||
|
||||
(use-package! org-msg
|
||||
:after mu4e
|
||||
:when (featurep! +org)
|
||||
:when (modulep! +org)
|
||||
:config
|
||||
(setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil tex:dvipng"
|
||||
org-msg-startup "hidestars indent inlineimages"
|
||||
|
@ -583,7 +583,7 @@ Must be set before org-msg is loaded to take effect.")
|
|||
;;
|
||||
;;; Gmail integration
|
||||
|
||||
(when (featurep! +gmail)
|
||||
(when (modulep! +gmail)
|
||||
(after! mu4e
|
||||
(defvar +mu4e-gmail-accounts nil
|
||||
"Gmail accounts that do not contain \"gmail\" in address and maildir.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
(warn! "Couldn't find mbsync or offlineimap command. \
|
||||
You may not have a way of fetching mail."))
|
||||
|
||||
(when (and (featurep! +org)
|
||||
(when (and (modulep! +org)
|
||||
(not IS-WINDOWS))
|
||||
(unless (executable-find "identify")
|
||||
(warn! "Couldn't find the identify command from imagemagick. \
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; email/mu4e/packages.el
|
||||
|
||||
(when (featurep! +org)
|
||||
(when (modulep! +org)
|
||||
(package! org-msg :pin "60e22e446325a9b3387396459d98be7c1c52579d"))
|
||||
|
||||
(package! mu4e-alert :pin "b34d0ea7b75709cc25d842a783cebea855dc9f7d")
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
(interactive)
|
||||
(condition-case-unless-debug e
|
||||
(progn
|
||||
(when (featurep! :ui workspaces)
|
||||
(when (modulep! :ui workspaces)
|
||||
(+workspace-switch "*MAIL*" t))
|
||||
(if-let* ((win (cl-find-if (lambda (it) (string-match-p "^\\*notmuch" (buffer-name (window-buffer it))))
|
||||
(doom-visible-windows))))
|
||||
(select-window win)
|
||||
(funcall +notmuch-home-function))
|
||||
(when (featurep! :ui workspaces)
|
||||
(when (modulep! :ui workspaces)
|
||||
(+workspace/display)))
|
||||
('error
|
||||
(+notmuch/quit)
|
||||
|
@ -28,7 +28,7 @@
|
|||
(interactive)
|
||||
;; (+popup/close (get-buffer-window "*notmuch-hello*"))
|
||||
(doom-kill-matching-buffers "^\\*notmuch")
|
||||
(when (featurep! :ui workspaces)
|
||||
(when (modulep! :ui workspaces)
|
||||
(+workspace/delete "*MAIL*")))
|
||||
|
||||
(defun +notmuch-get-sync-command ()
|
||||
|
@ -52,7 +52,7 @@
|
|||
((and (pred stringp) it) it)
|
||||
(_ (user-error "Invalid notmuch backend specified: %S"
|
||||
+notmuch-sync-backend)))))
|
||||
(if (featurep! +afew)
|
||||
(if (modulep! +afew)
|
||||
(format "%s && %s" sync-cmd afew-cmd)
|
||||
sync-cmd)))
|
||||
|
||||
|
|
|
@ -106,24 +106,24 @@ variable accordingly.")
|
|||
|
||||
|
||||
(use-package! org-mime
|
||||
:when (featurep! +org)
|
||||
:when (modulep! +org)
|
||||
:after (org notmuch)
|
||||
:config (setq org-mime-library 'mml))
|
||||
|
||||
|
||||
(use-package! counsel-notmuch
|
||||
:when (featurep! :completion ivy)
|
||||
:when (modulep! :completion ivy)
|
||||
:commands counsel-notmuch
|
||||
:after notmuch)
|
||||
|
||||
|
||||
(use-package! helm-notmuch
|
||||
:when (featurep! :completion helm)
|
||||
:when (modulep! :completion helm)
|
||||
:commands helm-notmuch
|
||||
:after notmuch)
|
||||
|
||||
|
||||
(use-package! consult-notmuch
|
||||
:when (featurep! :completion vertico)
|
||||
:when (modulep! :completion vertico)
|
||||
:commands consult-notmuch
|
||||
:after notmuch)
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
t t)))
|
||||
:pin "bd243b65a9709bfd61ba80e80cc41ae3a23ea524")
|
||||
|
||||
(when (featurep! +org)
|
||||
(when (modulep! +org)
|
||||
(package! org-mime :pin "cf96f585c68ad14751a3f73d937cbfcb890171b9"))
|
||||
(when (featurep! :lang org)
|
||||
(when (modulep! :lang org)
|
||||
(package! ol-notmuch :pin "1a53d6c707514784cabf33d865b577bf77f45913"))
|
||||
(when (featurep! :completion ivy)
|
||||
(when (modulep! :completion ivy)
|
||||
(package! counsel-notmuch :pin "a4a1562935e4180c42524c51609d1283e9be0688"))
|
||||
(when (featurep! :completion helm)
|
||||
(when (modulep! :completion helm)
|
||||
(package! helm-notmuch :pin "97a01497e079a7b6505987e9feba6b603bbec288"))
|
||||
(when (featurep! :completion vertico)
|
||||
(when (modulep! :completion vertico)
|
||||
(package! consult-notmuch :pin "4138855cddee0ef126cff6a5fc5ca9c49fd2682d"))
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
"^X-Mailer:"
|
||||
"^X-Face:"))
|
||||
|
||||
(when (featurep! +gmail)
|
||||
(when (modulep! +gmail)
|
||||
(setq elmo-imap4-default-server "imap.gmail.com"
|
||||
elmo-imap4-default-port 993
|
||||
elmo-imap4-default-authenticate-type 'clear ; CRAM-MD5
|
||||
|
@ -70,7 +70,7 @@
|
|||
|
||||
(setq wl-message-id-domain wl-local-domain)
|
||||
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
;; Neither `wl-folder-mode' nor `wl-summary-mode' are correctly defined as
|
||||
;; major modes, so we cannot use `set-evil-initial-state!' here.
|
||||
;; In addition, `wl-folder-mode' won't start in `evil-emacs-state' through
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
:after avy
|
||||
:config (avy-migemo-mode 1))
|
||||
|
||||
(when (featurep! :completion helm)
|
||||
(when (modulep! :completion helm)
|
||||
(after! helm (helm-migemo-mode +1)))))
|
||||
|
||||
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
(map!
|
||||
:leader
|
||||
:desc "Window" "z" 'evil-window-map
|
||||
(:when (featurep! :ui popup)
|
||||
(:when (modulep! :ui popup)
|
||||
:desc "Toggle last popup" "é" #'+popup/toggle)
|
||||
:desc "Switch to last buffer" "²" #'evil-switch-to-windows-last-buffer
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
(:prefix-map ("TAB" . "workspace")
|
||||
:desc "Switch to last workspace" "²" #'+workspace/other
|
||||
:desc "Previous workspace" "é" #'+workspace/switch-left
|
||||
|
@ -27,14 +27,14 @@
|
|||
:desc "Previous buffer" "é" #'previous-buffer
|
||||
:desc "Next buffer" "è" #'next-buffer)
|
||||
(:prefix-map ("g" . "git")
|
||||
(:when (featurep! :ui vc-gutter)
|
||||
(:when (modulep! :ui vc-gutter)
|
||||
:desc "Jump to previous hunk" "é" #'git-gutter:previous-hunk
|
||||
:desc "Jump to next hunk" "è" #'git-gutter:next-hunk))))
|
||||
|
||||
(defun +layout-remap-evil-keys-for-azerty-h ()
|
||||
(map! :nv "à" #'evil-execute-macro
|
||||
:nv "²" #'evil-goto-mark
|
||||
(:when (featurep! :checkers spell)
|
||||
(:when (modulep! :checkers spell)
|
||||
:m "és" #'+spell/previous-error
|
||||
:m "ès" #'+spell/next-error)
|
||||
:n "è SPC" #'+evil/insert-newline-below
|
||||
|
@ -47,13 +47,13 @@
|
|||
:m "éu" #'+evil:url-decode
|
||||
:m "èy" #'+evil:c-string-encode
|
||||
:m "éy" #'+evil:c-string-decode
|
||||
(:when (featurep! :ui vc-gutter)
|
||||
(:when (modulep! :ui vc-gutter)
|
||||
:m "èd" #'git-gutter:next-hunk
|
||||
:m "éd" #'git-gutter:previous-hunk)
|
||||
(:when (featurep! :ui hl-todo)
|
||||
(:when (modulep! :ui hl-todo)
|
||||
:m "èt" #'hl-todo-next
|
||||
:m "ét" #'hl-todo-previous)
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
:n "èw" #'+workspace/switch-right
|
||||
:n "éw" #'+workspace/switch-left)
|
||||
:m "è#" #'+evil/next-preproc-directive
|
||||
|
@ -77,5 +77,5 @@
|
|||
:nv "gà" #'+evil:apply-macro))
|
||||
|
||||
(+layout-remap-keys-for-azerty-h)
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(+layout-remap-evil-keys-for-azerty-h))
|
||||
|
|
|
@ -37,12 +37,12 @@ In all cases, 'h' functions go to 'c' and 'l' ones go to 'r' so the navigation k
|
|||
(map! "C-é" 'evil-window-map)
|
||||
(map! :leader
|
||||
:desc "Window" "é" evil-window-map
|
||||
(:when (featurep! :ui popup)
|
||||
(:when (modulep! :ui popup)
|
||||
:desc "Toggle last popup" "#" #'+popup/toggle)
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
:desc "Switch buffer" "«" #'switch-to-buffer)
|
||||
:desc "Switch to last buffer" "$" #'evil-switch-to-windows-last-buffer
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
(:prefix-map ("TAB" . "workspace")
|
||||
:desc "Switch to last workspace" "$" #'+workspace/other
|
||||
:desc "Next workspace" ")" #'+workspace/switch-right
|
||||
|
@ -53,7 +53,7 @@ In all cases, 'h' functions go to 'c' and 'l' ones go to 'r' so the navigation k
|
|||
(:prefix-map ("c" . "code")
|
||||
:desc "Jump to documentation" "S" #'+lookup/documentation)
|
||||
(:prefix-map ("g" . "git")
|
||||
(:when (featurep! :ui vc-gutter)
|
||||
(:when (modulep! :ui vc-gutter)
|
||||
:desc "Jump to next hunk" ")" #'git-gutter:next-hunk
|
||||
:desc "Jump to previous hunk" "(" #'git-gutter:previous-hunk))
|
||||
(:prefix-map ("p" . "project")
|
||||
|
@ -92,7 +92,7 @@ In all cases, 'h' functions go to 'c' and 'l' ones go to 'r' so the navigation k
|
|||
:m "V" #'evil-visual-screen-line)))
|
||||
|
||||
(map! :i "C-t" #'+default-newline
|
||||
(:when (featurep! :editor multiple-cursors)
|
||||
(:when (modulep! :editor multiple-cursors)
|
||||
:prefix "gz"
|
||||
:nv "t" #'evil-mc-make-cursor-move-next-line
|
||||
:nv "s" #'evil-mc-make-cursor-move-prev-line
|
||||
|
@ -100,7 +100,7 @@ In all cases, 'h' functions go to 'c' and 'l' ones go to 'r' so the navigation k
|
|||
;; mnemonics and "j" as a "classic" rotation
|
||||
:nv "T" #'+multiple-cursors/evil-mc-toggle-cursors
|
||||
:nv "j" #'+multiple-cursors/evil-mc-toggle-cursors)
|
||||
(:when (featurep! :ui popup)
|
||||
(:when (modulep! :ui popup)
|
||||
:n "C-$" #'+popup/toggle
|
||||
:n "C-#" #'+popup/raise))
|
||||
(after! treemacs
|
||||
|
@ -262,7 +262,7 @@ In all cases, 'h' functions go to 'c' and 'l' ones go to 'r' so the navigation k
|
|||
;;; Bootstrap
|
||||
|
||||
(+layout-remap-keys-for-bepo-h)
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(+layout-remap-evil-keys-for-bepo-h)
|
||||
(add-hook! 'evil-collection-setup-hook
|
||||
(defun +layout-bepo-rotate-evil-collection-keymap (_mode mode-keymaps &rest _rest)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; input/layout/autoload/bepo.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +bepo)
|
||||
;;;###if (modulep! +bepo)
|
||||
|
||||
;;;###autoload
|
||||
(defun +layout-bepo-rotate-ts-bare-keymap (keymaps)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
(add-hook! 'doom-init-modules-hook
|
||||
(defun +layout-init-h ()
|
||||
(cond ((featurep! +bepo)
|
||||
(cond ((modulep! +bepo)
|
||||
(load! "+bepo"))
|
||||
((featurep! +azerty)
|
||||
((modulep! +azerty)
|
||||
(load! "+azerty")))))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; lang/agda/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (and (featurep! +local)
|
||||
(when (and (modulep! +local)
|
||||
(executable-find "agda-mode"))
|
||||
(add-load-path!
|
||||
(file-name-directory (shell-command-to-string "agda-mode locate")))
|
||||
|
@ -11,7 +11,7 @@
|
|||
(set-lookup-handlers! 'agda2-mode
|
||||
:definition #'agda2-goto-definition-keyboard)
|
||||
|
||||
(when (featurep! +tree-sitter)
|
||||
(when (modulep! +tree-sitter)
|
||||
(add-hook! '(agda-mode-local-vars-hook
|
||||
agda2-mode-local-vars-hook)
|
||||
:append #'tree-sitter!))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; lang/agda/doctor.el -*- lexical-binding: t; -*-
|
||||
|
||||
(assert! (or (not (featurep! +tree-sitter))
|
||||
(featurep! :tools tree-sitter))
|
||||
(assert! (or (not (modulep! +tree-sitter))
|
||||
(modulep! :tools tree-sitter))
|
||||
"This module requires (:tools tree-sitter)")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/agda/packages.el
|
||||
|
||||
(unless (featurep! +local)
|
||||
(unless (modulep! +local)
|
||||
(package! agda-input
|
||||
:recipe (:host github :repo "agda/agda"
|
||||
:files ("src/data/emacs-mode/agda-input.el")
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
:config
|
||||
(setq beancount-electric-currency t)
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(when (modulep! +lsp)
|
||||
(add-hook 'beancount-mode-local-vars-hook #'lsp! 'append))
|
||||
|
||||
(map! :map beancount-mode-map
|
||||
|
|
|
@ -17,7 +17,7 @@ This is ignored by ccls.")
|
|||
`((c-mode . nil)
|
||||
(c++-mode
|
||||
. ,(list "-std=c++1z" ; use C++17 draft by default
|
||||
(when IS-MAC
|
||||
(when (featurep :os 'macos)
|
||||
;; NOTE beware: you'll get abi-inconsistencies when passing
|
||||
;; std-objects to libraries linked with libstdc++ (e.g. if you
|
||||
;; use boost which wasn't compiled with libc++)
|
||||
|
@ -67,7 +67,7 @@ This is ignored by ccls.")
|
|||
:return "return"
|
||||
:yield "#require")
|
||||
|
||||
(when (featurep! +tree-sitter)
|
||||
(when (modulep! +tree-sitter)
|
||||
(add-hook! '(c-mode-local-vars-hook
|
||||
c++-mode-local-vars-hook)
|
||||
:append #'tree-sitter!))
|
||||
|
@ -125,7 +125,7 @@ This is ignored by ccls.")
|
|||
|
||||
|
||||
(use-package! irony
|
||||
:unless (featurep! +lsp)
|
||||
:unless (modulep! +lsp)
|
||||
:commands irony-install-server
|
||||
;; Initialize compilation database, if present. Otherwise, fall back on
|
||||
;; `+cc-default-compiler-options'.
|
||||
|
@ -146,11 +146,11 @@ This is ignored by ccls.")
|
|||
:hook (irony-mode . irony-eldoc))
|
||||
|
||||
(use-package! flycheck-irony
|
||||
:when (featurep! :checkers syntax)
|
||||
:when (modulep! :checkers syntax)
|
||||
:config (flycheck-irony-setup))
|
||||
|
||||
(use-package! company-irony
|
||||
:when (featurep! :completion company)
|
||||
:when (modulep! :completion company)
|
||||
:init (set-company-backend! 'irony-mode '(:separate company-irony-c-headers company-irony))
|
||||
:config (require 'company-irony-c-headers)))
|
||||
|
||||
|
@ -166,7 +166,7 @@ This is ignored by ccls.")
|
|||
|
||||
|
||||
(use-package! company-cmake ; for `cmake-mode'
|
||||
:when (featurep! :completion company)
|
||||
:when (modulep! :completion company)
|
||||
:after cmake-mode
|
||||
:config (set-company-backend! 'cmake-mode 'company-cmake))
|
||||
|
||||
|
@ -176,7 +176,7 @@ This is ignored by ccls.")
|
|||
|
||||
|
||||
(use-package! company-glsl ; for `glsl-mode'
|
||||
:when (featurep! :completion company)
|
||||
:when (modulep! :completion company)
|
||||
:after glsl-mode
|
||||
:config (set-company-backend! 'glsl-mode 'company-glsl))
|
||||
|
||||
|
@ -185,7 +185,7 @@ This is ignored by ccls.")
|
|||
;; Rtags Support
|
||||
|
||||
(use-package! rtags
|
||||
:unless (featurep! +lsp)
|
||||
:unless (modulep! +lsp)
|
||||
;; Only initialize rtags-mode if rtags and rdm are available.
|
||||
:hook ((c-mode-local-vars c++-mode-local-vars objc-mode-local-vars) . +cc-init-rtags-maybe-h)
|
||||
:preface (setq rtags-install-path (concat doom-etc-dir "rtags/"))
|
||||
|
@ -201,8 +201,8 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
|
|||
rtags-use-bookmarks nil
|
||||
rtags-completions-enabled nil
|
||||
rtags-display-result-backend
|
||||
(cond ((featurep! :completion ivy) 'ivy)
|
||||
((featurep! :completion helm) 'helm)
|
||||
(cond ((modulep! :completion ivy) 'ivy)
|
||||
((modulep! :completion helm) 'helm)
|
||||
('default))
|
||||
;; These executables are named rtags-* on debian
|
||||
rtags-rc-binary-name
|
||||
|
@ -235,7 +235,7 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
|
|||
;;
|
||||
;; LSP
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(when (modulep! +lsp)
|
||||
(add-hook! '(c-mode-local-vars-hook
|
||||
c++-mode-local-vars-hook
|
||||
objc-mode-local-vars-hook
|
||||
|
@ -261,7 +261,7 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
|
|||
:desc "References (Read)" "r" #'+cc/ccls-show-references-read
|
||||
:desc "References (Write)" "w" #'+cc/ccls-show-references-write)))
|
||||
|
||||
(when (featurep! :tools lsp +eglot)
|
||||
(when (modulep! :tools lsp +eglot)
|
||||
;; Map eglot specific helper
|
||||
(map! :localleader
|
||||
:after cc-mode
|
||||
|
@ -270,8 +270,7 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
|
|||
|
||||
;; NOTE : This setting is untested yet
|
||||
(after! eglot
|
||||
;; IS-MAC custom configuration
|
||||
(when IS-MAC
|
||||
(when (featurep :os 'macos)
|
||||
(add-to-list 'eglot-workspace-configuration
|
||||
`((:ccls . ((:clang . ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
|
||||
"-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
|
||||
|
@ -279,8 +278,8 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
|
|||
:resourceDir (cdr (doom-call-process "clang" "-print-resource-dir"))))))))))))
|
||||
|
||||
(use-package! ccls
|
||||
:when (featurep! +lsp)
|
||||
:unless (featurep! :tools lsp +eglot)
|
||||
:when (modulep! +lsp)
|
||||
:unless (modulep! :tools lsp +eglot)
|
||||
:defer t
|
||||
:init
|
||||
(defvar ccls-sem-highlight-method 'font-lock)
|
||||
|
@ -298,11 +297,12 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
|
|||
(setq-hook! 'lsp-configure-hook
|
||||
ccls-sem-highlight-method (if lsp-enable-semantic-highlighting
|
||||
ccls-sem-highlight-method))
|
||||
(when (or IS-MAC IS-LINUX)
|
||||
(when (or (featurep :os 'macos)
|
||||
(featurep :os 'linux))
|
||||
(setq ccls-initialization-options
|
||||
`(:index (:trackDependency 1
|
||||
:threads ,(max 1 (/ (doom-system-cpus) 2))))))
|
||||
(when IS-MAC
|
||||
(when (featurep :os 'macos)
|
||||
(setq ccls-initialization-options
|
||||
(append ccls-initialization-options
|
||||
`(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||
;;; lang/cc/doctor.el
|
||||
|
||||
(assert! (or (not (featurep! +lsp))
|
||||
(featurep! :tools lsp))
|
||||
(assert! (or (not (modulep! +lsp))
|
||||
(modulep! :tools lsp))
|
||||
"This module requires (:tools lsp)")
|
||||
|
||||
(assert! (or (not (featurep! +tree-sitter))
|
||||
(featurep! :tools tree-sitter))
|
||||
(assert! (or (not (modulep! +tree-sitter))
|
||||
(modulep! :tools tree-sitter))
|
||||
"This module requires (:tools tree-sitter)")
|
||||
|
||||
(when (require 'rtags nil t)
|
||||
|
@ -22,7 +22,7 @@
|
|||
(unless (file-directory-p irony-server-install-prefix)
|
||||
(warn! "Irony server isn't installed. Run M-x irony-install-server")))
|
||||
|
||||
(when (featurep! :completion company)
|
||||
(when (modulep! :completion company)
|
||||
;; glslangValidator
|
||||
(unless (executable-find "glslangValidator")
|
||||
(warn! "Couldn't find glslangValidator. GLSL code completion is disabled")))
|
||||
|
|
|
@ -11,24 +11,24 @@
|
|||
(package! opencl-mode :pin "15091eff92c33ee0d1ece40eb99299ef79fee92d")
|
||||
|
||||
(when (package! glsl-mode :pin "9b2e5f28e489a1f73c4aed734105618ac0dc0c43")
|
||||
(when (featurep! :completion company)
|
||||
(when (modulep! :completion company)
|
||||
(package! company-glsl
|
||||
:recipe (:host github :repo "Kaali/company-glsl")
|
||||
:pin "404cd0694ab34971f9c01eb22126cd2e7d3f9dc4")))
|
||||
|
||||
(if (featurep! +lsp)
|
||||
(unless (featurep! :tools lsp +eglot)
|
||||
(if (modulep! +lsp)
|
||||
(unless (modulep! :tools lsp +eglot)
|
||||
;; ccls package is necessary only for lsp-mode.
|
||||
(package! ccls :pin "675a5704c14a27931e835a431beea3631d92e8e6"))
|
||||
(when (package! irony :pin "870d1576fb279bb93f776a71e65f45283c423a9e")
|
||||
(package! irony-eldoc :pin "73e79a89fad982a2ba072f2fcc1b4e41f0aa2978")
|
||||
(when (featurep! :checkers syntax)
|
||||
(when (modulep! :checkers syntax)
|
||||
(package! flycheck-irony :pin "42dbecd4a865cabeb301193bb4d660e26ae3befe"))
|
||||
(when (featurep! :completion company)
|
||||
(when (modulep! :completion company)
|
||||
(package! company-irony :pin "b44711dfce445610c1ffaec4951c6ff3882b216a")
|
||||
(package! company-irony-c-headers :pin "72c386aeb079fb261d9ec02e39211272f76bbd97")))
|
||||
(when (package! rtags :pin "db39790fda5c2443bc790b8971ac140914f7e9c2")
|
||||
(when (featurep! :completion ivy)
|
||||
(when (modulep! :completion ivy)
|
||||
(package! ivy-rtags))
|
||||
(when (featurep! :completion helm)
|
||||
(when (modulep! :completion helm)
|
||||
(package! helm-rtags))))
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
(use-package! clojure-mode
|
||||
:hook (clojure-mode . rainbow-delimiters-mode)
|
||||
:config
|
||||
(when (featurep! +lsp)
|
||||
(when (modulep! +lsp)
|
||||
(add-hook! '(clojure-mode-local-vars-hook
|
||||
clojurec-mode-local-vars-hook
|
||||
clojurescript-mode-local-vars-hook)
|
||||
|
@ -48,7 +48,7 @@
|
|||
(add-transient-hook! #'cider-stacktrace-render-cause (cider--stacktrace-adapt-to-theme))
|
||||
:config
|
||||
(add-hook 'cider-mode-hook #'eldoc-mode)
|
||||
(unless (featurep! +lsp)
|
||||
(unless (modulep! +lsp)
|
||||
(set-lookup-handlers! '(cider-mode cider-repl-mode)
|
||||
:definition #'+clojure-cider-lookup-definition
|
||||
:documentation #'cider-doc))
|
||||
|
@ -82,7 +82,7 @@
|
|||
;; See https://github.com/clojure-emacs/cider/issues/1872
|
||||
cider-repl-pop-to-buffer-on-connect 'display-only)
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(when (modulep! +lsp)
|
||||
(setq cider-eldoc-display-for-symbol-at-point nil
|
||||
cider-font-lock-dynamically nil)
|
||||
(add-hook! 'cider-mode-hook
|
||||
|
@ -111,7 +111,7 @@
|
|||
(evil-make-overriding-map cider--debug-mode-map 'normal)
|
||||
(evil-normalize-keymaps))))
|
||||
|
||||
(when (featurep! :ui modeline +light)
|
||||
(when (modulep! :ui modeline +light)
|
||||
(defvar-local cider-modeline-icon nil)
|
||||
|
||||
(defun +clojure--cider-set-modeline (face label)
|
||||
|
@ -150,7 +150,7 @@
|
|||
(+clojure--cider-set-modeline 'success "Cider syncronized"))))
|
||||
|
||||
;; Ensure that CIDER is used for sessions in org buffers.
|
||||
(when (featurep! :lang org)
|
||||
(when (modulep! :lang org)
|
||||
(after! ob-clojure
|
||||
(setq! org-babel-clojure-backend 'cider)))
|
||||
|
||||
|
@ -221,7 +221,7 @@
|
|||
"s" #'cider-test-run-ns-tests-with-filters
|
||||
"t" #'cider-test-run-test)))
|
||||
|
||||
(:when (featurep! :editor evil +everywhere)
|
||||
(:when (modulep! :editor evil +everywhere)
|
||||
:map cider-repl-mode-map
|
||||
:i [S-return] #'cider-repl-newline-and-indent
|
||||
:i [M-return] #'cider-repl-return
|
||||
|
@ -243,10 +243,10 @@
|
|||
(use-package! clj-refactor
|
||||
:hook (clojure-mode . clj-refactor-mode)
|
||||
:config
|
||||
(unless (featurep! +lsp)
|
||||
(unless (modulep! +lsp)
|
||||
(set-lookup-handlers! 'clj-refactor-mode
|
||||
:references #'cljr-find-usages))
|
||||
(when (featurep! +lsp)
|
||||
(when (modulep! +lsp)
|
||||
(setq cljr-add-ns-to-blank-clj-files nil))
|
||||
(map! :map clojure-mode-map
|
||||
:localleader
|
||||
|
@ -255,6 +255,6 @@
|
|||
|
||||
;; clojure-lsp already uses clj-kondo under the hood
|
||||
(use-package! flycheck-clj-kondo
|
||||
:when (and (featurep! :checkers syntax)
|
||||
(not (featurep! +lsp)))
|
||||
:when (and (modulep! :checkers syntax)
|
||||
(not (modulep! +lsp)))
|
||||
:after flycheck)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||
;;; lang/clojure/doctor.el
|
||||
|
||||
(when (and (featurep! :checkers syntax)
|
||||
(not (featurep! +lsp)))
|
||||
(when (and (modulep! :checkers syntax)
|
||||
(not (modulep! +lsp)))
|
||||
(unless (executable-find "clj-kondo")
|
||||
(warn! "Couldn't find clj-kondo. flycheck-clj-kondo will not work.")))
|
||||
|
|
|
@ -17,5 +17,5 @@
|
|||
(package! clojure-mode :pin "b6f41d74904daa9312648f3a7bea7a72fd8e140b")
|
||||
(package! clj-refactor :pin "f368c56c83843396b160440f472a661a3b639862")
|
||||
(package! cider :pin "b9e1cc26e2afda003a4b6c1f2a26e04f1c45f3d0")
|
||||
(when (featurep! :checkers syntax)
|
||||
(when (modulep! :checkers syntax)
|
||||
(package! flycheck-clj-kondo :pin "ff7bed2315755cfe02ef471edf522e27b78cd5ca"))
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
:desc "Toggle (fancy)" "T" #'sly-toggle-fancy-trace
|
||||
:desc "Untrace all" "u" #'sly-untrace-all)))
|
||||
|
||||
(when (featurep! :editor evil +everywhere)
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
(add-hook 'sly-mode-hook #'evil-normalize-keymaps)))
|
||||
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
(setq company-coq-disabled-features '(hello company-defaults spinner))
|
||||
|
||||
(if (featurep! :completion company)
|
||||
(if (modulep! :completion company)
|
||||
(define-key coq-mode-map [remap company-complete-common]
|
||||
#'company-indent-or-complete-common)
|
||||
;; `company-coq''s company defaults impose idle-completion on folks, so
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
(set-lookup-handlers! 'crystal-mode
|
||||
:definition #'crystal-def-jump
|
||||
:references #'crystal-tool-imp)
|
||||
(when (featurep! +lsp)
|
||||
(when (modulep! +lsp)
|
||||
(add-hook 'crystal-mode-local-vars-hook #'lsp! 'append))
|
||||
(map! :localleader
|
||||
:map crystal-mode-map
|
||||
|
@ -16,12 +16,12 @@
|
|||
|
||||
|
||||
(use-package! flycheck-crystal
|
||||
:when (featurep! :checkers syntax)
|
||||
:when (modulep! :checkers syntax)
|
||||
:after crystal-mode)
|
||||
|
||||
|
||||
(use-package! flycheck-ameba
|
||||
:when (featurep! :checkers syntax)
|
||||
:when (modulep! :checkers syntax)
|
||||
:after crystal-mode
|
||||
:config (flycheck-ameba-setup))
|
||||
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
|
||||
(package! crystal-mode :pin "96a8058205b24b513d0b9307db32f05e30f9570b")
|
||||
(package! inf-crystal :pin "02007b2a2a3bea44902d7c83c4acba1e39d278e3")
|
||||
(when (featurep! :checkers syntax)
|
||||
(when (modulep! :checkers syntax)
|
||||
(package! flycheck-crystal :pin "96a8058205b24b513d0b9307db32f05e30f9570b")
|
||||
(package! flycheck-ameba :pin "0c4925ae0e998818326adcb47ed27ddf9761c7dc"))
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
:when '(+csharp-sp-point-in-type-p)
|
||||
:post-handlers '(("| " "SPC")))
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(when (modulep! +lsp)
|
||||
(add-hook 'csharp-mode-local-vars-hook #'lsp! 'append))
|
||||
|
||||
(when (featurep! +tree-sitter)
|
||||
(when (modulep! +tree-sitter)
|
||||
(add-hook 'csharp-mode-local-vars-hook #'tree-sitter! 'append))
|
||||
|
||||
(defadvice! +csharp-disable-clear-string-fences-a (fn &rest args)
|
||||
|
@ -49,7 +49,7 @@ or terminating simple string."
|
|||
|
||||
;; Unity shaders
|
||||
(use-package! shader-mode
|
||||
:when (featurep! +unity)
|
||||
:when (modulep! +unity)
|
||||
:mode "\\.shader\\'"
|
||||
:config
|
||||
(def-project-mode! +csharp-unity-mode
|
||||
|
@ -58,7 +58,7 @@ or terminating simple string."
|
|||
|
||||
|
||||
(use-package! sharper
|
||||
:when (featurep! +dotnet)
|
||||
:when (modulep! +dotnet)
|
||||
:general ("C-c d" #'sharper-main-transient)
|
||||
:config
|
||||
(map! (:map sharper--solution-management-mode-map
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue