update spacemacs/declare-prefix usages (#15278)

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
This commit is contained in:
Lucius Hu 2022-02-04 00:36:11 -05:00 committed by GitHub
parent cd9d8c5b24
commit fd652fae0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 386 additions and 340 deletions

View File

@ -20,8 +20,7 @@
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(defconst spell-checking-packages
(setq spell-checking-packages
'( '(
auto-dictionary auto-dictionary
flyspell flyspell
@ -30,8 +29,7 @@
(flyspell-correct-helm :toggle (configuration-layer/layer-used-p 'helm)) (flyspell-correct-helm :toggle (configuration-layer/layer-used-p 'helm))
(flyspell-correct-popup :toggle (and (not (configuration-layer/layer-used-p 'ivy)) (flyspell-correct-popup :toggle (and (not (configuration-layer/layer-used-p 'ivy))
(not (configuration-layer/layer-used-p 'helm)))) (not (configuration-layer/layer-used-p 'helm))))
(flyspell-popup :toggle enable-flyspell-auto-completion) (flyspell-popup :toggle enable-flyspell-auto-completion)))
))
(defun spell-checking/init-auto-dictionary () (defun spell-checking/init-auto-dictionary ()
(use-package auto-dictionary (use-package auto-dictionary
@ -100,8 +98,9 @@ Spell Commands^^ Add To Dictionary^^ Other
:documentation "Enable automatic spell checking." :documentation "Enable automatic spell checking."
:evil-leader "tS") :evil-leader "tS")
(spacemacs/declare-prefix "S" "spelling") (spacemacs/declare-prefix
(spacemacs/declare-prefix "Sa" "add word to dict") "S" "spelling"
"Sa" "add word to dict")
(spacemacs/set-leader-keys (spacemacs/set-leader-keys
"Sab" 'spacemacs/add-word-to-dict-buffer "Sab" 'spacemacs/add-word-to-dict-buffer
"Sag" 'spacemacs/add-word-to-dict-global "Sag" 'spacemacs/add-word-to-dict-global

View File

@ -1,6 +1,6 @@
;;; packages.el --- Auto-completion Layer packages File for Spacemacs ;;; packages.el --- Auto-completion Layer packages File for Spacemacs
;; ;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors ;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;; ;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com> ;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs ;; URL: https://github.com/syl20bnr/spacemacs
@ -21,7 +21,7 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq auto-completion-packages (defconst auto-completion-packages
'( '(
auto-yasnippet auto-yasnippet
auto-complete auto-complete

View File

@ -21,29 +21,27 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq spacemacs-bootstrap-packages (defconst spacemacs-bootstrap-packages
'( '(
;; bootstrap packages, ;; bootstrap packages,
;; `use-package' cannot be used for bootstrap packages configuration ;; `use-package' cannot be used for bootstrap packages configuration
(async :step bootstrap) (async :step bootstrap)
(bind-map :step bootstrap) (bind-map :step bootstrap)
(bind-key :step bootstrap) (bind-key :step bootstrap)
(diminish :step bootstrap) (diminish :step bootstrap)
(evil :step bootstrap) (evil :step bootstrap)
(hydra :step bootstrap) (hydra :step bootstrap)
(use-package :step bootstrap) (use-package :step bootstrap)
(which-key :step bootstrap) (which-key :step bootstrap)
;; pre packages, initialized after the bootstrap packages ;; pre packages, initialized after the bootstrap packages
;; these packages can use use-package ;; these packages can use use-package
(dotenv-mode :step pre) (dotenv-mode :step pre)
(evil-evilified-state :location local :step pre :protected t) (evil-evilified-state :location local :step pre :protected t)
(pcre2el :step pre) (pcre2el :step pre)
(holy-mode :location local :step pre) (holy-mode :location local :step pre)
(hybrid-mode :location (recipe :fetcher local) :step pre) (hybrid-mode :location (recipe :fetcher local) :step pre)
(spacemacs-theme :location built-in) (spacemacs-theme :location built-in)
dash)) dash))
;; bootstrap packages ;; bootstrap packages

View File

@ -385,9 +385,10 @@ Will work on both org-mode and any mode that accepts plain html."
;; Add global evil-leader mappings. Used to access org-agenda ;; Add global evil-leader mappings. Used to access org-agenda
;; functionalities and a few others commands from any other mode. ;; functionalities and a few others commands from any other mode.
(spacemacs/declare-prefix "ao" "org") (spacemacs/declare-prefix
(spacemacs/declare-prefix "aof" "feeds") "ao" "org"
(spacemacs/declare-prefix "aoC" (org-clocks-prefix)) "aof" "feeds"
"aoC" (org-clocks-prefix))
;; org-agenda ;; org-agenda
(when (configuration-layer/layer-used-p 'ivy) (when (configuration-layer/layer-used-p 'ivy)
(spacemacs/set-leader-keys "ao/" 'org-occur-in-agenda-files)) (spacemacs/set-leader-keys "ao/" 'org-occur-in-agenda-files))
@ -683,12 +684,13 @@ Headline^^ Visit entry^^ Filter^^ Da
:defer t :defer t
:init :init
(progn (progn
(spacemacs/declare-prefix "aoJ" "jira") (spacemacs/declare-prefix
(spacemacs/declare-prefix "aoJp" "projects") "aoJ" "jira"
(spacemacs/declare-prefix "aoJi" "issues") "aoJp" "projects"
(spacemacs/declare-prefix "aoJs" "subtasks") "aoJi" "issues"
(spacemacs/declare-prefix "aoJc" "comments") "aoJs" "subtasks"
(spacemacs/declare-prefix "aoJt" "todos") "aoJc" "comments"
"aoJt" "todos")
(spacemacs/set-leader-keys (spacemacs/set-leader-keys
"aoJpg" 'org-jira-get-projects "aoJpg" 'org-jira-get-projects
"aoJib" 'org-jira-browse-issue "aoJib" 'org-jira-browse-issue
@ -927,9 +929,10 @@ Headline^^ Visit entry^^ Filter^^ Da
:hook (after-init . org-roam-setup) :hook (after-init . org-roam-setup)
:init :init
(progn (progn
(spacemacs/declare-prefix "aor" "org-roam") (spacemacs/declare-prefix
(spacemacs/declare-prefix "aord" "org-roam-dailies") "aor" "org-roam"
(spacemacs/declare-prefix "aort" "org-roam-tags") "aord" "org-roam-dailies"
"aort" "org-roam-tags")
(spacemacs/set-leader-keys (spacemacs/set-leader-keys
"aordy" 'org-roam-dailies-goto-yesterday "aordy" 'org-roam-dailies-goto-yesterday
"aordt" 'org-roam-dailies-goto-today "aordt" 'org-roam-dailies-goto-today

View File

@ -36,9 +36,10 @@
(progn (progn
(spacemacs|hide-lighter outline-minor-mode) (spacemacs|hide-lighter outline-minor-mode)
(spacemacs|hide-lighter outshine-mode) (spacemacs|hide-lighter outshine-mode)
(spacemacs/declare-prefix "aO" "out(line/org/shine)") (spacemacs/declare-prefix
(spacemacs/declare-prefix "aOg" "goto") "aO" "out(line/org/shine)"
(spacemacs/declare-prefix "aOi" "insert") "aOg" "goto"
"aOi" "insert")
(spacemacs/set-leader-keys (spacemacs/set-leader-keys
"aO." 'spacemacs/outshine-transient-state/body "aO." 'spacemacs/outshine-transient-state/body
"aOS" 'outline-show-all "aOS" 'outline-show-all

View File

@ -1,6 +1,6 @@
;;; packages.el --- games Layer packages File for Spacemacs ;;; packages.el --- games Layer packages File for Spacemacs
;; ;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors ;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;; ;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com> ;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs ;; URL: https://github.com/syl20bnr/spacemacs
@ -21,16 +21,16 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq games-packages (defconst games-packages
'( '(
2048-game 2048-game
(helm-games :location local (helm-games :location local
:requires helm) :requires helm)
pacmacs pacmacs
(tetris :location built-in) (tetris :location built-in)
sudoku sudoku
typit typit))
))
(defun games/init-2048-game () (defun games/init-2048-game ()
(use-package 2048-mode (use-package 2048-mode
@ -38,7 +38,8 @@
:init :init
(progn (progn
(push '("2048" . (2048-game :quit (kill-buffer-ask (get-buffer "2048")) (push '("2048" . (2048-game :quit (kill-buffer-ask (get-buffer "2048"))
:reset 2048-init)) helm-games-list) :reset 2048-init))
helm-games-list)
(evilified-state-evilify 2048-mode 2048-mode-map (evilified-state-evilify 2048-mode 2048-mode-map
"j" '2048-down "j" '2048-down
"k" '2048-up "k" '2048-up
@ -59,7 +60,8 @@
:init :init
(push '("pacmacs" . (pacmacs-start (push '("pacmacs" . (pacmacs-start
:quit (kill-buffer-ask (get-buffer "*Pacmacs*")) :quit (kill-buffer-ask (get-buffer "*Pacmacs*"))
:reset pacmacs-start)) helm-games-list) :reset pacmacs-start))
helm-games-list)
(evilified-state-evilify pacmacs-mode pacmacs-mode-map (evilified-state-evilify pacmacs-mode pacmacs-mode-map
"h" 'pacmacs-left "h" 'pacmacs-left
"j" 'pacmacs-down "j" 'pacmacs-down
@ -72,7 +74,8 @@
:init :init
(progn (progn
(push '("Tetris" . (tetris :quit spacemacs/tetris-quit-game (push '("Tetris" . (tetris :quit spacemacs/tetris-quit-game
:reset tetris-start-game)) helm-games-list) :reset tetris-start-game))
helm-games-list)
(setq tetris-score-file (concat spacemacs-games-cache-directory (setq tetris-score-file (concat spacemacs-games-cache-directory
"tetris-scores.txt"))) "tetris-scores.txt")))
:config :config
@ -91,7 +94,8 @@
:init :init
(progn (progn
(push '("sudoku" . (sudoku :quit (kill-buffer-ask (get-buffer "*Sudoku*")) (push '("sudoku" . (sudoku :quit (kill-buffer-ask (get-buffer "*Sudoku*"))
:reset sudoku-restart)) helm-games-list) :reset sudoku-restart))
helm-games-list)
(evilified-state-evilify sudoku-mode sudoku-mode-map (evilified-state-evilify sudoku-mode sudoku-mode-map
;; Movement ;; Movement
"j" 'sudoku-move-point-down "j" 'sudoku-move-point-down

View File

@ -22,11 +22,10 @@
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(defconst multiple-cursors-packages
(setq multiple-cursors-packages '(
'( (evil-mc :toggle (eq multiple-cursors-backend 'evil-mc))
(evil-mc :toggle (eq multiple-cursors-backend 'evil-mc)) (multiple-cursors :toggle (eq multiple-cursors-backend 'mc))))
(multiple-cursors :toggle (eq multiple-cursors-backend 'mc))))
(defun multiple-cursors/init-evil-mc () (defun multiple-cursors/init-evil-mc ()
(use-package evil-mc (use-package evil-mc
@ -57,8 +56,9 @@
:defer t :defer t
:init :init
(progn (progn
(spacemacs/declare-prefix "sm" "multiple-cursors") (spacemacs/declare-prefix
(spacemacs/declare-prefix "sms" "specials") "sm" "multiple-cursors"
"sms" "specials")
(spacemacs/set-leader-keys (spacemacs/set-leader-keys
"sma" 'mc/mark-all-dwim "sma" 'mc/mark-all-dwim
"smb" 'mc/mark-all-like-this "smb" 'mc/mark-all-like-this

View File

@ -21,22 +21,23 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq pianobar-packages (defconst pianobar-packages
'( '(
pianobar pianobar))
))
(defun pianobar/init-pianobar () (defun pianobar/init-pianobar ()
(use-package pianobar (use-package pianobar
:defer t :defer t
:init (progn :init
(spacemacs/declare-prefix "am" "music") (progn
(spacemacs/declare-prefix "amp" "Pianobar") (spacemacs/declare-prefix
(spacemacs/set-leader-keys "am" "music"
"ampp" 'pianobar-play-or-pause "amp" "Pianobar")
"ampn" 'pianobar-next-song (spacemacs/set-leader-keys
"amp+" 'pianobar-love-current-song "ampp" 'pianobar-play-or-pause
"amp-" 'pianobar-ban-current-song "ampn" 'pianobar-next-song
"ampt" 'pianobar-shelve-current-song "amp+" 'pianobar-love-current-song
"amps" 'pianobar-change-station "amp-" 'pianobar-ban-current-song
)))) "ampt" 'pianobar-shelve-current-song
"amps" 'pianobar-change-station))))

View File

@ -21,22 +21,24 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq spotify-packages (defconst spotify-packages
'(spotify '(spotify
(helm-spotify-plus :toggle (configuration-layer/package-usedp 'helm)) (helm-spotify-plus :toggle (configuration-layer/package-usedp 'helm))
(counsel-spotify :toggle (configuration-layer/package-usedp 'ivy)))) (counsel-spotify :toggle (configuration-layer/package-usedp 'ivy))))
(defun spotify/init-spotify () (defun spotify/init-spotify ()
(use-package spotify (use-package spotify
:defer t :defer t
:init (progn :init
(spacemacs/declare-prefix "am" "music") (progn
(spacemacs/declare-prefix "ams" "Spotify") (spacemacs/declare-prefix
(spacemacs/set-leader-keys "am" "music"
"amsp" 'spotify-playpause "ams" "Spotify")
"amsn" 'spotify-next (spacemacs/set-leader-keys
"amsN" 'spotify-previous "amsp" 'spotify-playpause
"amsQ" 'spotify-quit)))) "amsn" 'spotify-next
"amsN" 'spotify-previous
"amsQ" 'spotify-quit))))
(defun spotify/init-helm-spotify-plus () (defun spotify/init-helm-spotify-plus ()
(use-package helm-spotify-plus (use-package helm-spotify-plus
@ -51,12 +53,14 @@
counsel-spotify-search-track counsel-spotify-search-track
counsel-spotify-search-tracks-by-artist counsel-spotify-search-tracks-by-artist
counsel-spotify-search-tracks-by-album) counsel-spotify-search-tracks-by-album)
:init (progn :init
(spacemacs/declare-prefix "amss" "search") (progn
(spacemacs/declare-prefix "amssT" "tracks") (spacemacs/declare-prefix
(spacemacs/set-leader-keys "amss" "search"
"amssa" 'counsel-spotify-search-artist "amssT" "tracks")
"amssA" 'counsel-spotify-search-album (spacemacs/set-leader-keys
"amsst" 'counsel-spotify-search-track "amssa" 'counsel-spotify-search-artist
"amssTa" 'counsel-spotify-search-tracks-by-artist "amssA" 'counsel-spotify-search-album
"amssTA" 'counsel-spotify-search-tracks-by-album)))) "amsst" 'counsel-spotify-search-track
"amssTa" 'counsel-spotify-search-tracks-by-artist
"amssTA" 'counsel-spotify-search-tracks-by-album))))

View File

@ -0,0 +1,30 @@
;;; funcs.el --- Floobits Layer functions File for Spacemacs
;;
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(defun spacemacs/floobits-rclocation ()
"Return the absolute path to the floobits dotfile."
(concat user-home-directory ".floorc.json"))
(defun spacemacs/floobits-load-rcfile ()
"Load ~/.floobitsrc if it exists."
(let ((floobitsrc (spacemacs/floobits-rclocation)))
(if (file-exists-p floobitsrc) (load floobitsrc))))

View File

@ -1,6 +1,6 @@
;;; packages.el --- floobits Layer packages File for Spacemacs ;;; packages.el --- floobits Layer packages File for Spacemacs
;; ;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors ;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;; ;;
;; Author: Rodolfo Hansen <rhansen@kitsd.com> ;; Author: Rodolfo Hansen <rhansen@kitsd.com>
;; URL: https://github.com/syl20bnr/spacemacs ;; URL: https://github.com/syl20bnr/spacemacs
@ -21,10 +21,10 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq floobits-packages (defconst floobits-packages
'( '(
floobits floobits))
))
(defun floobits/init-floobits () (defun floobits/init-floobits ()
(use-package floobits (use-package floobits
@ -32,16 +32,6 @@
:init :init
(progn (progn
(spacemacs/declare-prefix "P" "PP/floobits") (spacemacs/declare-prefix "P" "PP/floobits")
(defun spacemacs/floobits-rclocation ()
"Return the absolute path to the floobits dotfile."
(concat user-home-directory ".floorc.json"))
(defun spacemacs/floobits-load-rcfile ()
"Load ~/.floobitsrc if it exists."
(let ((floobitsrc (spacemacs/floobits-rclocation)))
(if (file-exists-p floobitsrc) (load floobitsrc))))
(spacemacs/set-leader-keys (spacemacs/set-leader-keys
"Pc" 'floobits-clear-highlights "Pc" 'floobits-clear-highlights
"Pd" 'spacemacs/floobits-load-rcfile "Pd" 'spacemacs/floobits-load-rcfile

View File

@ -0,0 +1,31 @@
;;; funcs.el --- Deft Layer functions File for Spacemacs
;;
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(defun spacemacs/deft ()
"Helper to call deft and then fix things so that it is nice and works"
(interactive)
(deft)
;; Hungry delete wrecks deft's DEL override
(when (fboundp 'hungry-delete-mode)
(hungry-delete-mode -1))
;; When opening it you always want to filter right away
(evil-insert-state nil))

View File

@ -22,11 +22,10 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq deft-packages (defconst deft-packages
'( '(
deft deft
(zetteldeft :toggle (eq deft-zetteldeft t)) (zetteldeft :toggle (eq deft-zetteldeft t))))
))
(defun deft/init-zetteldeft () (defun deft/init-zetteldeft ()
(use-package zetteldeft (use-package zetteldeft
@ -39,8 +38,7 @@
;; zetteldeft actions in deft mode ;; zetteldeft actions in deft mode
(spacemacs/set-leader-keys-for-major-mode 'deft-mode (spacemacs/set-leader-keys-for-major-mode 'deft-mode
"zT" 'zetteldeft-tag-buffer "zT" 'zetteldeft-tag-buffer
"zn" 'zetteldeft-new-file "zn" 'zetteldeft-new-file)
)
;; zetteldeft actions in org mode ;; zetteldeft actions in org mode
(spacemacs/set-leader-keys-for-major-mode 'org-mode (spacemacs/set-leader-keys-for-major-mode 'org-mode
"zc" 'zetteldeft-search-current-id "zc" 'zetteldeft-search-current-id
@ -53,16 +51,14 @@
"zs" 'zetteldeft-search-at-point "zs" 'zetteldeft-search-at-point
"zl" 'zetteldeft-avy-link-search "zl" 'zetteldeft-avy-link-search
"zF" 'zetteldeft-avy-file-search-ace-window "zF" 'zetteldeft-avy-file-search-ace-window
"zo" 'zetteldeft-find-file "zo" 'zetteldeft-find-file)
)
;; new zetteldeft file under capture ;; new zetteldeft file under capture
(spacemacs/set-leader-keys "Cz" 'zetteldeft-new-file) (spacemacs/set-leader-keys "Cz" 'zetteldeft-new-file)
;; actions under applications/deft/zetteldeft ;; actions under applications/deft/zetteldeft
(spacemacs/set-leader-keys "ardzn" 'zetteldeft-new-file) (spacemacs/set-leader-keys "ardzn" 'zetteldeft-new-file)
(spacemacs/set-leader-keys "ardzT" 'zetteldeft-tag-buffer) (spacemacs/set-leader-keys "ardzT" 'zetteldeft-tag-buffer)
(spacemacs/set-leader-keys "ardzs" 'zetteldeft-search-at-point) (spacemacs/set-leader-keys "ardzs" 'zetteldeft-search-at-point)
(spacemacs/set-leader-keys "ardzo" 'zetteldeft-find-file) (spacemacs/set-leader-keys "ardzo" 'zetteldeft-find-file))))
)))
(defun deft/init-deft () (defun deft/init-deft ()
(use-package deft (use-package deft
@ -80,23 +76,13 @@
(spacemacs/set-leader-keys "ardn" 'spacemacs/deft)) (spacemacs/set-leader-keys "ardn" 'spacemacs/deft))
(spacemacs/set-leader-keys "ard" 'spacemacs/deft)) (spacemacs/set-leader-keys "ard" 'spacemacs/deft))
;; put in capture prefix ;; put in capture prefix
(spacemacs/set-leader-keys "Cd" 'deft-new-file) (spacemacs/set-leader-keys "Cd" 'deft-new-file))
(defun spacemacs/deft ()
"Helper to call deft and then fix things so that it is nice and works"
(interactive)
(deft)
;; Hungry delete wrecks deft's DEL override
(when (fboundp 'hungry-delete-mode)
(hungry-delete-mode -1))
;; When opening it you always want to filter right away
(evil-insert-state nil)))
:config (spacemacs/set-leader-keys-for-major-mode 'deft-mode :config (spacemacs/set-leader-keys-for-major-mode 'deft-mode
"c" 'deft-filter-clear "c" 'deft-filter-clear
"d" 'deft-delete-file "d" 'deft-delete-file
"i" 'deft-toggle-incremental-search "i" 'deft-toggle-incremental-search
"n" 'deft-new-file "n" 'deft-new-file
"N" 'deft-new-file-named "N" 'deft-new-file-named
"q" 'quit-window "q" 'quit-window
"o" 'deft-open-file-other-window "o" 'deft-open-file-other-window
"r" 'deft-rename-file))) "r" 'deft-rename-file)))

View File

@ -21,33 +21,33 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq git-packages (defconst git-packages
'( '(
evil-collection evil-collection
fill-column-indicator fill-column-indicator
;; forge requires a C compiler on Windows so we disable ;; forge requires a C compiler on Windows so we disable
;; it by default on Windows. ;; it by default on Windows.
(forge :toggle (not (spacemacs/system-is-mswindows))) (forge :toggle (not (spacemacs/system-is-mswindows)))
;; include the old git{attributes,config,ignore}-mode ;; include the old git{attributes,config,ignore}-mode
git-modes git-modes
gitignore-templates gitignore-templates
git-commit git-commit
git-link git-link
git-messenger git-messenger
git-timemachine git-timemachine
golden-ratio golden-ratio
(helm-git-grep :requires helm) (helm-git-grep :requires helm)
magit magit
(magit-delta :toggle git-enable-magit-delta-plugin) (magit-delta :toggle git-enable-magit-delta-plugin)
(magit-gitflow :toggle git-enable-magit-gitflow-plugin) (magit-gitflow :toggle git-enable-magit-gitflow-plugin)
magit-section magit-section
(magit-svn :toggle git-enable-magit-svn-plugin) (magit-svn :toggle git-enable-magit-svn-plugin)
(magit-todos :toggle git-enable-magit-todos-plugin) (magit-todos :toggle git-enable-magit-todos-plugin)
org org
(orgit :requires org) (orgit :requires org)
(orgit-forge :requires (org forge)) (orgit-forge :requires (org forge))
smeargle smeargle
transient)) transient))
(defun git/pre-init-golden-ratio () (defun git/pre-init-golden-ratio ()

View File

@ -21,14 +21,14 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq github-packages (defconst github-packages
'( '(
github-clone github-clone
github-search github-search
grip-mode grip-mode
;; this package does not exits, we need it to wrap ;; this package does not exits, we need it to wrap
;; the call to spacemacs/declare-prefix. ;; the call to spacemacs/declare-prefix.
(spacemacs-github :location built-in))) (spacemacs-github :location built-in)))
(defun github/init-github-clone () (defun github/init-github-clone ()
(use-package github-clone (use-package github-clone

View File

@ -21,7 +21,8 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq perforce-packages '(p4)) (defconst perforce-packages
'(p4))
(defun perforce/init-p4 () (defun perforce/init-p4 ()
(use-package p4 (use-package p4

View File

@ -21,45 +21,45 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq spacemacs-defaults-packages (defconst spacemacs-defaults-packages
'( '(
(abbrev :location built-in) (abbrev :location built-in)
(archive-mode :location built-in) (archive-mode :location built-in)
(bookmark :location built-in) (bookmark :location built-in)
(buffer-menu :location built-in) (buffer-menu :location built-in)
(conf-mode :location built-in) (conf-mode :location built-in)
(cus-edit :location built-in (cus-edit :location built-in
:toggle (or (eq 'vim dotspacemacs-editing-style) :toggle (or (eq 'vim dotspacemacs-editing-style)
(eq 'hybrid dotspacemacs-editing-style))) (eq 'hybrid dotspacemacs-editing-style)))
(dired :location built-in) (dired :location built-in)
(dired-x :location built-in) (dired-x :location built-in)
(image-dired :location built-in) (image-dired :location built-in)
(display-line-numbers :location built-in) (display-line-numbers :location built-in)
(electric-indent-mode :location built-in) (electric-indent-mode :location built-in)
(ediff :location built-in) (ediff :location built-in)
(eldoc :location built-in) (eldoc :location built-in)
(help-fns+ :location local) (help-fns+ :location local)
(hi-lock :location built-in) (hi-lock :location built-in)
(image-mode :location built-in) (image-mode :location built-in)
(imenu :location built-in) (imenu :location built-in)
(occur-mode :location built-in) (occur-mode :location built-in)
(package-menu :location built-in) (package-menu :location built-in)
;; page-break-lines is shipped with spacemacs core ;; page-break-lines is shipped with spacemacs core
(page-break-lines :location built-in) (page-break-lines :location built-in)
(process-menu :location built-in) (process-menu :location built-in)
quickrun quickrun
(recentf :location built-in) (recentf :location built-in)
(savehist :location built-in) (savehist :location built-in)
(saveplace :location built-in) (saveplace :location built-in)
(subword :location built-in) (subword :location built-in)
(tar-mode :location built-in) (tar-mode :location built-in)
(uniquify :location built-in) (uniquify :location built-in)
(url :location built-in) (url :location built-in)
(visual-line-mode :location built-in) (visual-line-mode :location built-in)
(whitespace :location built-in) (whitespace :location built-in)
(winner :location built-in) (winner :location built-in)
(xref :location built-in) (xref :location built-in)
(zone :location built-in))) (zone :location built-in)))
;; Initialization of packages ;; Initialization of packages

View File

@ -21,36 +21,36 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq spacemacs-editing-packages (defconst spacemacs-editing-packages
'(aggressive-indent '(aggressive-indent
avy avy
(clean-aindent-mode :toggle dotspacemacs-use-clean-aindent-mode) (clean-aindent-mode :toggle dotspacemacs-use-clean-aindent-mode)
dired-quick-sort dired-quick-sort
drag-stuff drag-stuff
editorconfig editorconfig
eval-sexp-fu eval-sexp-fu
expand-region expand-region
(hexl :location built-in) (hexl :location built-in)
hungry-delete hungry-delete
link-hint link-hint
lorem-ipsum lorem-ipsum
(origami :toggle (eq 'origami dotspacemacs-folding-method)) (origami :toggle (eq 'origami dotspacemacs-folding-method))
password-generator password-generator
(persistent-scratch :toggle dotspacemacs-scratch-buffer-persistent) (persistent-scratch :toggle dotspacemacs-scratch-buffer-persistent)
pcre2el pcre2el
(smartparens :toggle dotspacemacs-activate-smartparens-mode) (smartparens :toggle dotspacemacs-activate-smartparens-mode)
(evil-swap-keys :toggle dotspacemacs-swap-number-row) (evil-swap-keys :toggle dotspacemacs-swap-number-row)
(spacemacs-whitespace-cleanup :location local) (spacemacs-whitespace-cleanup :location local)
string-edit string-edit
string-inflection string-inflection
multi-line multi-line
undo-tree undo-tree
(unkillable-scratch :toggle dotspacemacs-scratch-buffer-unkillable) (unkillable-scratch :toggle dotspacemacs-scratch-buffer-unkillable)
uuidgen uuidgen
(vimish-fold :toggle (eq 'vimish dotspacemacs-folding-method)) (vimish-fold :toggle (eq 'vimish dotspacemacs-folding-method))
(evil-vimish-fold :toggle (eq 'vimish dotspacemacs-folding-method)) (evil-vimish-fold :toggle (eq 'vimish dotspacemacs-folding-method))
(evil-easymotion :toggle (memq dotspacemacs-editing-style '(vim hybrid))) (evil-easymotion :toggle (memq dotspacemacs-editing-style '(vim hybrid)))
ws-butler)) ws-butler))
;; Initialization of packages ;; Initialization of packages
(defun spacemacs-editing/init-aggressive-indent () (defun spacemacs-editing/init-aggressive-indent ()
@ -379,9 +379,10 @@
"ipn" 'password-generator-numeric)))) "ipn" 'password-generator-numeric))))
(defun spacemacs-editing/post-init-pcre2el () (defun spacemacs-editing/post-init-pcre2el ()
(spacemacs/declare-prefix "xr" "regular expressions") (spacemacs/declare-prefix
(spacemacs/declare-prefix "xre" "elisp") "xr" "regular expressions"
(spacemacs/declare-prefix "xrp" "pcre") "xre" "elisp"
"xrp" "pcre")
(spacemacs/set-leader-keys (spacemacs/set-leader-keys
"xr/" 'rxt-explain "xr/" 'rxt-explain
"xr'" 'rxt-convert-to-strings "xr'" 'rxt-convert-to-strings

View File

@ -21,14 +21,14 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq spacemacs-layouts-packages (defconst spacemacs-layouts-packages
'(eyebrowse '(eyebrowse
helm helm
ivy ivy
persp-mode persp-mode
spaceline spaceline
consult consult
(counsel-projectile :requires ivy))) (counsel-projectile :requ ires ivy)))

View File

@ -21,15 +21,14 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq colors-packages (defconst colors-packages
'( '(
;; not working well for now ;; not working well for now
;; rainbow-blocks ;; rainbow-blocks
(nyan-mode :location local) (nyan-mode :location local)
color-identifiers-mode color-identifiers-mode
rainbow-identifiers rainbow-identifiers
rainbow-mode rainbow-mode))
))
;; (defun colors/init-rainbow-blocks () ;; (defun colors/init-rainbow-blocks ()
;; (use-package rainbow-blocks ;; (use-package rainbow-blocks

View File

@ -105,19 +105,17 @@
"dwl" #'dap-ui-locals "dwl" #'dap-ui-locals
"dws" #'dap-ui-sessions "dws" #'dap-ui-sessions
"dwb" #'dap-ui-breakpoints)) "dwb" #'dap-ui-breakpoints))
(prefixes '(("d" . "debug") (prefixes '("d" "debug"
("db" . "breakpoints") "db" "breakpoints"
("dd" . "debugging") "dd" "debugging"
("de" . "eval") "de" "eval"
("dI" . "inspect") "dI" "inspect"
("dS" . "switch") "dS" "switch"
("dT" . "toggles") "dT" "toggles"
("dw" . "debug windows")))) "dw" "debug windows")))
;; Set global prefixes ;; Set global prefixes
(mapc (lambda (cons) (apply #'spacemacs/declare-prefix prefixes)
(spacemacs/declare-prefix (car cons) (cdr cons)))
prefixes)
;; Set global key bindings ;; Set global key bindings
(apply #'spacemacs/set-leader-keys bindings) (apply #'spacemacs/set-leader-keys bindings)
@ -130,14 +128,15 @@
(spacemacs/set-leader-keys-for-major-mode mode "dd" nil) (spacemacs/set-leader-keys-for-major-mode mode "dd" nil)
;; Set prefixes ;; Set prefixes
(mapc (lambda (cons) (cl-do* ((x prefixes (cddr x))
(spacemacs/declare-prefix-for-mode mode (concat "m" (car cons)) (cdr cons))) (y (cdr x) (cdr x)))
prefixes) ((or (null x) (null y)))
(spacemacs/declare-prefix-for-mode mode
(concat "m" (car x)) (car y)))
;; Set bindings ;; Set bindings
(apply #'spacemacs/set-leader-keys-for-major-mode mode bindings)))))) (apply #'spacemacs/set-leader-keys-for-major-mode mode bindings))))))
(defun dap/init-posframe () (defun dap/init-posframe ()
(use-package posframe)) (use-package posframe))

View File

@ -30,7 +30,12 @@
(use-package eaf (use-package eaf
:init :init
(progn (progn
(spacemacs/declare-prefix "aa" "application-framework") (spacemacs/declare-prefix
"aa" "application-framework"
"aab" "browser"
"aabq" "quick-launch-website"
"aam" "mindmap")
(spacemacs/set-leader-keys "aac" 'eaf-open-camera) (spacemacs/set-leader-keys "aac" 'eaf-open-camera)
(spacemacs/set-leader-keys "aaf" 'eaf-open) (spacemacs/set-leader-keys "aaf" 'eaf-open)
(spacemacs/set-leader-keys "aaj" 'eaf-open-jupyter) (spacemacs/set-leader-keys "aaj" 'eaf-open-jupyter)
@ -39,18 +44,14 @@
(spacemacs/set-leader-keys "aas" 'eaf-open-system-monitor) (spacemacs/set-leader-keys "aas" 'eaf-open-system-monitor)
(spacemacs/set-leader-keys "aaM" 'eaf-open-music-player) (spacemacs/set-leader-keys "aaM" 'eaf-open-music-player)
(spacemacs/declare-prefix "aab" "browser")
(spacemacs/set-leader-keys "aabo" 'eaf-open-browser) (spacemacs/set-leader-keys "aabo" 'eaf-open-browser)
(spacemacs/set-leader-keys "aabs" 'eaf-search-it) (spacemacs/set-leader-keys "aabs" 'eaf-search-it)
(spacemacs/set-leader-keys "aabb" 'eaf-open-bookmark) (spacemacs/set-leader-keys "aabb" 'eaf-open-bookmark)
(spacemacs/set-leader-keys "aabh" 'eaf-open-browser-with-history) (spacemacs/set-leader-keys "aabh" 'eaf-open-browser-with-history)
(spacemacs/declare-prefix "aabq" "quick-launch-website")
(spacemacs/set-leader-keys "aabqd" 'duckduckgo) (spacemacs/set-leader-keys "aabqd" 'duckduckgo)
(spacemacs/set-leader-keys "aabqw" 'wikipedia) (spacemacs/set-leader-keys "aabqw" 'wikipedia)
(spacemacs/set-leader-keys "aabqy" 'youtube) (spacemacs/set-leader-keys "aabqy" 'youtube)
(spacemacs/declare-prefix "aam" "mindmap")
(spacemacs/set-leader-keys "aamc" 'eaf-create-mindmap) (spacemacs/set-leader-keys "aamc" 'eaf-create-mindmap)
(spacemacs/set-leader-keys "aamm" 'eaf-open-mindmap) (spacemacs/set-leader-keys "aamm" 'eaf-open-mindmap)
@ -142,7 +143,6 @@
("<f12>" . "open_devtools") ("<f12>" . "open_devtools")
("<C-return>" . "eaf-send-ctrl-return-sequence"))) ("<C-return>" . "eaf-send-ctrl-return-sequence")))
(setq eaf-pdf-viewer-keybinding (setq eaf-pdf-viewer-keybinding
'(("j" . "scroll_up") '(("j" . "scroll_up")
("<down>" . "scroll_up") ("<down>" . "scroll_up")

View File

@ -21,16 +21,15 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq geolocation-packages (defconst geolocation-packages
'( '(
(osx-location :toggle (and geolocation-enable-location-service (osx-location :toggle (and geolocation-enable-location-service
(spacemacs/system-is-mac))) (spacemacs/system-is-mac)))
popwin popwin
(rase :toggle (and geolocation-enable-location-service (rase :toggle (and geolocation-enable-location-service
(spacemacs/system-is-mac))) (spacemacs/system-is-mac)))
(sunshine :toggle geolocation-enable-weather-forecast) (sunshine :toggle geolocation-enable-weather-forecast)
(theme-changer :toggle geolocation-enable-automatic-theme-changer) (theme-changer :toggle geolocation-enable-automatic-theme-changer)))
))
(defun geolocation/init-osx-location () (defun geolocation/init-osx-location ()
"Initialize osx-location" "Initialize osx-location"

View File

@ -21,10 +21,9 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq pandoc-packages (defconst pandoc-packages
'(pandoc-mode '(pandoc-mode
ox-pandoc ox-pandoc))
))
(defun pandoc/init-pandoc-mode () (defun pandoc/init-pandoc-mode ()
"Initialize my package" "Initialize my package"

View File

@ -21,14 +21,13 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq pass-packages (defconst pass-packages
'( '(
(ivy-pass :requires ivy) (ivy-pass :requires ivy)
(helm-pass :requires helm) (helm-pass :requires helm)
auth-source-pass auth-source-pass
password-store password-store
password-store-otp password-store-otp))
))
(defun pass/init-helm-pass () (defun pass/init-helm-pass ()
(use-package helm-pass (use-package helm-pass

View File

@ -1,4 +1,4 @@
;;; keybindings.el --- Quickurl dispatch layer. ;;; packages.el --- Quickurl dispatch layer.
;; ;;
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors ;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
;; ;;
@ -20,14 +20,15 @@
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(defconst quickurl-packages
'(quickurl :location built-in))
;; Keybindings to use Quickurl, including mode-local ones for the listing. (defun quickurl/init-quickurl ()
(spacemacs/declare-prefix "atq" "quickurl")
(spacemacs/declare-prefix "atq" "quickurl") (spacemacs/set-leader-keys
(spacemacs/set-leader-keys "atql" 'quickurl-list
"atql" 'quickurl-list "atqq" 'quickurl
"atqq" 'quickurl "atqi" 'quickurl-ask
"atqi" 'quickurl-ask "atqe" 'quickurl-edit-urls
"atqe" 'quickurl-edit-urls "atqa" 'quickurl-add-url
"atqa" 'quickurl-add-url "atqb" 'quickurl-browse-url-ask))
"atqb" 'quickurl-browse-url-ask)

View File

@ -22,12 +22,11 @@
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq ranger-packages (defconst ranger-packages
'( '(
(dired :location built-in) (dired :location built-in)
golden-ratio golden-ratio
ranger ranger))
))
(defun ranger//set-leader-keys () (defun ranger//set-leader-keys ()
(spacemacs/declare-prefix "atr" "ranger/deer") (spacemacs/declare-prefix "atr" "ranger/deer")

View File

@ -20,8 +20,9 @@
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq vagrant-packages '(vagrant (defconst vagrant-packages
vagrant-tramp)) '(vagrant
vagrant-tramp))
(defun vagrant/init-vagrant () (defun vagrant/init-vagrant ()
(use-package vagrant (use-package vagrant

View File

@ -20,10 +20,9 @@
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(setq evernote-packages (defconst evernote-packages
'( '(
geeknote geeknote))
))
(defun evernote/init-geeknote () (defun evernote/init-geeknote ()
"Initializes geeknote and adds keybindings for its exposed functionalities." "Initializes geeknote and adds keybindings for its exposed functionalities."

View File

@ -27,8 +27,9 @@
(defun reddit/init-reddigg () (defun reddit/init-reddigg ()
(use-package reddigg (use-package reddigg
:defer t :defer t
:init (progn :init
(spacemacs/declare-prefix "awr" "reddit") (progn
(spacemacs/set-leader-keys (spacemacs/declare-prefix "awr" "reddit")
"awrm" 'reddigg-view-main (spacemacs/set-leader-keys
"awrs" 'reddigg-view-sub)))) "awrm" 'reddigg-view-main
"awrs" 'reddigg-view-sub))))

View File

@ -26,7 +26,8 @@
(defun streamlink/init-streamlink () (defun streamlink/init-streamlink ()
(use-package streamlink (use-package streamlink
:defer t :defer t
:init (progn :init
(spacemacs/declare-prefix "aws" "stream") (progn
(spacemacs/set-leader-keys (spacemacs/declare-prefix "aws" "stream")
"awss" 'streamlink-open-url)))) (spacemacs/set-leader-keys
"awss" 'streamlink-open-url))))