Use :custom instead of :config (setq ...)

This commit is contained in:
Dimitri Lozeve 2025-04-18 13:30:31 +02:00
parent 02d34dbf7a
commit d42375ecf2

76
init.el
View file

@ -283,10 +283,10 @@
:map minibuffer-local-map :map minibuffer-local-map
("M-s" . consult-history) ;; orig. next-matching-history-element ("M-s" . consult-history) ;; orig. next-matching-history-element
("M-r" . consult-history)) ;; orig. previous-matching-history-element ("M-r" . consult-history)) ;; orig. previous-matching-history-element
:init :custom
;; Use Consult to select xref locations with preview ;; Use Consult to select xref locations with preview
(setq xref-show-xrefs-function #'consult-xref (xref-show-xrefs-function #'consult-xref)
xref-show-definitions-function #'consult-xref)) (xref-show-definitions-function #'consult-xref))
(use-package marginalia (use-package marginalia
:ensure t :ensure t
@ -334,16 +334,16 @@
;; (corfu-on-exact-match nil) ;; Configure handling of exact matches ;; (corfu-on-exact-match nil) ;; Configure handling of exact matches
;; (corfu-echo-documentation nil) ;; Disable documentation in the echo area ;; (corfu-echo-documentation nil) ;; Disable documentation in the echo area
;; (corfu-scroll-margin 5) ;; Use scroll margin ;; (corfu-scroll-margin 5) ;; Use scroll margin
(completion-cycle-threshold 3)
(tab-always-indent 'complete)
:init :init
(setq completion-cycle-threshold 3)
(setq tab-always-indent 'complete)
(global-corfu-mode)) (global-corfu-mode))
(use-package ace-window (use-package ace-window
:ensure t :ensure t
:bind (("M-o" . ace-window)) :bind (("M-o" . ace-window))
:config :custom
(setq aw-scope 'frame)) (aw-scope 'frame))
(use-package avy (use-package avy
:ensure t :ensure t
@ -353,8 +353,8 @@
(use-package vundo (use-package vundo
:ensure t :ensure t
:config :custom
(setq vundo-glyph-alist vundo-unicode-symbols)) (vundo-glyph-alist vundo-unicode-symbols))
(use-package helpful (use-package helpful
:ensure t :ensure t
@ -559,14 +559,14 @@
:ensure t) :ensure t)
(use-package bibtex (use-package bibtex
:config :custom
(setq bibtex-dialect 'biblatex (bibtex-dialect 'biblatex)
bibtex-autokey-year-length 4 (bibtex-autokey-year-length 4)
bibtex-autokey-name-year-separator "" (bibtex-autokey-name-year-separator "")
bibtex-autokey-year-title-separator "_" (bibtex-autokey-year-title-separator "_")
bibtex-autokey-titleword-separator "_" (bibtex-autokey-titleword-separator "_")
bibtex-autokey-titlewords 2 (bibtex-autokey-titlewords 2)
bibtex-autokey-titlewords-stretch 1)) (bibtex-autokey-titlewords-stretch 1))
(use-package oc (use-package oc
:ensure nil :ensure nil
@ -654,17 +654,18 @@
:init :init
(setq org-roam-v2-ack t) (setq org-roam-v2-ack t)
(setq org-roam-completion-system 'default) (setq org-roam-completion-system 'default)
:custom
(org-roam-graph-executable "dot")
(org-roam-graph-extra-config '(("overlap" . "false") ("rankdir" . "LR")))
(org-roam-dailies-directory "daily/")
(org-roam-dailies-capture-templates
'(("d" "default" entry "* %U %?"
:empty-lines-before 1
:target (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>
"))))
:config :config
(org-roam-db-autosync-mode) (org-roam-db-autosync-mode)
(setq org-roam-graph-executable "dot")
(setq org-roam-graph-extra-config '(("overlap" . "false") ("rankdir" . "LR")))
(require 'org-roam-protocol) (require 'org-roam-protocol)
(setq org-roam-dailies-directory "daily/")
(setq org-roam-dailies-capture-templates
'(("d" "default" entry "* %U %?"
:empty-lines-before 1
:target (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>
"))))
(require 'org-roam-export)) (require 'org-roam-export))
(use-package org-roam-bibtex (use-package org-roam-bibtex
@ -702,9 +703,10 @@
(use-package org-download (use-package org-download
:ensure t :ensure t
:custom
(org-download-method 'attach)
:config :config
(add-hook 'dired-mode-hook 'org-download-enable) (add-hook 'dired-mode-hook 'org-download-enable))
(setq org-download-method 'attach))
(use-package org-roam-ui (use-package org-roam-ui
:ensure :ensure
@ -714,11 +716,11 @@
;; a hookable mode anymore, you're advised to pick something yourself ;; a hookable mode anymore, you're advised to pick something yourself
;; if you don't care about startup time, use ;; if you don't care about startup time, use
;; :hook (after-init . org-roam-ui-mode) ;; :hook (after-init . org-roam-ui-mode)
:config :custom
(setq org-roam-ui-sync-theme t (org-roam-ui-sync-theme t)
org-roam-ui-follow t (org-roam-ui-follow t)
org-roam-ui-update-on-save t (org-roam-ui-update-on-save t)
org-roam-ui-open-on-start t)) (org-roam-ui-open-on-start t))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Programming tools ;;; Programming tools
@ -881,9 +883,9 @@
(use-package graphviz-dot-mode (use-package graphviz-dot-mode
:ensure t :ensure t
:config :custom
(setq graphviz-dot-indent-width 4) (graphviz-dot-indent-width 4)
(setq graphviz-dot-preview-extension "svg")) (graphviz-dot-preview-extension "svg"))
;;; Natural languages ;;; Natural languages
@ -909,8 +911,8 @@
:ensure t :ensure t
:diminish jinx-mode :diminish jinx-mode
:hook (emacs-startup . global-jinx-mode) :hook (emacs-startup . global-jinx-mode)
:config :custom
(setq jinx-languages "en_US fr_FR") (jinx-languages "en_US fr_FR")
:bind (("M-$" . jinx-correct) :bind (("M-$" . jinx-correct)
("C-M-$" . jinx-languages))) ("C-M-$" . jinx-languages)))