dev: updating from latest pr7002

This commit is contained in:
Matt Nish-Lapidus 2024-02-06 14:05:25 -05:00
commit 7cef14960a
163 changed files with 1143 additions and 1224 deletions

View file

@ -13,7 +13,7 @@ Includes:
[Install](#install) • [Documentation] • [FAQ] • [Screenshots] • [Contribute](#contribute)
![Made with Doom Emacs](https://img.shields.io/github/tag/doomemacs/doomemacs.svg?style=flat-square&label=release&color=58839b)
![Supports Emacs 27.129.1](https://img.shields.io/badge/Supports-Emacs_27.129.1-blueviolet.svg?style=flat-square&logo=GNU%20Emacs&logoColor=white)
![Supports Emacs 27.129.2](https://img.shields.io/badge/Supports-Emacs_27.129.2-blueviolet.svg?style=flat-square&logo=GNU%20Emacs&logoColor=white)
![Latest commit](https://img.shields.io/github/last-commit/doomemacs/doomemacs/master?style=flat-square)
![Build status: master](https://img.shields.io/github/workflow/status/doomemacs/doomemacs/CI/master?style=flat-square)
[![Discord Server](https://img.shields.io/discord/406534637242810369?color=738adb&label=Discord&logo=discord&logoColor=white&style=flat-square)][Discord]
@ -107,7 +107,7 @@ Check out [the FAQ][FAQ] for answers to common questions about the project.
# Prerequisites
- Git 2.23+
- Emacs 27.129.1 (**Recommended: 29.1 +
- Emacs 27.129.2 (**Recommended: 29.2 +
[native-comp](https://www.emacswiki.org/emacs/GccEmacs)**)
- [ripgrep] 11.0+
- GNU `find`

View file

@ -34,33 +34,6 @@ of our contributing guide first.
This section is dedicated to examples of concepts and libraries that can benefit
all Emacs users, whether or not they use Doom.
** TODO Emacs Lisp :demos:
**** file-name-with-extension
:PROPERTIES:
:added: 28.1
:END:
#+begin_src emacs-lisp
(file-name-with-extension "some/file.cpp" "h")
#+end_src
#+RESULTS:
: some/file.h
**** file-name-concat
:PROPERTIES:
:added: 28.1
:END:
#+begin_src emacs-lisp
(file-name-concat user-emacs-directory "lisp" "file.el")
#+end_src
#+begin_src emacs-lisp
(file-name-concat "foo" "bar" "baz")
#+end_src
#+RESULTS:
: foo/bar/baz
** TODO Templates
*** TODO Emacs package
*** TODO Dynamic module
@ -70,655 +43,6 @@ This section is dedicated to examples of concepts and libraries only relevant to
Doom and its users. These are intended to be demonstrations, not substitutes for
documentation.
** TODO Emacs Lisp :demos:
*** doom-lib
**** add-hook!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
;; With only one hook and one function, this is identical to `add-hook'. In that
;; case, use that instead.
(add-hook! 'some-mode-hook #'enable-something)
;; Adding many-to-many functions to hooks
(add-hook! some-mode #'enable-something #'and-another)
(add-hook! some-mode '(enable-something and-another))
(add-hook! '(one-mode-hook second-mode-hook) #'enable-something)
(add-hook! (one-mode second-mode) #'enable-something)
;; Appending and local hooks
(add-hook! (one-mode second-mode) :append #'enable-something)
(add-hook! (one-mode second-mode) :local #'enable-something)
;; With arbitrary forms
(add-hook! (one-mode second-mode) (setq v 5) (setq a 2))
(add-hook! (one-mode second-mode) :append :local (setq v 5) (setq a 2))
;; Inline named hook functions
(add-hook! '(one-mode-hook second-mode-hook)
(defun do-something ()
...)
(defun do-another-thing ()
...))
#+end_src
**** TODO add-transient-hook!
:PROPERTIES:
:added: 3.0.0-pre
:END:
**** after!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;;; `after!' will take:
;; An unquoted package symbol (the name of a package)
(after! helm ...)
;; An unquoted list of package symbols (i.e. BODY is evaluated once both magit
;; and git-gutter have loaded)
(after! (magit git-gutter) ...)
;; An unquoted, nested list of compound package lists, using any combination of
;; :or/:any and :and/:all
(after! (:or package-a package-b ...) ...)
(after! (:and package-a package-b ...) ...)
(after! (:and package-a (:or package-b package-c) ...) ...)
;; (Without :or/:any/:and/:all, :and/:all are implied.)
;; A common mistake is to pass it the names of major or minor modes, e.g.
(after! rustic-mode ...)
(after! python-mode ...)
;; But the code in them will never run! rustic-mode is in the `rustic' package
;; and python-mode is in the `python' package. This is what you want:
(after! rustic ...)
(after! python ...)
#+end_src
**** appendq!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
(let ((x '(a b c)))
(appendq! x '(c d e))
x)
#+end_src
#+RESULTS:
: (a b c c d e)
#+begin_src emacs-lisp
(let ((x '(a b c))
(y '(c d e))
(z '(f g)))
(appendq! x y z '(h))
x)
#+end_src
#+RESULTS:
: (a b c c d e f g h)
**** custom-set-faces!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(custom-set-faces!
'(outline-1 :weight normal)
'(outline-2 :weight normal)
'(outline-3 :weight normal)
'(outline-4 :weight normal)
'(outline-5 :weight normal)
'(outline-6 :weight normal)
'(default :background "red" :weight bold)
'(region :background "red" :weight bold))
(custom-set-faces!
'((outline-1 outline-2 outline-3 outline-4 outline-5 outline-6)
:weight normal)
'((default region)
:background "red" :weight bold))
(let ((red-bg-faces '(default region)))
(custom-set-faces!
`(,(cl-loop for i from 0 to 6 collect (intern (format "outline-%d" i)))
:weight normal)
`(,red-bg-faces
:background "red" :weight bold)))
;; You may utilise `doom-themes's theme API to fetch or tweak colors from their
;; palettes. No need to wait until the theme or package is loaded. e.g.
(custom-set-faces!
`(outline-1 :foreground ,(doom-color 'red))
`(outline-2 :background ,(doom-color 'blue)))
#+end_src
**** custom-theme-set-faces!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(custom-theme-set-faces! 'doom-one
'(outline-1 :weight normal)
'(outline-2 :weight normal)
'(outline-3 :weight normal)
'(outline-4 :weight normal)
'(outline-5 :weight normal)
'(outline-6 :weight normal)
'(default :background "red" :weight bold)
'(region :background "red" :weight bold))
(custom-theme-set-faces! '(doom-one-theme doom-one-light-theme)
'((outline-1 outline-2 outline-3 outline-4 outline-5 outline-6)
:weight normal)
'((default region)
:background "red" :weight bold))
(let ((red-bg-faces '(default region)))
(custom-theme-set-faces! '(doom-one-theme doom-one-light-theme)
`(,(cl-loop for i from 0 to 6 collect (intern (format "outline-%d" i)))
:weight normal)
`(,red-bg-faces
:background "red" :weight bold)))
;; You may utilise `doom-themes's theme API to fetch or tweak colors from their
;; palettes. No need to wait until the theme or package is loaded. e.g.
(custom-theme-set-faces! 'doom-one
`(outline-1 :foreground ,(doom-color 'red))
`(outline-2 :background ,(doom-color 'blue)))
#+end_src
**** TODO defer-feature!
:PROPERTIES:
:added: 3.0.0-pre
:END:
**** TODO defer-until!
:PROPERTIES:
:added: 3.0.0-pre
:END:
**** disable-packages!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;; Disable packages enabled by DOOM
(disable-packages! some-package second-package)
#+end_src
**** file-exists-p!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
(file-exists-p! "init.el" doom-emacs-dir)
#+end_src
#+RESULTS:
: /home/hlissner/.emacs.d/init.el
#+begin_src emacs-lisp
(file-exists-p! (and (or "doesnotexist" "init.el")
"LICENSE")
doom-emacs-dir)
#+end_src
#+RESULTS:
: /home/hlissner/.emacs.d/LICENSE
**** cmd!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(map! "C-j" (cmd! (newline) (indent-according-to-mode)))
#+end_src
**** cmd!!
:PROPERTIES:
:added: 3.0.0-pre
:END:
When ~newline~ is passed a numerical prefix argument (=C-u 5 M-x newline=), it
inserts N newlines. We can use ~cmd!!~ to easily create a keybinds that bakes in
the prefix arg into the command call:
#+begin_src emacs-lisp :eval no
(map! "C-j" (cmd!! #'newline 5))
#+end_src
Or to create aliases for functions that behave differently:
#+begin_src emacs-lisp :eval no
(fset 'insert-5-newlines (cmd!! #'newline 5))
;; The equivalent of C-u M-x org-global-cycle, which resets the org document to
;; its startup visibility settings.
(fset 'org-reset-global-visibility (cmd!! #'org-global-cycle '(4))
#+end_src
**** cmds!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(map! :i [tab] (cmds! (and (modulep! :editor snippets)
(bound-and-true-p yas-minor-mode)
(yas-maybe-expand-abbrev-key-filter 'yas-expand))
#'yas-expand
(modulep! :completion company +tng)
#'company-indent-or-complete-common)
:m [tab] (cmds! (and (bound-and-true-p yas-minor-mode)
(evil-visual-state-p)
(or (eq evil-visual-selection 'line)
(not (memq (char-after) (list ?\( ?\[ ?\{ ?\} ?\] ?\))))))
#'yas-insert-snippet
(and (modulep! :editor fold)
(save-excursion (end-of-line) (invisible-p (point))))
#'+fold/toggle
(fboundp 'evil-jump-item)
#'evil-jump-item))
#+end_src
**** kbd!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(map! "," (kbd! "SPC")
";" (kbd! ":"))
#+end_src
**** lambda!
#+begin_src emacs-lisp
(mapcar (lambda! ((&key foo bar baz))
(list foo bar baz))
'((:foo 10 :bar 25)
(:baz hello :boop nil)
(:bar 42)))
#+end_src
**** fn!
#+begin_src emacs-lisp
(mapcar (fn! (symbol-name %)) '(hello world))
#+end_src
#+begin_src emacs-lisp
(seq-sort (fn! (string-lessp (symbol-name %1)
(symbol-name %2)))
'(bonzo foo bar buddy doomguy baz zombies))
#+end_src
#+begin_src emacs-lisp
(format "You passed %d arguments to this function"
(funcall (fn! (length %*)) :foo :bar :baz "hello" 123 t))
#+end_src
**** load!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;;; Lets say we're in ~/.doom.d/config.el
(load! "lisp/module") ; loads ~/.doom.d/lisp/module.el
(load! "somefile" doom-emacs-dir) ; loads ~/.emacs.d/somefile.el
(load! "anotherfile" doom-user-dir) ; loads ~/.doom.d/anotherfile.el
;; If you don't want a `load!' call to throw an error if the file doesn't exist:
(load! "~/.maynotexist" nil t)
#+end_src
**** map!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(map! :map magit-mode-map
:m "C-r" 'do-something ; C-r in motion state
:nv "q" 'magit-mode-quit-window ; q in normal+visual states
"C-x C-r" 'a-global-keybind
:g "C-x C-r" 'another-global-keybind ; same as above
(:when IS-MAC
:n "M-s" 'some-fn
:i "M-o" (cmd! (message "Hi"))))
(map! (:when (modulep! :completion company) ; Conditional loading
:i "C-@" #'+company/complete
(:prefix "C-x" ; Use a prefix key
:i "C-l" #'+company/whole-lines)))
(map! (:when (modulep! :lang latex) ; local conditional
(:map LaTeX-mode-map
:localleader ; Use local leader
:desc "View" "v" #'TeX-view)) ; Add which-key description
:leader ; Use leader key from now on
:desc "Eval expression" ";" #'eval-expression)
#+end_src
These are side-by-side comparisons, showing how to bind keys with and without
~map!~:
#+begin_src emacs-lisp :eval no
;; bind a global key
(global-set-key (kbd "C-x y") #'do-something)
(map! "C-x y" #'do-something)
;; bind a key on a keymap
(define-key emacs-lisp-mode-map (kbd "C-c p") #'do-something)
(map! :map emacs-lisp-mode-map "C-c p" #'do-something)
;; unbind a key defined elsewhere
(define-key lua-mode-map (kbd "SPC m b") nil)
(map! :map lua-mode-map "SPC m b" nil)
;; bind multiple keys
(global-set-key (kbd "C-x x") #'do-something)
(global-set-key (kbd "C-x y") #'do-something-else)
(global-set-key (kbd "C-x z") #'do-another-thing)
(map! "C-x x" #'do-something
"C-x y" #'do-something-else
"C-x z" #'do-another-thing)
;; bind global keys in normal mode
(evil-define-key* 'normal 'global
(kbd "C-x x") #'do-something
(kbd "C-x y") #'do-something-else
(kbd "C-x z") #'do-another-thing)
(map! :n "C-x x" #'do-something
:n "C-x y" #'do-something-else
:n "C-x z" #'do-another-thing)
;; or on a deferred keymap
(evil-define-key 'normal emacs-lisp-mode-map
(kbd "C-x x") #'do-something
(kbd "C-x y") #'do-something-else
(kbd "C-x z") #'do-another-thing)
(map! :map emacs-lisp-mode-map
:n "C-x x" #'do-something
:n "C-x y" #'do-something-else
:n "C-x z" #'do-another-thing)
;; or multiple maps
(dolist (map (list emacs-lisp-mode go-mode-map ivy-minibuffer-map))
(evil-define-key '(normal insert) map
"a" #'a
"b" #'b
"c" #'c))
(map! :map (emacs-lisp-mode go-mode-map ivy-minibuffer-map)
:ni "a" #'a
:ni "b" #'b
:ni "c" #'c)
;; or in multiple states (order of states doesn't matter)
(evil-define-key* '(normal visual) emacs-lisp-mode-map (kbd "C-x x") #'do-something)
(evil-define-key* 'insert emacs-lisp-mode-map (kbd "C-x x") #'do-something-else)
(evil-define-key* '(visual normal insert emacs) emacs-lisp-mode-map (kbd "C-x z") #'do-another-thing)
(map! :map emacs-lisp-mode
:nv "C-x x" #'do-something ; normal+visual
:i "C-x y" #'do-something-else ; insert
:vnie "C-x z" #'do-another-thing) ; visual+normal+insert+emacs
;; You can nest map! calls:
(evil-define-key* '(normal visual) emacs-lisp-mode-map (kbd "C-x x") #'do-something)
(evil-define-key* 'normal go-lisp-mode-map (kbd "C-x x") #'do-something-else)
(map! (:map emacs-lisp-mode :nv "C-x x" #'do-something)
(:map go-lisp-mode :n "C-x x" #'do-something-else))
#+end_src
**** pushnew!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
(let ((list '(a b c)))
(pushnew! list 'c 'd 'e)
list)
#+end_src
#+RESULTS:
: (e d a b c)
**** prependq!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
(let ((x '(a b c)))
(prependq! x '(c d e))
x)
#+end_src
#+RESULTS:
: (c d e a b c)
#+begin_src emacs-lisp
(let ((x '(a b c))
(y '(c d e))
(z '(f g)))
(prependq! x y z '(h))
x)
#+end_src
#+RESULTS:
: (c d e f g h a b c)
**** quiet!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;; Enters recentf-mode without extra output
(quiet! (recentf-mode +1))
#+end_src
**** remove-hook!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;; With only one hook and one function, this is identical to `remove-hook'. In
;; that case, use that instead.
(remove-hook! 'some-mode-hook #'enable-something)
;; Removing N functions from M hooks
(remove-hook! some-mode #'enable-something #'and-another)
(remove-hook! some-mode #'(enable-something and-another))
(remove-hook! '(one-mode-hook second-mode-hook) #'enable-something)
(remove-hook! (one-mode second-mode) #'enable-something)
;; Removing buffer-local hooks
(remove-hook! (one-mode second-mode) :local #'enable-something)
;; Removing arbitrary forms (must be exactly the same as the definition)
(remove-hook! (one-mode second-mode) (setq v 5) (setq a 2))
#+end_src
**** setq!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
;; Each of these have a setter associated with them, which must be triggered in
;; order for their new values to have an effect.
(setq! evil-want-Y-yank-to-eol nil
evil-want-C-u-scroll nil
evil-want-C-d-scroll nil)
#+end_src
**** setq-hook!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;; Set multiple variables after a hook
(setq-hook! 'markdown-mode-hook
line-spacing 2
fill-column 80)
;; Set variables after multiple hooks
(setq-hook! '(eshell-mode-hook term-mode-hook)
hscroll-margin 0)
#+end_src
**** unsetq-hook!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(unsetq-hook! 'markdown-mode-hook line-spacing)
;; Removes the following variable hook
(setq-hook! 'markdown-mode-hook line-spacing 2)
;; Removing N variables from M hooks
(unsetq-hook! some-mode enable-something and-another)
(unsetq-hook! some-mode (enable-something and-another))
(unsetq-hook! '(one-mode-hook second-mode-hook) enable-something)
(unsetq-hook! (one-mode second-mode) enable-something)
#+end_src
**** versionp!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
(versionp! "25.3" > "27.1")
#+end_src
#+RESULTS:
: nil
#+begin_src emacs-lisp
(versionp! "28.0" <= emacs-version <= "28.1")
#+end_src
#+RESULTS:
: t
*** doom-modules
**** doom!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(doom! :completion
company
ivy
;;helm
:tools
(:if IS-MAC macos)
docker
lsp
:lang
(cc +lsp)
(:cond ((string= system-name "work-pc")
python
rust
web)
((string= system-name "writing-pc")
(org +dragndrop)
ruby))
(:if IS-LINUX
(web +lsp)
web)
:config
literate
(default +bindings +smartparens))
#+end_src
**** use-package!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;; Use after-call to load package before hook
(use-package! projectile
:after-call (pre-command-hook after-find-file dired-before-readin-hook))
;; defer recentf packages one by one
(use-package! recentf
:defer-incrementally easymenu tree-widget timer
:after-call after-find-file)
;; This is equivalent to :defer-incrementally (abc)
(use-package! abc
:defer-incrementally t)
#+end_src
**** package!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;; To install a package that can be found on ELPA or any of the sources
;; specified in `straight-recipe-repositories':
(package! evil)
(package! js2-mode)
(package! rainbow-delimiters)
;; To disable a package included with Doom (which will no-op all its `after!'
;; and `use-package!' blocks):
(package! evil :disable t)
(package! rainbow-delimiters :disable t)
;; To install a package from a github repo
(package! so-long :recipe (:host github :repo "hlissner/emacs-so-long"))
;; If a package is particularly big and comes with submodules you don't need,
;; you can tell the package manager not to clone the repo recursively:
(package! ansible :recipe (:nonrecursive t))
;; To pin a package to a specific commit:
(package! evil :pin "e7bc39de2f9")
;; ...or branch:
(package! evil :recipe (:branch "stable"))
;; To unpin a pinned package:
(package! evil :pin nil)
;; If you share your config between two computers, and don't want bin/doom
;; refresh to delete packages used only on one system, use :ignore
(package! evil :ignore (not (equal system-name "my-desktop")))
#+end_src
*** doom-cli
**** TODO defcli!
**** TODO defcli-alias!
**** TODO defcli-obsolete!
**** TODO defcli-stub!
**** TODO defcli-autoload!
**** TODO defcli-group!
**** TODO exit!
**** TODO call!
**** TODO run!
**** TODO sh!
**** TODO sh!!
**** TODO git!
**** TODO def-cli-context-get
**** TODO def-cli-context-put
**** TODO def-cli-context-find-option
**** TODO def-cli-call
**** TODO def-cli-exit
**** TODO def-cli-load
**** TODO def-cli-load-all
**** TODO doom-cli-find
**** TODO doom-cli-get
**** TODO doom-cli-prop
**** TODO doom-cli-subcommands
**** TODO doom-cli-aliases
*** TODO lib/files.el
**** TODO doom-path
**** TODO doom-glob
**** TODO doom-dir
**** TODO doom-files-in
**** TODO doom-file-cookie-p
**** TODO file-exists-p!
**** TODO doom-file-size
**** TODO doom-file-line-count
**** TODO doom-directory-size
**** TODO doom-file-read
**** TODO doom-file-write
**** TODO with-file-contents!
** TODO Configuration files
*** =profiles.el=
:PROPERTIES:

View file

@ -199,7 +199,7 @@ module. This does not include your byte-compiled, third party packages.'"
in (append (doom-glob doom-emacs-dir "*.elc")
(doom-files-in doom-user-dir :match "\\.elc$" :depth 1)
(doom-files-in doom-core-dir :match "\\.elc$")
(doom-files-in doom-modules-dirs :match "\\.elc$" :depth 4))
(doom-files-in doom-module-load-path :match "\\.elc$" :depth 4))
if (file-exists-p path)
do (delete-file path)
and do (print! (success "\033[KDeleted %s%s") (relpath path) esc)

View file

@ -297,7 +297,7 @@ declaration) or dependency thereof that hasn't already been."
;; variables entry is missing the suffix" errors when
;; installing them (see hlissner/doom-emacs#2637), so
;; have git handle conversion by force.
(when (and IS-WINDOWS (stringp local-repo))
(when (and doom--system-windows-p (stringp local-repo))
(let ((default-directory (straight--repos-dir local-repo)))
(when (file-in-directory-p default-directory straight-base-dir)
(straight--process-run "git" "config" "core.autocrlf" "true")))))

654
lisp/demos.org Normal file
View file

@ -0,0 +1,654 @@
#+title: Doom Emacs API Demos
#+property: header-args:elisp :results pp :exports both :eval never-export
This module installs the elisp-demos package, which adds code examples to
documentation buffers (the ones help.el or helpful produces). The built-in demos
are great, but this file exists to add demos for Doom's API and beyond.
#+begin_quote
󰐃 Please make sure new additions to this file are arranged alphabetically and
has a :PROPERTIES: drawer that includes in what version of Doom that the
symbol/function was added.
#+end_quote
#+begin_quote
󰐃 Please don't add demos for code outside of Doom Emacs. PR those to the parent
project: https://github.com/xuchunyang/elisp-demos. And please don't add
functions from modules, put those in that module's demo.org file, or your
own in $DOOMDIR/demos.org.
#+end_quote
* add-hook!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
;; With only one hook and one function, this is identical to `add-hook'. In that
;; case, use that instead.
(add-hook! 'some-mode-hook #'enable-something)
;; Adding many-to-many functions to hooks
(add-hook! some-mode #'enable-something #'and-another)
(add-hook! some-mode '(enable-something and-another))
(add-hook! '(one-mode-hook second-mode-hook) #'enable-something)
(add-hook! (one-mode second-mode) #'enable-something)
;; Appending and local hooks
(add-hook! (one-mode second-mode) :append #'enable-something)
(add-hook! (one-mode second-mode) :local #'enable-something)
;; With arbitrary forms
(add-hook! (one-mode second-mode) (setq v 5) (setq a 2))
(add-hook! (one-mode second-mode) :append :local (setq v 5) (setq a 2))
;; Inline named hook functions
(add-hook! '(one-mode-hook second-mode-hook)
(defun do-something ()
...)
(defun do-another-thing ()
...))
#+end_src
* TODO add-transient-hook!
:PROPERTIES:
:added: 3.0.0-pre
:END:
* after!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;;; `after!' will take:
;; An unquoted package symbol (the name of a package)
(after! helm ...)
;; An unquoted list of package symbols (i.e. BODY is evaluated once both magit
;; and git-gutter have loaded)
(after! (magit git-gutter) ...)
;; An unquoted, nested list of compound package lists, using any combination of
;; :or/:any and :and/:all
(after! (:or package-a package-b ...) ...)
(after! (:and package-a package-b ...) ...)
(after! (:and package-a (:or package-b package-c) ...) ...)
;; (Without :or/:any/:and/:all, :and/:all are implied.)
;; A common mistake is to pass it the names of major or minor modes, e.g.
(after! rustic-mode ...)
(after! python-mode ...)
;; But the code in them will never run! rustic-mode is in the `rustic' package
;; and python-mode is in the `python' package. This is what you want:
(after! rustic ...)
(after! python ...)
#+end_src
* appendq!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
(let ((x '(a b c)))
(appendq! x '(c d e))
x)
#+end_src
#+RESULTS:
: (a b c c d e)
#+begin_src emacs-lisp
(let ((x '(a b c))
(y '(c d e))
(z '(f g)))
(appendq! x y z '(h))
x)
#+end_src
#+RESULTS:
: (a b c c d e f g h)
* cmd!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(map! "C-j" (cmd! (newline) (indent-according-to-mode)))
#+end_src
* cmd!!
:PROPERTIES:
:added: 3.0.0-pre
:END:
When ~newline~ is passed a numerical prefix argument (=C-u 5 M-x newline=), it
inserts N newlines. We can use ~cmd!!~ to easily create a keybinds that bakes in
the prefix arg into the command call:
#+begin_src emacs-lisp :eval no
(map! "C-j" (cmd!! #'newline 5))
#+end_src
Or to create aliases for functions that behave differently:
#+begin_src emacs-lisp :eval no
(fset 'insert-5-newlines (cmd!! #'newline 5))
;; The equivalent of C-u M-x org-global-cycle, which resets the org document to
;; its startup visibility settings.
(fset 'org-reset-global-visibility (cmd!! #'org-global-cycle '(4))
#+end_src
* cmds!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(map! :i [tab] (cmds! (and (modulep! :editor snippets)
(bound-and-true-p yas-minor-mode)
(yas-maybe-expand-abbrev-key-filter 'yas-expand))
#'yas-expand
(modulep! :completion company +tng)
#'company-indent-or-complete-common)
:m [tab] (cmds! (and (bound-and-true-p yas-minor-mode)
(evil-visual-state-p)
(or (eq evil-visual-selection 'line)
(not (memq (char-after) (list ?\( ?\[ ?\{ ?\} ?\] ?\))))))
#'yas-insert-snippet
(and (modulep! :editor fold)
(save-excursion (end-of-line) (invisible-p (point))))
#'+fold/toggle
(fboundp 'evil-jump-item)
#'evil-jump-item))
#+end_src
* custom-set-faces!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(custom-set-faces!
'(outline-1 :weight normal)
'(outline-2 :weight normal)
'(outline-3 :weight normal)
'(outline-4 :weight normal)
'(outline-5 :weight normal)
'(outline-6 :weight normal)
'(default :background "red" :weight bold)
'(region :background "red" :weight bold))
(custom-set-faces!
'((outline-1 outline-2 outline-3 outline-4 outline-5 outline-6)
:weight normal)
'((default region)
:background "red" :weight bold))
(let ((red-bg-faces '(default region)))
(custom-set-faces!
`(,(cl-loop for i from 0 to 6 collect (intern (format "outline-%d" i)))
:weight normal)
`(,red-bg-faces
:background "red" :weight bold)))
;; You may utilise `doom-themes's theme API to fetch or tweak colors from their
;; palettes. No need to wait until the theme or package is loaded. e.g.
(custom-set-faces!
`(outline-1 :foreground ,(doom-color 'red))
`(outline-2 :background ,(doom-color 'blue)))
#+end_src
* custom-theme-set-faces!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(custom-theme-set-faces! 'doom-one
'(outline-1 :weight normal)
'(outline-2 :weight normal)
'(outline-3 :weight normal)
'(outline-4 :weight normal)
'(outline-5 :weight normal)
'(outline-6 :weight normal)
'(default :background "red" :weight bold)
'(region :background "red" :weight bold))
(custom-theme-set-faces! '(doom-one-theme doom-one-light-theme)
'((outline-1 outline-2 outline-3 outline-4 outline-5 outline-6)
:weight normal)
'((default region)
:background "red" :weight bold))
(let ((red-bg-faces '(default region)))
(custom-theme-set-faces! '(doom-one-theme doom-one-light-theme)
`(,(cl-loop for i from 0 to 6 collect (intern (format "outline-%d" i)))
:weight normal)
`(,red-bg-faces
:background "red" :weight bold)))
;; You may utilise `doom-themes's theme API to fetch or tweak colors from their
;; palettes. No need to wait until the theme or package is loaded. e.g.
(custom-theme-set-faces! 'doom-one
`(outline-1 :foreground ,(doom-color 'red))
`(outline-2 :background ,(doom-color 'blue)))
#+end_src
* TODO defer-feature!
:PROPERTIES:
:added: 3.0.0-pre
:END:
* TODO defer-until!
:PROPERTIES:
:added: 3.0.0-pre
:END:
* disable-packages!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;; Disable packages enabled by DOOM
(disable-packages! some-package second-package)
#+end_src
* doom!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(doom! :completion
company
ivy
;;helm
:tools
(:if (featurep :system 'macos) macos)
docker
lsp
:lang
(cc +lsp)
(:cond ((string= system-name "work-pc")
python
rust
web)
((string= system-name "writing-pc")
(org +dragndrop)
ruby))
(:if (featurep :system 'linux)
(web +lsp)
web)
:config
literate
(default +bindings +smartparens))
(doom!
(pin "v3.0.0")
(source "modules/") ; Modules in $DOOMDIR/modules/*/*
(source :name doom :repo "doomemacs/modules" :pin "v21.12.0") ; Doom's default modules
(source :name contrib :repo "doomemacs/contrib-modules" :pin "v21.12.0") ; Community-contributed
;; Examples:
(source :name my :repo "my/modules" :root "unorthodox/path/to/modules/")
(source :name more :host gitlab :repo "more/modules")
;;; To enable (or disable) flags globally, they can be given at top-level:
+lsp -tree-sitter
;;;; Examples of explicit and/or remote modules:
:lang
(rust :repo "doomemacs/modules" :branch "somePR" :pin "1a2b3c4d"
:path "lang/rust"
:flags '(-lsp))
;; A local, out-of-tree module
(python :path "/nonstandard/location/for/modules/python"
:flags '(+pyenv +conda))
(cc :source 'doom) ; explicit source
(agda :source '(doom more)) ; multiple sources
:lang
(clojure +lsp) ; shorthand format still works for flags
nix
;; Conditional modules
(:os :if (featurep :system 'macos)) ; category-wide
macos
(tty :if (equal (system-name) "headless-machine")) ; per-module
...)
#+end_src
* file-exists-p!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
(file-exists-p! "init.el" doom-emacs-dir)
#+end_src
#+begin_src emacs-lisp
(file-exists-p! (and (or "doesnotexist" "init.el")
"LICENSE")
doom-emacs-dir)
#+end_src
* fn!
#+begin_src emacs-lisp
(mapcar (fn! (symbol-name %)) '(hello world))
#+end_src
#+begin_src emacs-lisp
(seq-sort (fn! (string-lessp (symbol-name %1)
(symbol-name %2)))
'(bonzo foo bar buddy doomguy baz zombies))
#+end_src
#+begin_src emacs-lisp
(format "You passed %d arguments to this function"
(funcall (fn! (length %*)) :foo :bar :baz "hello" 123 t))
#+end_src
* kbd!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(map! "," (kbd! "SPC")
";" (kbd! ":"))
#+end_src
* lambda!
#+begin_src emacs-lisp
(mapcar (lambda! ((&key foo bar baz))
(list foo bar baz))
'((:foo 10 :bar 25)
(:baz hello :boop nil)
(:bar 42)))
#+end_src
* load!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;;; Lets say we're in ~/.doom.d/config.el
(load! "lisp/module") ; loads ~/.doom.d/lisp/module.el
(load! "somefile" doom-emacs-dir) ; loads ~/.emacs.d/somefile.el
(load! "anotherfile" doom-user-dir) ; loads ~/.doom.d/anotherfile.el
;; If you don't want a `load!' call to throw an error if the file doesn't exist:
(load! "~/.maynotexist" nil t)
#+end_src
* map!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(map! :map magit-mode-map
:m "C-r" 'do-something ; C-r in motion state
:nv "q" 'magit-mode-quit-window ; q in normal+visual states
"C-x C-r" 'a-global-keybind
:g "C-x C-r" 'another-global-keybind ; same as above
(:when (featurep :system 'macos)
:n "M-s" 'some-fn
:i "M-o" (cmd! (message "Hi"))))
(map! (:when (modulep! :completion company) ; Conditional loading
:i "C-@" #'+company/complete
(:prefix "C-x" ; Use a prefix key
:i "C-l" #'+company/whole-lines)))
(map! (:when (modulep! :lang latex) ; local conditional
(:map LaTeX-mode-map
:localleader ; Use local leader
:desc "View" "v" #'TeX-view)) ; Add which-key description
:leader ; Use leader key from now on
:desc "Eval expression" ";" #'eval-expression)
#+end_src
These are side-by-side comparisons, showing how to bind keys with and without
~map!~:
#+begin_src emacs-lisp :eval no
;; bind a global key
(global-set-key (kbd "C-x y") #'do-something)
(map! "C-x y" #'do-something)
;; bind a key on a keymap
(define-key emacs-lisp-mode-map (kbd "C-c p") #'do-something)
(map! :map emacs-lisp-mode-map "C-c p" #'do-something)
;; unbind a key defined elsewhere
(define-key lua-mode-map (kbd "SPC m b") nil)
(map! :map lua-mode-map "SPC m b" nil)
;; bind multiple keys
(global-set-key (kbd "C-x x") #'do-something)
(global-set-key (kbd "C-x y") #'do-something-else)
(global-set-key (kbd "C-x z") #'do-another-thing)
(map! "C-x x" #'do-something
"C-x y" #'do-something-else
"C-x z" #'do-another-thing)
;; bind global keys in normal mode
(evil-define-key* 'normal 'global
(kbd "C-x x") #'do-something
(kbd "C-x y") #'do-something-else
(kbd "C-x z") #'do-another-thing)
(map! :n "C-x x" #'do-something
:n "C-x y" #'do-something-else
:n "C-x z" #'do-another-thing)
;; or on a deferred keymap
(evil-define-key 'normal emacs-lisp-mode-map
(kbd "C-x x") #'do-something
(kbd "C-x y") #'do-something-else
(kbd "C-x z") #'do-another-thing)
(map! :map emacs-lisp-mode-map
:n "C-x x" #'do-something
:n "C-x y" #'do-something-else
:n "C-x z" #'do-another-thing)
;; or multiple maps
(dolist (map (list emacs-lisp-mode go-mode-map ivy-minibuffer-map))
(evil-define-key '(normal insert) map
"a" #'a
"b" #'b
"c" #'c))
(map! :map (emacs-lisp-mode go-mode-map ivy-minibuffer-map)
:ni "a" #'a
:ni "b" #'b
:ni "c" #'c)
;; or in multiple states (order of states doesn't matter)
(evil-define-key* '(normal visual) emacs-lisp-mode-map (kbd "C-x x") #'do-something)
(evil-define-key* 'insert emacs-lisp-mode-map (kbd "C-x x") #'do-something-else)
(evil-define-key* '(visual normal insert emacs) emacs-lisp-mode-map (kbd "C-x z") #'do-another-thing)
(map! :map emacs-lisp-mode
:nv "C-x x" #'do-something ; normal+visual
:i "C-x y" #'do-something-else ; insert
:vnie "C-x z" #'do-another-thing) ; visual+normal+insert+emacs
;; You can nest map! calls:
(evil-define-key* '(normal visual) emacs-lisp-mode-map (kbd "C-x x") #'do-something)
(evil-define-key* 'normal go-lisp-mode-map (kbd "C-x x") #'do-something-else)
(map! (:map emacs-lisp-mode :nv "C-x x" #'do-something)
(:map go-lisp-mode :n "C-x x" #'do-something-else))
#+end_src
* package!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;; To install a package that can be found on ELPA or any of the sources
;; specified in `straight-recipe-repositories':
(package! evil)
(package! js2-mode)
(package! rainbow-delimiters)
;; To disable a package included with Doom (which will no-op all its `after!'
;; and `use-package!' blocks):
(package! evil :disable t)
(package! rainbow-delimiters :disable t)
;; To install a package from a github repo
(package! so-long :host 'github :repo "hlissner/emacs-so-long")
;; If a package is particularly big and comes with submodules you don't need,
;; you can tell the package manager not to clone the repo recursively:
(package! ansible :nonrecursive t)
;; To pin a package to a specific commit:
(package! evil :pin "e7bc39de2f9")
;; ...or branch:
(package! evil :branch "stable")
;; To unpin a pinned package:
(package! evil :pin nil)
;; If you share your config between two computers, and don't want bin/doom
;; refresh to delete packages used only on one system, use :ignore
(package! evil :ignore (not (equal system-name "my-desktop")))
#+end_src
* prependq!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
(let ((x '(a b c)))
(prependq! x '(c d e))
x)
#+end_src
#+RESULTS:
: (c d e a b c)
#+begin_src emacs-lisp
(let ((x '(a b c))
(y '(c d e))
(z '(f g)))
(prependq! x y z '(h))
x)
#+end_src
#+RESULTS:
: (c d e f g h a b c)
* pushnew!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
(let ((list '(a b c)))
(pushnew! list 'c 'd 'e)
list)
#+end_src
#+RESULTS:
: (e d a b c)
* quiet!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;; Enters recentf-mode without extra output
(quiet! (recentf-mode +1))
#+end_src
* remove-hook!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;; With only one hook and one function, this is identical to `remove-hook'. In
;; that case, use that instead.
(remove-hook! 'some-mode-hook #'enable-something)
;; Removing N functions from M hooks
(remove-hook! some-mode #'enable-something #'and-another)
(remove-hook! some-mode #'(enable-something and-another))
(remove-hook! '(one-mode-hook second-mode-hook) #'enable-something)
(remove-hook! (one-mode second-mode) #'enable-something)
;; Removing buffer-local hooks
(remove-hook! (one-mode second-mode) :local #'enable-something)
;; Removing arbitrary forms (must be exactly the same as the definition)
(remove-hook! (one-mode second-mode) (setq v 5) (setq a 2))
#+end_src
* setq!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
;; Each of these have a setter associated with them, which must be triggered in
;; order for their new values to have an effect.
(setq! evil-want-Y-yank-to-eol nil
evil-want-C-u-scroll nil
evil-want-C-d-scroll nil)
#+end_src
* setq-hook!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;; Set multiple variables after a hook
(setq-hook! 'markdown-mode-hook
line-spacing 2
fill-column 80)
;; Set variables after multiple hooks
(setq-hook! '(eshell-mode-hook term-mode-hook)
hscroll-margin 0)
#+end_src
* unsetq-hook!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
(unsetq-hook! 'markdown-mode-hook line-spacing)
;; Removes the following variable hook
(setq-hook! 'markdown-mode-hook line-spacing 2)
;; Removing N variables from M hooks
(unsetq-hook! some-mode enable-something and-another)
(unsetq-hook! some-mode (enable-something and-another))
(unsetq-hook! '(one-mode-hook second-mode-hook) enable-something)
(unsetq-hook! (one-mode second-mode) enable-something)
#+end_src
* use-package!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp :eval no
;; Use after-call to load package before hook
(use-package! projectile
:after-call (pre-command-hook after-find-file dired-before-readin-hook))
;; defer recentf packages one by one
(use-package! recentf
:defer-incrementally easymenu tree-widget timer
:after-call after-find-file)
;; This is equivalent to :defer-incrementally (abc)
(use-package! abc
:defer-incrementally t)
#+end_src
* versionp!
:PROPERTIES:
:added: 3.0.0-pre
:END:
#+begin_src emacs-lisp
(versionp! "25.3" > "27.1")
#+end_src
#+RESULTS:
: nil
#+begin_src emacs-lisp
(versionp! "28.0" <= emacs-version <= "28.1")
#+end_src
#+RESULTS:
: t

View file

@ -35,7 +35,7 @@ and Emacs states, and for non-evil users.")
;;; Global keybind settings
(cond
(IS-MAC
(doom--system-macos-p
;; mac-* variables are used by the special emacs-mac build of Emacs by
;; Yamamoto Mitsuharu, while other builds use ns-*.
(setq mac-command-modifier 'super
@ -45,7 +45,7 @@ and Emacs states, and for non-evil users.")
;; Free up the right option for character composition
mac-right-option-modifier 'none
ns-right-option-modifier 'none))
(IS-WINDOWS
(doom--system-windows-p
(setq w32-lwindow-modifier 'super
w32-rwindow-modifier 'super)))

View file

@ -8,10 +8,19 @@
(defvar doom-modules (make-hash-table :test 'equal)
"A hash table of enabled modules. Set by `doom-initialize-modules'.")
(defvar doom-modules-dirs
(list (expand-file-name "modules/" doom-user-dir)
doom-modules-dir)
"A list of module root directories. Order determines priority.")
(define-obsolete-variable-alias 'doom-modules-dirs 'doom-module-load-path "3.0.0")
(defvar doom-module-load-path
(list (file-name-concat doom-user-dir "modules")
(file-name-concat doom-emacs-dir "modules"))
"A list of paths where Doom should search for modules.
Order determines priority (from highest to lowest).
Each entry is a string; an absolute path to the root directory of a module tree.
In other words, they should contain a two-level nested directory structure,
where the module's group and name was deduced from the first and second level of
directories. For example: if $DOOMDIR/modules/ is an entry, a
$DOOMDIR/modules/lang/ruby/ directory represents a ':lang ruby' module.")
;;; Module file variables
(defvar doom-module-init-file "init.el"
@ -41,6 +50,8 @@ NOT IMPLEMENTED YET. This file contains a module's metadata: their version,
maintainers, checks, features, submodules, debug information, etc. And are used
to locate modules in the user's file tree.")
;; DEPRECATED: Module warnings will be rewritten in v3, and this variable will no longer be needed.
(make-obsolete-variable 'doom-obsolete-modules nil "3.0.0")
(defconst doom-obsolete-modules
'((:feature (version-control (:emacs vc) (:ui vc-gutter))
(spellcheck (:checkers spell))
@ -83,6 +94,7 @@ syntax-checker modules obsolete. e.g. If :feature version-control is found in
your `doom!' block, a warning is emitted before replacing it with :emacs vc and
:ui vc-gutter.")
(make-obsolete-variable 'doom-inhibit-module-warnings nil "3.0.0")
(defvar doom-inhibit-module-warnings (not noninteractive)
"If non-nil, don't emit deprecated or missing module warnings at startup.")
@ -111,12 +123,12 @@ your `doom!' block, a warning is emitted before replacing it with :emacs vc and
;;
;;; `doom-module-context'
(defvar doom--empty-module-context [nil nil nil nil nil nil nil])
(defvar doom-module--empty-context [nil nil nil nil nil nil nil])
(eval-and-compile
(setplist 'doom-module-context '(index 0 initdepth 1 configdepth 2
group 3 name 4 flags 5 features 6)))
(defvar doom-module-context doom--empty-module-context
(put 'doom-module-context 'keys '(:index 0 :initdepth 1 :configdepth 2
:group 3 :name 4 :flags 5 :features 6)))
(defvar doom-module-context doom-module--empty-context
"A vector describing the module associated it with the active context.
Contains the following: [INDEX INITDEPTH CONFIGDEPTH :GROUP MODULE FLAGS FEATURES]
@ -124,7 +136,8 @@ Contains the following: [INDEX INITDEPTH CONFIGDEPTH :GROUP MODULE FLAGS FEATURE
Do not directly set this variable, only let-bind it.")
;; DEPRECATED: Remove this when byte-compilation is introduced to Doom core.
(defmacro doom-module--context-field (field) (get 'doom-module-context field))
(defmacro doom-module--context-field (field)
(plist-get (get 'doom-module-context 'keys) field))
(defun doom-module-context-get (field &optional context)
"Return the FIELD of CONTEXT.
@ -132,7 +145,9 @@ Do not directly set this variable, only let-bind it.")
FIELD should be one of `index', `initdepth', `configdepth', `group', `name',
`flags', or `features'. CONTEXT should be a `doom-module-context' vector. If
omitted, defaults to `doom-module-context'."
(aref (or context doom-module-context) (get 'doom-module-context field)))
(aref (or context doom-module-context)
(plist-get (get 'doom-module-context 'keys)
field)))
(defun doom-module-context (group &optional name)
"Create a `doom-module-context' from a module by GROUP and NAME.
@ -142,14 +157,14 @@ If NAME is omitted, GROUP is treated as a module key cons cell: (GROUP . NAME)."
(let ((key (if name (cons group name) group)))
(or (get (or (car-safe key) key)
(cdr-safe key))
doom--empty-module-context)))
doom-module--empty-context)))
(defun doom-module-context-key (&optional context)
"Return the module of the active `doom-module-context' as a module key."
(declare (side-effect-free t))
(let ((context (or context doom-module-context)))
(cons (aref context (doom-module--context-field group))
(aref context (doom-module--context-field name)))))
(cons (aref context (doom-module--context-field :group))
(aref context (doom-module--context-field :name)))))
(defmacro doom-module-context-with (module-key &rest body)
"Evaluate BODY with `doom-module-context' informed by MODULE-KEY."
@ -252,7 +267,7 @@ If PLIST consists of a single nil, the module is purged from memory instead."
PATHS-OR-ALL can either be a non-nil value or a list of directories. If given a
list of directories, return a list of module keys for all modules present
underneath it. If non-nil, return the same, but search `doom-modules-dirs'
underneath it. If non-nil, return the same, but search `doom-module-load-path'
(includes :core and :user). Modules that are enabled are sorted first by their
:depth, followed by disabled modules in lexicographical order (unless a :depth
is specified in their .doommodule).
@ -264,7 +279,7 @@ configdepth. See `doom-module-set' for details."
(append (seq-remove #'cdr (doom-module-list nil initorder?))
(doom-files-in (if (listp paths-or-all)
paths-or-all
doom-modules-dirs)
doom-modules-load-path)
:map #'doom-module-from-path
:type 'dirs
:mindepth 1
@ -294,7 +309,7 @@ If the category isn't enabled this returns nil. For finding disabled modules use
path)))
(defun doom-module-locate-path (category &optional module file)
"Searches `doom-modules-dirs' to find the path to a module.
"Searches `doom-module-load-path' to find the path to a module.
CATEGORY is a keyword (e.g. :lang) and MODULE is a symbol (e.g. 'python). FILE
is a string that will be appended to the resulting path. If no path exists, this
@ -310,8 +325,8 @@ returns nil, otherwise an absolute path."
(if file
;; PERF: locate-file-internal is a little faster for finding files,
;; but its interface for finding directories is clumsy.
(locate-file-internal path doom-modules-dirs '("" ".elc" ".el"))
(cl-loop for default-directory in doom-modules-dirs
(locate-file-internal path doom-module-load-path '("" ".elc" ".el"))
(cl-loop for default-directory in doom-module-load-path
if (file-exists-p path)
return (expand-file-name path)))))))
@ -320,8 +335,7 @@ returns nil, otherwise an absolute path."
MODULE-LIST is a list of cons cells (GROUP . NAME). See `doom-module-list' for
an example."
(cl-loop with file = (file-name-sans-extension file)
for (group . name) in module-list
(cl-loop for (group . name) in (or module-list (doom-module-list))
if (doom-module-locate-path group name file)
collect it))
@ -342,14 +356,15 @@ If ENABLED-ONLY, return nil if the containing module isn't enabled."
((file-in-directory-p path doom-user-dir)
(cons :user nil))))))
(defun doom-module-load-path (&optional module-dirs)
(defun doom-module-load-path (&optional module-load-path)
"Return a list of file paths to activated modules.
The list is in no particular order and its file paths are absolute. If
MODULE-DIRS is non-nil, include all modules (even disabled ones) available in
those directories."
(declare (pure t) (side-effect-free t))
(cl-loop for (cat . mod) in (doom-module-list module-dirs)
(cl-loop with module-load-path = (or module-load-path doom-module-load-path)
for (cat . mod) in (doom-module-list module-load-path)
collect (doom-module-locate-path cat mod)))
(defun doom-module-mplist-map (fn mplist)
@ -462,20 +477,20 @@ For more about modules and flags, see `doom!'."
;; PERF: This macro bypasses the module API to spare startup their runtime
;; cost, as `modulep!' gets called *a lot* during startup. In the future,
;; Doom will byte-compile its core files. At that time, we can use it again.
(and (cond (flag (memq flag (aref (or (get category module) doom--empty-module-context)
(doom-module--context-field flags))))
(and (cond (flag (memq flag (aref (or (get category module) doom-module--empty-context)
(doom-module--context-field :flags))))
(module (get category module))
((aref doom-module-context 0)
(memq category (aref doom-module-context
(doom-module--context-field flags))))
(doom-module--context-field :flags))))
((let ((file
;; This must be expanded at the call site, not in
;; `modulep!'s definition, to get the file we want.
(macroexpand '(file!))))
(if-let (module (doom-module-from-path file))
(memq category (aref (or (get (car module) (cdr module))
doom--empty-module-context)
(doom-module--context-field flags)))
doom-module--empty-context)
(doom-module--context-field :flags)))
(error "(modulep! %s %s %s) couldn't figure out what module it was called from (in %s)"
category module flag file)))))
t))

View file

@ -343,7 +343,7 @@ Defaults to the profile at `doom-profile-default'."
";; This file was autogenerated; do not edit it by hand!\n")
;; Doom needs to be synced/rebuilt if either Doom or Emacs has been
;; up/downgraded. This is because byte-code isn't backwards
;; compatible, and many packages (including Doom), make in absolute
;; compatible, and many packages (including Doom), bake in absolute
;; paths into their caches that need to be refreshed.
(prin1 `(unless (equal doom-version ,doom-version)
(error ,(concat
@ -439,7 +439,7 @@ Defaults to the profile at `doom-profile-default'."
(doom-autoloads--scan
(append (doom-glob doom-core-dir "lib/*.el")
(cl-loop for dir
in (append (doom-module-load-path doom-modules-dirs)
in (append (doom-module-load-path)
(list doom-user-dir))
if (doom-glob dir "autoload.el") collect (car it)
if (doom-glob dir "autoload/*.el") append it)

View file

@ -147,7 +147,7 @@ c) are not valid projectile projects."
(projectile-serialize-cache))))
;; Some MSYS utilities auto expanded the `/' path separator, so we need to prevent it.
(when IS-WINDOWS
(when doom--system-windows-p
(setenv "MSYS_NO_PATHCONV" "1") ; Fix path in Git Bash
(setenv "MSYS2_ARG_CONV_EXCL" "--path-separator")) ; Fix path in MSYS2
@ -192,11 +192,11 @@ And if it's a function, evaluate it."
(concat (format "%s . -0 -H --color=never --type file --type symlink --follow --exclude .git %s"
bin (if (version< version "8.3.0")
"" "--strip-cwd-prefix"))
(if IS-WINDOWS " --path-separator=/"))))
(if doom--system-windows-p " --path-separator=/"))))
;; Otherwise, resort to ripgrep, which is also faster than find
((executable-find "rg" t)
(concat "rg -0 --files --follow --color=never --hidden -g!.git"
(if IS-WINDOWS " --path-separator=/")))
(if doom--system-windows-p " --path-separator=/")))
("find . -type f -print0"))))
(defadvice! doom--projectile-default-generic-command-a (fn &rest args)

View file

@ -120,7 +120,7 @@
;; focus when it is started, among other things, so enable the menu-bar for
;; GUI frames, but keep it disabled in terminal frames because there it
;; activates an ugly, in-frame menu bar.
(eval-when! IS-MAC
(eval-when! doom--system-macos-p
(add-hook! '(window-setup-hook after-make-frame-functions)
(defun doom-restore-menu-bar-in-gui-frames-h (&optional frame)
(when-let (frame (or frame (selected-frame)))
@ -137,7 +137,7 @@
(setq default-input-method nil)
;; ...And the clipboard on Windows could be in a wider encoding (UTF-16), so
;; leave Emacs to its own devices.
(eval-when! IS-WINDOWS
(eval-when! (not doom--system-windows-p)
(setq selection-coding-system 'utf-8))

View file

@ -99,7 +99,7 @@
;; Doom needs to be synced/rebuilt if either Doom or Emacs has been
;; up/downgraded. This is because byte-code isn't backwards compatible, and many
;; packages (including Doom), make in absolute paths into their caches that need
;; packages (including Doom), bake in absolute paths into their caches that need
;; to be refreshed.
(let ((old-version (eval-when-compile emacs-version)))
(unless (equal emacs-version old-version)
@ -107,7 +107,30 @@
"recompile it.")
emacs-version old-version)))
;;; Custom features
;;; Custom features & global constants
;; Doom has its own features that its modules, CLI, and user extensions can
;; announce, and don't belong in `features', so they are stored here, which can
;; include information about the external system environment.
(defconst doom-features
(pcase system-type
('darwin '(macos bsd))
((or 'cygwin 'windows-nt 'ms-dos) '(windows))
((or 'gnu 'gnu/linux) '(linux))
((or 'gnu/kfreebsd 'berkeley-unix) '(linux bsd)))
"A list of symbols denoting available features in the active Doom profile.")
;; Convenience aliases for internal use only (may be removed later).
(defconst doom-system (car doom-features))
(defconst doom--system-windows-p (eq 'windows doom-system))
(defconst doom--system-macos-p (eq 'macos doom-system))
(defconst doom--system-linux-p (eq 'linux doom-system))
;; `system-type' is esoteric, so I create a pseudo feature as a stable and
;; consistent alternative, and all while using the same `featurep' interface
;; we're already familiar with.
(push :system features)
(put :system 'subfeatures doom-features)
;; Emacs needs a more consistent way to detect build features, and the docs
;; claim `system-configuration-features' is not da way. Some features (that
;; don't represent packages) can be found in `features' (which `featurep'
@ -126,25 +149,30 @@
(if (not (native-comp-available-p))
(delq 'native-compile features)))
;;; Global constants
;; DEPRECATED remove in v3
(defconst IS-MAC (eq system-type 'darwin))
(defconst IS-LINUX (memq system-type '(gnu gnu/linux gnu/kfreebsd berkeley-unix)))
(defconst IS-WINDOWS (memq system-type '(cygwin windows-nt ms-dos)))
(defconst IS-BSD (memq system-type '(darwin berkeley-unix gnu/kfreebsd)))
(with-no-warnings
(defconst IS-MAC doom--system-macos-p)
(defconst IS-LINUX doom--system-linux-p)
(defconst IS-WINDOWS doom--system-windows-p)
(defconst IS-BSD (memq 'bsd doom-features))
(defconst EMACS28+ (> emacs-major-version 27))
(defconst EMACS29+ (> emacs-major-version 28))
(defconst MODULES (featurep 'dynamic-modules))
(defconst NATIVECOMP (featurep 'native-compile))
(make-obsolete-variable 'IS-MAC "Use (featurep :system 'macos) instead" "3.0.0")
(make-obsolete-variable 'IS-LINUX "Use (featurep :system 'linux) instead" "3.0.0")
(make-obsolete-variable 'IS-WINDOWS "Use (featurep :system 'windows) instead" "3.0.0")
(make-obsolete-variable 'IS-BSD "Use (featurep :system 'bsd) instead" "3.0.0")
(make-obsolete-variable 'EMACS28+ "Use (>= emacs-major-version 28) instead" "3.0.0")
(make-obsolete-variable 'EMACS29+ "Use (>= emacs-major-version 29) instead" "3.0.0")
(make-obsolete-variable 'MODULES "Use (featurep 'dynamic-modules) instead" "3.0.0")
(make-obsolete-variable 'NATIVECOMP "Use (featurep 'native-compile) instead" "3.0.0")
(make-obsolete-variable 'NATIVECOMP "Use (featurep 'native-compile) instead" "3.0.0"))
;;; Fix $HOME on Windows
;; $HOME isn't normally defined on Windows, but many unix tools expect it.
(when IS-WINDOWS
(when doom--system-windows-p
(when-let (realhome
(and (null (getenv-internal "HOME"))
(getenv "USERPROFILE")))
@ -228,7 +256,7 @@ These files should not be shared across systems. By default, it is used by
(define-obsolete-variable-alias 'doom-etc-dir 'doom-data-dir "3.0.0")
(defvar doom-data-dir
(if doom-profile
(if IS-WINDOWS
(if doom--system-windows-p
(expand-file-name "doomemacs/data/" (getenv-internal "APPDATA"))
(expand-file-name "doom/" (or (getenv-internal "XDG_DATA_HOME") "~/.local/share")))
;; DEPRECATED: .local will be removed entirely in 3.0
@ -247,7 +275,7 @@ For profile-local data files, use `doom-profile-data-dir' instead.")
(defvar doom-cache-dir
(if doom-profile
(if IS-WINDOWS
(if doom--system-windows-p
(expand-file-name "doomemacs/cache/" (getenv-internal "APPDATA"))
(expand-file-name "doom/" (or (getenv-internal "XDG_CACHE_HOME") "~/.cache")))
;; DEPRECATED: .local will be removed entirely in 3.0
@ -266,7 +294,7 @@ For profile-local cache files, use `doom-profile-cache-dir' instead.")
(defvar doom-state-dir
(if doom-profile
(if IS-WINDOWS
(if doom--system-windows-p
(expand-file-name "doomemacs/state/" (getenv-internal "APPDATA"))
(expand-file-name "doom/" (or (getenv-internal "XDG_STATE_HOME") "~/.local/state")))
;; DEPRECATED: .local will be removed entirely in 3.0
@ -470,8 +498,8 @@ users).")
(add-transient-hook! 'tool-bar-mode (tool-bar-setup)))
;; PERF: Unset a non-trivial list of command line options that aren't
;; relevant to our current OS, but `command-line-1' still processes.
(unless IS-MAC
;; relevant to this session, but `command-line-1' still processes.
(unless doom--system-macos-p
(setq command-line-ns-option-alist nil))
(unless (memq initial-window-system '(x pgtk))
(setq command-line-x-option-alist nil)))))
@ -649,7 +677,7 @@ of 'doom sync' or 'doom gc'."
gnutls-algorithm-priority
(when (boundp 'libgnutls-version)
(concat "SECURE128:+SECURE192:-VERS-ALL"
(if (and (not IS-WINDOWS)
(if (and (not doom--system-windows-p)
(>= libgnutls-version 30605))
":+VERS-TLS1.3")
":+VERS-TLS1.2"))
@ -713,6 +741,8 @@ appropriately against `noninteractive' or the `cli' context."
(defun doom--begin-init-h ()
"Begin the startup process."
(when (doom-context-push 'init)
;; HACK: Ensure OS checks are as fast as possible (given their ubiquity).
(setq features (cons :system (delq :system features)))
;; Remember these variables' initial values, so we can safely reset them at
;; a later time, or consult them without fear of contamination.
(dolist (var '(exec-path load-path process-environment))

View file

@ -186,7 +186,7 @@ non-nil, treat FILES as pre-generated autoload files instead."
(let ((load-file-name file)
(load-path
(append (list doom-user-dir)
doom-modules-dirs
doom-module-load-path
load-path)))
(condition-case _
(while t

View file

@ -260,7 +260,8 @@ ready to be pasted in a bug report on github."
(bound-and-true-p emacs-repository-branch)
(and (stringp emacs-repository-version)
(substring emacs-repository-version 0 9))
(symlink-path doom-emacs-dir))))
(format "EMACSDIR=%s" (symlink-path doom-emacs-dir))
(format "EMACS=%s" (expand-file-name invocation-name invocation-directory)))))
(doom . ,(list doom-version
(if doom-profile
(format "PROFILE=%s@%s"
@ -300,7 +301,7 @@ ready to be pasted in a bug report on github."
'compiled-user-config)
(if (doom-files-in doom-core-dir :type 'files :match "\\.elc$")
'compiled-core)
(if (doom-files-in doom-modules-dirs :type 'files :match "\\.elc$")
(if (doom-files-in doom-module-load-path :type 'files :match "\\.elc$")
'compiled-modules)))))
(custom
,@(when (and (stringp custom-file)

View file

@ -4,8 +4,8 @@
(defun doom-system-distro ()
"Return a symbol representing the installed distro."
(with-memoization (get 'doom-system-distro 'cached-value)
(cond (IS-WINDOWS 'windows)
(IS-MAC 'macos)
(cond (doom--system-windows-p 'windows)
(doom--system-macos-p 'macos)
((ignore-errors
(with-file-contents! "/etc/os-release"
(when (re-search-forward "^ID=\"?\\([^\"\n]+\\)\"?" nil t)

View file

@ -20,8 +20,8 @@
:pin "b3760f5829dba37e855add7323304561eb57a3d4")
;; doom-ui.el
(package! all-the-icons :pin "be9d5dcda9c892e8ca1535e288620eec075eb0be")
(package! nerd-icons :pin "e109d09b95706bb93c821b1229ca09cf00195690")
(package! all-the-icons :pin "ee414384938ccf2ce93c77d717b85dc5538a257d")
(package! nerd-icons :pin "c6a4acf19454b415cba1c43daf4bfca8fccdd9ba")
(package! hide-mode-line :pin "bc5d293576c5e08c29e694078b96a5ed85631942")
(package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307")
(package! rainbow-delimiters :pin "f40ece58df8b2f0fb6c8576b527755a552a5e763")
@ -29,7 +29,7 @@
;; doom-editor.el
(package! better-jumper :pin "47622213783ece37d5337dc28d33b530540fc319")
(package! dtrt-indent :pin "e0630f74f915c6cded05f76f66d66e540fcc37c3")
(package! dtrt-indent :pin "0230ec503283b895bd3df6c1e30b35a01aa0b9af")
(package! helpful :pin "a32a5b3d959a7fccf09a71d97b3d7c888ac31c69")
(package! pcre2el :pin "018531ba0cf8e2b28d1108136a0e031b6a45f1c1")
(package! smartparens :pin "0778a8a84064cf2bc3a9857bd0e7a4619cc1e5c3")
@ -40,13 +40,13 @@
:pin "572a10c11b6cb88293de48acbb59a059d36f9ba5")
;; doom-projects.el
(package! projectile :pin "9446ea92d28462aeb37846a8be0a0c97a7bc0cee")
(package! project :pin "f64bcf065c0731caecbdcff5ca1c7f2d711b5b1e")
(package! projectile :pin "e45f0b0cc43fdc066e7971ff3ed3bf4c78015ed0")
(package! project :pin "10a6b691e36ff897fb2a4b48896e08818afa77b0")
;; doom-keybinds.el
(package! general :pin "833dea2c4a60e06fcd552b653dfc8960935c9fb4")
(package! general :pin "bda777cd303db217fd2fbf2087eff40ec4aafda1")
(package! which-key :pin "4d20bc852545a2e602f59084a630f888542052b1")
(package! compat
:recipe (:host github :repo "emacs-compat/compat")
:pin "ea8de2ea18cf7c348aadb6eb2aeb2a9d840bd064")
:pin "eb8fbfa5582a8e5880e2eaa66d15d498bca6a45a")

View file

@ -5,4 +5,4 @@
(package! calfw-org :pin "03abce97620a4a7f7ec5f911e669da9031ab9088")
(package! calfw-cal :pin "03abce97620a4a7f7ec5f911e669da9031ab9088")
(package! calfw-ical :pin "03abce97620a4a7f7ec5f911e669da9031ab9088")
(package! org-gcal :pin "9bb3720525ad1c45823abab8ce910dd1225e7dcd")
(package! org-gcal :pin "a2d16b372e5a5972d8cc343cf999ee5f0ba1eea7")

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; app/emms/packages.el
(package! emms :pin "43c61412492229eb641fe572c89c826d8fcf64d9")
(package! emms :pin "87d0d1fb0566a80229029d0d8d7c863138d70aae")

View file

@ -1,9 +1,9 @@
;;; app/everywhere/doctor.el -*- lexical-binding: t; -*-
(when IS-WINDOWS
(when (featurep :system 'windows)
(error! "emacs-everywhere package does not support windows."))
(when IS-LINUX
(when (featurep :system 'linux)
(let (unmet-deps)
(dolist (dep '("xclip" "xdotool" "xprop" "xwininfo"))
(unless (executable-find dep)

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; app/everywhere/packages.el
(package! emacs-everywhere :pin "b461c4b42093abc42e5ec0f73cb7021c2915cea8")
(package! emacs-everywhere :pin "fbeff19825336777dccaefedf3f376dd622cd294")

View file

@ -187,8 +187,8 @@ playback.")
(setq circe-notifications-watch-strings +irc-notifications-watch-strings
circe-notifications-emacs-focused nil
circe-notifications-alert-style
(cond (IS-MAC 'osx-notifier)
(IS-LINUX 'libnotify)
(cond ((featurep :system 'macos) 'osx-notifier)
((featurep :system 'linux) 'libnotify)
(circe-notifications-alert-style))))

View file

@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; app/irc/packages.el
(package! circe :pin "57fe189d7c0b98b9b1b5a59767cea1c7e2c22b13")
(package! circe :pin "d374042741cfd0691135f215d311dca8b7a47d19")
(package! circe-notifications :pin "291149ac12877bbd062da993479d3533a26862b0")

View file

@ -4,4 +4,4 @@
(package! elfeed :pin "55fb162fa27e71b88effa59a83c57842e262b00f")
(package! elfeed-goodies :pin "544ef42ead011d960a0ad1c1d34df5d222461a6b")
(when (modulep! +org)
(package! elfeed-org :pin "fe59a96969bd321f5f9ec7317a4bc80943b94c86"))
(package! elfeed-org :pin "d62d23e25c5e3be3d70b7fbe1eaeb6e43f93a061"))

View file

@ -2,4 +2,4 @@
;;; app/twitter/packages.el
(package! twittering-mode :pin "114891e8fdb4f06b1326a6cf795e49c205cf9e29")
(package! avy :pin "955c8dedd68c74f3cf692c1249513f048518c4c9")
(package! avy :pin "be612110cb116a38b8603df367942e2bb3d9bdbe")

View file

@ -13,7 +13,7 @@
(cond ((setq langtool-bin
(or (executable-find "languagetool-commandline")
(executable-find "languagetool")))) ; for nixpkgs.languagetool
(IS-MAC
((featurep :system 'macos)
(cond
;; is user using home brew?
((file-directory-p "/usr/local/Cellar/languagetool")
@ -25,7 +25,7 @@
;; macports compatibility
((file-directory-p "/opt/local/share/java/LanguageTool")
(setq langtool-java-classpath "/opt/local/share/java/LanguageTool/*"))))
(IS-LINUX
((featurep :system 'linux)
(setq langtool-java-classpath "/usr/share/languagetool:/usr/share/java/languagetool/*")))))

View file

@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; completion/company/packages.el
(package! company :pin "ed46a616ab9906fd43a630479b6a6c3f79e606f0")
(package! company :pin "02903bd7088d65a87df0ae0f0d0a7118de147b69")
(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4")
(when (modulep! +childframe)
(package! company-box :pin "b6f53e26adf948aca55c3ff6c22c21a6a6614253"))

View file

@ -13,10 +13,10 @@
;; Adapted from Corfu's README.
(interactive)
(pcase completion-in-region--data
(`(,beg ,end ,table ,pred . ,extras)
(`(,_ ,_ ,table ,pred ,extras)
(let ((completion-extra-properties extras)
completion-cycle-threshold completion-cycling)
(funcall (default-value 'completion-in-region-function) beg end table pred)))))
(completing-read "Completion: " table pred nil nil 'corfu-history)))))
;;;###autoload
(defun +corfu-smart-sep-toggle-escape ()

View file

@ -148,7 +148,7 @@ Can be negative.")
(defvar helm-generic-files-map (make-sparse-keymap))
(after! helm-locate
(when (and IS-MAC
(when (and (featurep :system 'macos)
(null helm-locate-command)
(executable-find "mdfind"))
(setq helm-locate-command "mdfind -name %s"))

View file

@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; completion/helm/packages.el
(package! helm :pin "96aad023cb12e995e92763195086ccee3aa5a141")
(package! helm :pin "f34ea6b702648e5c7535a704bdb6c4d7afb4b3b8")
(package! helm-company :pin "4622b82353220ee6cc33468f710fa5b6b253b7f1")
(package! helm-c-yasnippet :pin "c5880e740da101fde7a995e94a7b16c330e57583")
(package! helm-descbinds :pin "b72515982396b6e336ad7beb6767e95a80fca192")

View file

@ -1,8 +1,8 @@
;; -*- no-byte-compile: t; -*-
;;; completion/ido/packages.el
(package! flx-ido :pin "7b44a5abb254bbfbeca7a29336f7f4ebd8aabbf2")
(package! ido-completing-read+ :pin "49e7967ea8c0ab0a206b40d70fc19be115083fa1")
(package! flx-ido :pin "4b1346eb9a8a76ee9c9dede69738c63ad97ac5b6")
(package! ido-completing-read+ :pin "5995b4605b4f2d568489491704ef21bc49ddecd5")
(package! ido-sort-mtime :pin "f638ff0c922af862f5211779f2311a27fde428eb")
(package! ido-vertical-mode :pin "b1659e967da0687abceca733b389ace24004fa66")
(package! crm-custom :pin "f1aaccf64306a5f99d9bf7ba815d7ea41c15518d")

View file

@ -237,7 +237,7 @@ results buffer.")
(add-to-list 'ivy-sort-functions-alist '(counsel-imenu))
;; `counsel-locate'
(when IS-MAC
(when (featurep :system 'macos)
;; Use spotlight on mac by default since it doesn't need any additional setup
(setq counsel-locate-cmd #'counsel-locate-cmd-mdfind))
@ -276,13 +276,13 @@ results buffer.")
(cl-loop for dir in projectile-globally-ignored-directories
collect "--exclude"
collect dir)
(if IS-WINDOWS '("--path-separator=/")))))
(if (featurep :system 'windows) '("--path-separator=/")))))
((executable-find "rg" t)
(append (list "rg" "--hidden" "--files" "--follow" "--color=never" "--no-messages")
(cl-loop for dir in projectile-globally-ignored-directories
collect "--glob"
collect (concat "!" dir))
(if IS-WINDOWS '("--path-separator=/"))))
(if (featurep :system 'windows) '("--path-separator=/"))))
((cons find-program args)))
(unless (listp args)
(user-error "`counsel-file-jump-args' is a list now, please customize accordingly."))

View file

@ -10,12 +10,12 @@
(package! amx :pin "5b3aa1aae84f4a225cb8d26ab79a32f97693f023")
(package! counsel-projectile :pin "40d1e1d4bb70acb00fddd6f4df9778bf2c52734b")
(package! ivy-rich :pin "aff9b6bd53e0fdcf350ab83c90e64e651b47dba4")
(package! wgrep :pin "3132abd3750b8c87cbcf6942db952acfab5edccd")
(package! wgrep :pin "208b9d01cfffa71037527e3a324684b3ce45ddc4")
(if (modulep! +prescient)
(package! ivy-prescient :pin "707c25c947a9f17a1d43f97b3b28aba91ec9addb")
(package! ivy-prescient :pin "4b875be52e75f7b81e68a16b62cfbb2f2584042c")
(when (modulep! +fuzzy)
(package! flx :pin "7b44a5abb254bbfbeca7a29336f7f4ebd8aabbf2")))
(package! flx :pin "4b1346eb9a8a76ee9c9dede69738c63ad97ac5b6")))
(when (modulep! +childframe)
(package! ivy-posframe :pin "533a8e368fcabfd534761a5c685ce713376fa594"))

View file

@ -154,7 +154,7 @@ orderless."
;; https://github.com/sharkdp/fd/issues/839
"--full-path --absolute-path"
"--hidden --exclude .git"
(when IS-WINDOWS "--path-separator=/"))))
(if (featurep :system 'windows) "--path-separator=/"))))
(consult-customize
consult-ripgrep consult-git-grep consult-grep

View file

@ -1,17 +1,17 @@
;; -*- no-byte-compile: t; -*-
;;; completion/vertico/packages.el
(package! vertico :pin "cf8b2abf5207696c054c33214c86e3969d415054")
(package! vertico :pin "4a7da56b02c6aefff8f6b4574a530a7cb54bc21a")
(package! orderless :pin "b24748093b00b37c3a572c4909f61c08fa27504f")
(package! consult :pin "e4d371235647a7f4967f093eff2125652796957c")
(package! consult :pin "9463146ba754103db9475ae56e46561366ba4773")
(package! consult-dir :pin "3f5f4b71ebe819392cb090cda71bd39a93bd830a")
(when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
(package! consult-flycheck :pin "d83f87581af74f7a2739d8b1b90c37da5ae3d310"))
(package! embark :pin "33c392cf3ce5b92ad73ed5c4f44dbca5d0741cde")
(package! embark-consult :pin "33c392cf3ce5b92ad73ed5c4f44dbca5d0741cde")
(package! embark :pin "60139db8794f7e4a08076d9f7597d08f6c8083d1")
(package! embark-consult :pin "60139db8794f7e4a08076d9f7597d08f6c8083d1")
(package! marginalia :pin "ea356ebb1ddb8d6da78574b517155475cf52d46f")
@ -23,4 +23,4 @@
(when (modulep! +childframe)
(package! vertico-posframe
:recipe (:host github :repo "tumashu/vertico-posframe")
:pin "bc0e67cbbba4daaf6ce7b8701a0dc7797d468752"))
:pin "2e0e09e5bbd6ec576ddbe566ab122575ef051fab"))

View file

@ -256,7 +256,7 @@
:g "M-8" #'+workspace/switch-to-7
:g "M-9" #'+workspace/switch-to-8
:g "M-0" #'+workspace/switch-to-final
(:when IS-MAC
(:when (featurep :system 'macos)
:g "s-t" #'+workspace/new
:g "s-T" #'+workspace/display
:n "s-1" #'+workspace/switch-to-0

View file

@ -24,7 +24,7 @@ If ARG (universal argument), runs `compile' from the current directory."
generate `completing-read' candidates."
(interactive)
(call-interactively
(if (and (not IS-MAC) (executable-find "man"))
(if (and (not (featurep :system 'macos)) (executable-find "man"))
(or (command-remapping #'man)
#'man)
#'woman)))

View file

@ -81,7 +81,7 @@
;;;###package tramp
(unless IS-WINDOWS
(unless (featurep :system 'windows)
(setq tramp-default-method "ssh")) ; faster than the default scp
@ -300,7 +300,7 @@ Continues comments if executed from a commented line. Consults
(define-key tabulated-list-mode-map "q" #'quit-window))
;; OS specific fixes
(when IS-MAC
(when (featurep :system 'macos)
;; Fix MacOS shift+tab
(define-key key-translation-map [S-iso-lefttab] [backtab])
;; Fix conventional OS keys in Emacs
@ -534,7 +534,7 @@ Continues comments if executed from a commented line. Consults
:gi "C-S-RET" #'+default/newline-above
:gn [C-S-return] #'+default/newline-above
(:when IS-MAC
(:when (featurep :system 'macos)
:gn "s-RET" #'+default/newline-below
:gn [s-return] #'+default/newline-below
:gn "S-s-RET" #'+default/newline-above

View file

@ -3,7 +3,7 @@
(package! avy :pin "be612110cb116a38b8603df367942e2bb3d9bdbe")
(package! drag-stuff :pin "6d06d846cd37c052d79acd0f372c13006aa7e7c8")
(package! link-hint :pin "36ce929331f2838213bcaa1145ece4b73ce84afe")
(package! link-hint :pin "9153eafc776549376bb85d9ff555fef83aca8285")
(unless (modulep! :editor evil)
(package! expand-region :pin "b70feaa644310dc2d599dc277cd20a1f2b6446ac"))
(package! expand-region :pin "e8f4e0fe9c9a80a6a26e2b438502aba9a799d580"))

View file

@ -99,6 +99,7 @@ variable for an explanation of the defaults (in comments). See
bm
bookmark
(buff-menu "buff-menu")
bufler
calc
calendar
cider
@ -112,8 +113,8 @@ variable for an explanation of the defaults (in comments). See
crdt
(custom cus-edit)
cus-theme
daemons
dashboard
daemons
deadgrep
debbugs
debug
@ -197,6 +198,7 @@ variable for an explanation of the defaults (in comments). See
markdown-mode
monky
mpc
mpdel
mu4e
mu4e-conversation
neotree

View file

@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; editor/evil/packages.el
(package! evil :pin "5fc16776c5eb00c956ec7e9d83facb6a38dd868d")
(package! evil :pin "5995f6f21f662484440ed67a28ce59e365feb9ad")
(package! evil-args :pin "2671071a4a57eaee7cc8c27b9e4b6fc60fd2ccd3")
(package! evil-easymotion :pin "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9")
(package! evil-embrace :pin "3081d37811b6a3dfaaf01d578c7ab7a746c6064d")
@ -9,12 +9,12 @@
:recipe (:host github :repo "hlissner/evil-escape")
:pin "819f1ee1cf3f69a1ae920e6004f2c0baeebbe077")
(package! evil-exchange :pin "5f0a2d41434c17c6fb02e4f744043775de1c63a2")
(package! evil-indent-plus :pin "b4dacbfdb57f474f798bfbf5026d434d549eb65c")
(package! evil-indent-plus :pin "f392696e4813f1d3a92c7eeed333248914ba6dae")
(package! evil-lion :pin "1e838a53b8f18a3c8bdf3e952186abc2ee9cb98e")
(package! evil-nerd-commenter :pin "3b197a2b559b06a7cf39978704b196f53dac802a")
(package! evil-numbers :pin "7a1b62afc12da2b582bf84d722e7b10ca8b97065")
(package! evil-snipe :pin "c2108d3932fcd2f75ac3e48250d6badd668f5b4f")
(package! evil-surround :pin "8fad8540c490d94a820004f227552ca08e3e3857")
(package! evil-surround :pin "c7116cdc774b1e259eaf3e9e7a318a6c99c2da17")
(package! evil-textobj-anyblock
:recipe (:host github
:repo "willghatch/evil-textobj-anyblock"

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; editor/file-templates/packages.el
(package! yasnippet :pin "5cbdbf0d2015540c59ed8ee0fcf4788effdf75b6")
(package! yasnippet :pin "297546f0853a6a51f5b05e954d0c6aea8caa5ec2")

View file

@ -7,5 +7,5 @@
(when (modulep! :editor evil)
(package! evil-vimish-fold :pin "b6e0e6b91b8cd047e80debef1a536d9d49eef31a"))
(when (modulep! :tools tree-sitter)
(package! ts-fold :pin "75e72c658ad8d8aac3af554a6b51b3c5c22dd0aa"
(package! ts-fold :pin "0627723e5f962fc72b238d4cf99a7f217e72aa3e"
:recipe (:host github :repo "emacs-tree-sitter/ts-fold")))

View file

@ -17,7 +17,7 @@
(indent 0))
(with-current-buffer formatted-buffer
(erase-buffer)
(unless IS-WINDOWS
(unless (featurep :system 'windows)
(setq-local coding-system-for-read 'utf-8)
(setq-local coding-system-for-write 'utf-8))
;; Ensure this temp buffer seems as much like the origin buffer as

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; editor/format/packages.el
(package! apheleia :pin "56651724ad22f2769bbdaccf54cbe75c1cb35c91")
(package! apheleia :pin "96a9805ecb75aac2adde7568d26b3e3b3ffc19af")

View file

@ -74,8 +74,7 @@
(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 (featurep :system 'linux))
(after! smartparens
;; Make evil-mc cooperate with smartparens better

View file

@ -11,12 +11,13 @@
hy-mode) . parinfer-rust-mode)
:init
(setq parinfer-rust-library
(concat doom-data-dir "parinfer-rust/"
(cond (IS-MAC "parinfer-rust-darwin.so")
(IS-LINUX "parinfer-rust-linux.so")
(IS-WINDOWS "parinfer-rust-windows.dll")
(IS-BSD "libparinfer_rust.so")))
parinfer-rust-auto-download (not IS-BSD))
(file-name-concat
doom-data-dir "parinfer-rust/"
(cond ((featurep :system 'macos) "parinfer-rust-darwin.so")
((featurep :system 'linux) "parinfer-rust-linux.so")
((featurep :system 'windows) "parinfer-rust-windows.dll")
((featurep :system 'bsd) "libparinfer_rust.so")))
parinfer-rust-auto-download (not (featurep :system 'bsd)))
:config
(map! :map parinfer-rust-mode-map
:localleader

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; editor/parinfer/packages.el
(package! parinfer-rust-mode :pin "6e6bdeeba32534acca5928fe4201ce013094988d")
(package! parinfer-rust-mode :pin "8df117a3b54d9e01266a3905b132a1d082944702")

View file

@ -1,10 +1,10 @@
;; -*- no-byte-compile: t; -*-
;;; editor/snippets/packages.el
(package! yasnippet :pin "76e1eee654ea9479ba1441f9c17567694e6a2096")
(package! yasnippet :pin "297546f0853a6a51f5b05e954d0c6aea8caa5ec2")
(package! auto-yasnippet :pin "6a9e406d0d7f9dfd6dff7647f358cb05a0b1637e")
(package! doom-snippets
:recipe (:host github
:repo "doomemacs/snippets"
:files (:defaults "*"))
:pin "d490cba6d762e69b483be308bc387c1f785742f0")
:pin "f022984ee1318a4015d5d081b3c3dab5a60dc6ff")

View file

@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; editor/word-wrap/packages.el
(package! adaptive-wrap :pin "fc9f0306f14c3859c9903b0a0336478bf070c943")
(package! visual-fill-column :pin "695a59789209c42fa08a5bce92963ee32f4455be")
(package! adaptive-wrap :pin "70005d2012ab57c20be03c05aebd49318fe49c99")
(package! visual-fill-column :pin "db7c7c236555c9c684e1294a277efefdc25fa5c4")

View file

@ -29,7 +29,7 @@
(set-evil-initial-state! 'image-dired-display-image-mode 'emacs)
(let ((args (list "-ahl" "-v" "--group-directories-first")))
(when IS-BSD
(when (featurep :system 'bsd)
;; Use GNU ls as `gls' from `coreutils' if available. Add `(setq
;; dired-use-ls-dired nil)' to your config to suppress the Dired warning
;; when not using GNU ls.
@ -137,6 +137,7 @@ we have to clean it up ourselves."
:init (after! dired (dirvish-override-dired-mode))
:hook (dired-mode . dired-omit-mode)
:config
(require 'dired-x)
(setq dirvish-cache-dir (concat doom-cache-dir "dirvish/")
dirvish-hide-details nil
dirvish-attributes '(git-msg)
@ -171,7 +172,6 @@ we have to clean it up ourselves."
(use-package! dired-x
:unless (modulep! +dirvish)
:unless (modulep! +ranger)
:hook (dired-mode . dired-omit-mode)
:config
@ -188,9 +188,9 @@ we have to clean it up ourselves."
;; deleted directory. Of course I do!
(setq dired-clean-confirm-killing-deleted-buffers nil)
;; Let OS decide how to open certain files
(when-let (cmd (cond (IS-MAC "open")
(IS-LINUX "xdg-open")
(IS-WINDOWS "start")))
(when-let (cmd (cond ((featurep :system 'macos) "open")
((featurep :system 'linux) "xdg-open")
((featurep :system 'windows) "start")))
(setq dired-guess-shell-alist-user
`(("\\.\\(?:docx\\|pdf\\|djvu\\|eps\\)\\'" ,cmd)
("\\.\\(?:jpe?g\\|png\\|gif\\|xpm\\)\\'" ,cmd)

View file

@ -1,4 +1,4 @@
;;; emacs/dired/doctor.el -*- lexical-binding: t; -*-
(when (and IS-BSD (not (executable-find "gls")))
(when (and (featurep :system 'bsd) (not (executable-find "gls")))
(warn! "Cannot find gls (GNU ls). This may cause issues with dired"))

View file

@ -1,14 +1,14 @@
;; -*- no-byte-compile: t; -*-
;;; emacs/dired/packages.el
(package! diredfl :pin "f9140b2c42151dca669003d685c9f079b2e3dc37")
(package! dired-git-info :pin "9461476a28a5fec0784260f6e318237c662c3430")
(package! dired-rsync :pin "7940d9154d0a908693999b0e1ea351a6d365c93d")
(package! diredfl :pin "f6d599c30875ab4894c1deab9713ff2faea54e06")
(package! dired-git-info :pin "6b6f2a5d716debba9a7dcac623d5a1e4c799eb62")
(package! dired-rsync :pin "5bcb851f3bf9c4f7c07299fcc25be7c408a68cda")
(when (modulep! +ranger)
(package! ranger :pin "2498519cb21dcd5791d240607a72a204d1761668"))
(when (modulep! +dirvish)
(package! dirvish :pin "4fe9c00894304e99aca22ae4b6b656fe94b8f927"))
(package! dirvish :pin "119f9f59a618bb7b476c93e9ab1d7542c5c1df41"))
(when (and (modulep! +icons)
(not (modulep! +dirvish)))
(package! nerd-icons-dired :pin "4a068884bf86647d242c3adc8320cd603e15dac3"))
(package! nerd-icons-dired :pin "c1c73488630cc1d19ce1677359f614122ae4c1b9"))
(package! fd-dired :pin "458464771bb220b6eb87ccfd4c985c436e57dc7e")

View file

@ -2,4 +2,4 @@
;;; emacs/ibuffer/packages.el
(package! ibuffer-projectile :pin "710ecac1578273bf31debe52870f5844472e3428")
(package! ibuffer-vc :pin "1388d2ea18287c74a79d053619dbdfa9090c26a2")
(package! ibuffer-vc :pin "66d02267334f536e978ed7f384f88bd04a3d4dbb")

View file

@ -3,7 +3,7 @@
(if (modulep! +tree)
(package! undo-tree :pin "f9e7eac16f674aa7ed8fa065401d26c0258a84f8")
(package! undo-fu :pin "0e74116fd5c7797811a91ba4eadef50d67523eb6")
(package! undo-fu-session :pin "a6c4f73bc22401fd36e0f2fd4fe058bb28566d84")
(package! undo-fu :pin "04961ba775142627c5fa4bb94c3e507afedaecd1")
(package! undo-fu-session :pin "2b355c9d39b2688f859a762f2289f23fd16fadc4")
(when (> emacs-major-version 27) ; unsupported in 27
(package! vundo :pin "24271862a2f746be038306eafe20f5eff55c4566")))
(package! vundo :pin "10d011fb05a9db0cc2f641e5b5bebe4b5fb81b6f")))

View file

@ -5,7 +5,7 @@
;; 2021, amirite?
(setq-default vc-handled-backends '(SVN Git Hg))
(when IS-WINDOWS
(when (featurep :system 'windows)
(setenv "GIT_ASKPASS" "git-gui--askpass"))
;; In case the user is using `bug-reference-mode'

View file

@ -5,10 +5,10 @@
(package! vc-annotate :built-in t)
(package! smerge-mode :built-in t)
(package! browse-at-remote :pin "c020975a891438e278ad1855213d4f3d62c9fccb")
(package! git-commit :pin "48818355728c48d986d74dde8b1e9fba25f0fd53")
(package! browse-at-remote :pin "76aa27dfd469fcae75ed7031bb73830831aaccbf")
(package! git-commit :pin "54d37dc14c3f715dd0328a70bc65d63c54ee9613")
(package! git-timemachine
;; The original lives on codeberg.org; which has uptime issues.
:recipe (:host github :repo "emacsmirror/git-timemachine")
:pin "d8ffd0d7cc4ab3dd7de494c9ea36dfd99e2744fa")
(package! git-modes :pin "f0a0154bf48dd1c0c587596cf4cfd3c90f673a05")
:pin "ac933e5cd29583c131401f3bd991d98129c316df")
(package! git-modes :pin "4a61a9b86df9c824a99c522f42d55e68faf85f91")

View file

@ -6,7 +6,7 @@
(defun +org-msg-img-scale-css (img-uri)
"For a given IMG-URI, use imagemagick to find its width."
(if +org-msg-currently-exporting
(when (and (not IS-WINDOWS)) ; relies on posix path
(when (and (not (featurep :system 'windows))) ; relies on posix path
(let ((width-call (and (executable-find "identify")
(doom-call-process "identify" "-format" "%w"
(substring img-uri 7))))) ; 7=(length "file://")

View file

@ -365,7 +365,7 @@ This should already be the case yet it does not always seem to be."
(read-only-mode -1))
;; process lock control
(when IS-WINDOWS
(when (featurep :system 'windows)
(setq
+mu4e-lock-file (expand-file-name "~/AppData/Local/Temp/mu4e_lock")
+mu4e-lock-request-file (expand-file-name "~/AppData/Local/Temp/mu4e_lock_request")))
@ -696,7 +696,7 @@ See `+mu4e-msg-gmail-p' and `mu4e-sent-messages-behavior'.")
t)))
mails)))
(when IS-LINUX
(when (featurep :system 'linux)
(mu4e-alert-set-default-style 'libnotify)
(defvar +mu4e-alert-bell-cmd '("paplay" . "/usr/share/sounds/freedesktop/stereo/message.oga")

View file

@ -9,7 +9,7 @@
You may not have a way of fetching mail."))
(when (and (modulep! +org)
(not IS-WINDOWS))
(not (featurep :system 'windows)))
(unless (executable-find "identify")
(warn! "Couldn't find the identify command from imagemagick. \
LaTeX fragment re-scaling with org-msg will not work.")))

View file

@ -2,6 +2,6 @@
;;; email/mu4e/packages.el
(when (modulep! +org)
(package! org-msg :pin "055de4abf611c5d5e12c770fe149c1861b402817"))
(package! org-msg :pin "0b65f0f77a7a71881ddfce19a8cdc60465bda057"))
(package! mu4e-alert :pin "6beda20fc69771f2778f507c4a9e069dbaf1b628")

View file

@ -17,15 +17,15 @@
"??")))
(cdr (doom-call-process "git" "rev-parse" "HEAD")))
t t)))
:pin "b6f144abe1f5aa3519240cf52f4cb9907fefcd0e")
:pin "2f0320c5f24adfee026e938ebc379ca90e3045d3")
(when (modulep! +org)
(package! org-mime :pin "d368bd4119bfcf2997a6a23bbf5f41e043164d29"))
(package! org-mime :pin "9d4584651d89806b79d5993b286d32d6f70499a9"))
(when (modulep! :lang org)
(package! ol-notmuch :pin "781c3518a537da2a8b5e8a4424f9441df463a147"))
(package! ol-notmuch :pin "881991d94a1ad750633fcf1f2d8a9e0616979be3"))
(when (modulep! :completion ivy)
(package! counsel-notmuch :pin "a4a1562935e4180c42524c51609d1283e9be0688"))
(when (modulep! :completion helm)
(package! helm-notmuch :pin "97a01497e079a7b6505987e9feba6b603bbec288"))
(when (modulep! :completion vertico)
(package! consult-notmuch :pin "d0d4129d45ccceddaeeaa3631eb42d5dd09a758b"))
(package! consult-notmuch :pin "d8022e2ddc67ed4e89cc6f5bbe664fdb04e1e815"))

View file

@ -15,6 +15,9 @@
- +gmail ::
Enable gmail-specific configuration for mail ~To~ or ~From~ a gmail address.
- +xface ::
Enable support of [X-Face] powered by [compface].
** Packages
- [[doom-package:wanderlust]]
@ -52,3 +55,6 @@
#+begin_quote
󱌣 This module has no appendix yet. [[doom-contrib-module:][Write one?]]
#+end_quote
[X-Face]: https://en.wikipedia.org/wiki/X-Face
[compface]: http://freecode.com/projects/compface/

View file

@ -20,8 +20,13 @@
wl-init-file (expand-file-name "wl.el" doom-user-dir)
wl-folders-file (expand-file-name "folders.wl" doom-user-dir))
(setq wl-message-truncate-lines t
wl-summary-width 120
;; macOS allows file names up to 255 characters,
;; use half of that size as threshold to switch to hashing
(setq elmo-msgdb-path-encode-threshold 128)
(setq wl-message-truncate-lines nil
wl-summary-width nil
wl-forward-subject-prefix "Fwd: "
wl-message-ignored-field-list
'(".*Received:"
".*Path:"
@ -29,6 +34,7 @@
"^References:"
"^Replied:"
"^Errors-To:"
"^Mail-.*-To:"
"^Lines:"
"^Sender:"
".*Host:"
@ -40,7 +46,14 @@
"^MIME.*:"
"^In-Reply-To:"
"^Content-Transfer-Encoding:"
"^List-.*:")
"^Content-Disposition:"
"^List-.*:"
"^Received-SPF:"
"^DKIM-.*:"
"^SPF-.*:"
"^Autocrypt:"
"^ARC-.*:"
"^Authentication-Results:")
wl-message-visible-field-list
'("^Message-Id:"
"^User-Agent:"
@ -66,9 +79,18 @@
wl-draft-folder "%[Gmail]/Drafts"
wl-trash-folder "%[Gmail]/Trash"
wl-fcc-force-as-read t
wl-default-spec "%"))
wl-default-spec "%")
(setq wl-message-id-domain wl-local-domain)
(setq wl-message-id-domain wl-local-domain))
;; Use x-face only when compface installed
(when (modulep! +xface)
(autoload 'x-face-decode-message-header "x-face-e21")
(setq wl-highlight-x-face-function 'x-face-decode-message-header))
;; Use alert for alerting
(when (fboundp 'alert)
(setq wl-biff-notify-hook '((lambda () (alert "You have new mail!" :title "Wanderlust")))))
(when (modulep! :editor evil)
;; Neither `wl-folder-mode' nor `wl-summary-mode' are correctly defined as

View file

@ -5,7 +5,13 @@
;; depends on flim, flim on apel), but they all have non-standard default
;; branches which straight cannot detect without our help.
(package! apel :recipe (:branch "apel-wl") :pin "82eb2325bd149dc57b43a9ce9402c6c6183e4052")
(package! flim :recipe (:branch "flim-1_14-wl") :pin "80b8121f05a5a0d7fcfe3e54085467a646dd2028")
(package! semi :recipe (:branch "semi-1_14-wl") :pin "9370961ddcee78e389e44b36d38c3d93f8351619")
(package! flim :recipe (:branch "flim-1_14-wl") :pin "abdd2315006eb31476249223569808adb1c0f7b2")
(package! semi :recipe (:branch "semi-1_14-wl") :pin "9063a4485b148a767ea924f0e7cc78d3524ba256")
(package! wanderlust :pin "8369b2d5170a174652294835dd9a18ed21a38cb2")
(package! wanderlust :pin "9fd2c65e8d690625f35035a71e73f51f740dbe04")
(when (modulep! +xface)
(package! x-face-e21
:recipe (:host nil :repo "https://salsa.debian.org/debian/x-face-el.git"
:files ("debian/x-face-e21.el"))
:pin "871156a776cc1bc9dd035205b6875c55db6ae215"))

View file

@ -1,15 +1,15 @@
;; -*- no-byte-compile: t; -*-
;;; input/chinese/packages.el
(package! pyim :pin "de7eff2a58d88b168e35c3c81484ea874991391c")
(package! fcitx :pin "12dc2638ddd15c8f6cfaecb20e1f428ab2bb5624")
(package! pyim :pin "64067b20ce0e964b1342b378180f24a1d4503797")
(package! fcitx :pin "b399482ed8db5893db2701df01db4c38cccda495")
(package! ace-pinyin :pin "47662c0b05775ba353464b44c0f1a037c85e746e")
(package! pangu-spacing :pin "2303013e5cd7852136f1429162fea0e1c8cb0221")
(when (modulep! +rime)
(package! liberime :pin "8291e22cd0990a99cb2f88ca67a9065a157f39af"))
(package! liberime :pin "cc9eb9812fd6f68e78ed6a0c0a85da7a18765753"))
(when (modulep! +childframe)
(package! posframe :pin "0d23bc5f7cfac00277d83ae7ba52c48685bcbc68"))
(package! posframe :pin "017deece88360c7297265680d78a0bb316470716"))
(when (modulep! :editor evil +everywhere)
(package! evil-pinyin
:recipe (:build (:not autoloads))
:pin "3e9e501ded86f88e01a4edec5d526ab0fab879d7"))
:pin "0fae5ad8761417f027b33230382a50f826ad3bfb"))

View file

@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; input/japanese/packages.el
(package! migemo :pin "f756cba3d5268968da361463c2e29b3a659a3de7")
(package! migemo :pin "7d78901773da3b503e5c0d5fa14a53ad6060c97f")
(package! avy-migemo :pin "922a6dd82c0bfa316b0fbb56a9d4dd4ffa5707e7")
(package! ddskk :pin "c24a624884a3cfb0c28d6d5b9eb19e01387f0917")
(package! ddskk :pin "8c47f46e38a29a0f3eabcd524268d20573102467")
(package! pangu-spacing :pin "2303013e5cd7852136f1429162fea0e1c8cb0221")

View file

@ -6,11 +6,11 @@
:recipe (:host github :repo "agda/agda"
:files ("src/data/emacs-mode/agda-input.el")
:nonrecursive t)
:pin "bb7603d19781e4da2dc702a5a1611fd59e5325f2")
:pin "fbf9d159c3c874b8328ccdc78a0d57d57a310234")
(package! agda2-mode
:recipe (:host github :repo "agda/agda"
:files ("src/data/emacs-mode/*.el"
(:exclude "agda-input.el"))
:nonrecursive t)
:pin "bb7603d19781e4da2dc702a5a1611fd59e5325f2"))
:pin "fbf9d159c3c874b8328ccdc78a0d57d57a310234"))

View file

@ -4,4 +4,4 @@
(package! beancount
:recipe (:host github
:repo "beancount/beancount-mode")
:pin "0f1e33067e5032382f425b5280169f50aa7dd497")
:pin "546163fd2ccc007f28812faf5170eb954d3ca979")

View file

@ -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 :system '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++)
@ -286,7 +286,7 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
;; NOTE : This setting is untested yet
(after! eglot
(when IS-MAC
(when (featurep :system '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"
@ -313,12 +313,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 :system 'macos)
(featurep :system 'linux))
(setq ccls-initialization-options
`(:index (:trackDependency 1
:threads ,(max 1 (/ (doom-system-cpus) 2))))))
(when IS-MAC
(when (featurep :system 'macos)
(setq ccls-initialization-options
(append ccls-initialization-options
`(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"

View file

@ -3,7 +3,7 @@
(package! cmake-mode
:recipe (:host github :repo "emacsmirror/cmake-mode" :files (:defaults "*"))
:pin "f9c7a21254a82a8d44b623bdfded6d21b4ea33ef")
:pin "b08b5d9045308362a623a4f576896d55ffecfd52")
(package! cuda-mode :pin "7f593518fd135fc6af994024bcb47986dfa502d2")
(package! demangle-mode :pin "04f545adab066708d6151f13da65aaf519f8ac4e")
(package! disaster :pin "16bba9afb92aacf06c088c29ba47813b65a80d87")
@ -19,8 +19,8 @@
(if (modulep! +lsp)
(unless (modulep! :tools lsp +eglot)
;; ccls package is necessary only for lsp-mode.
(package! ccls :pin "dd33da8ed74ea3936c1ac969fe1be02879825e86"))
(when (package! irony :pin "870d1576fb279bb93f776a71e65f45283c423a9e")
(package! ccls :pin "9b4a47e0418de8cc2fc93317e27cbdde75286df1"))
(when (package! irony :pin "40e0ce19eb850bdf1f77225f11713cc816250d95")
(package! irony-eldoc :pin "73e79a89fad982a2ba072f2fcc1b4e41f0aa2978")
(when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
@ -28,7 +28,7 @@
(when (modulep! :completion company)
(package! company-irony :pin "b44711dfce445610c1ffaec4951c6ff3882b216a")
(package! company-irony-c-headers :pin "72c386aeb079fb261d9ec02e39211272f76bbd97")))
(when (package! rtags :pin "ee1ab7b9a6c88dc05282d9e3c64c0d380bf53c11")
(when (package! rtags :pin "05117a9a293a729e30013a586c9e3437d9b856c0")
(when (modulep! :completion ivy)
(package! ivy-rtags))
(when (modulep! :completion helm)

View file

@ -10,17 +10,17 @@
;; HACK Forward declare these clj-refactor/cider deps so that their deps are
;; byte-compiled first.
(package! parseclj :pin "74ff7d63fed92a3c859e474ae85f011e794b751a")
(package! parseedn :pin "c8f07926a688bfe995fde4460103915d401a1aff")
(package! parseclj :pin "6af22372e0fe14df882dd300b22b12ba2d7e00b0")
(package! parseedn :pin "3407e4530a367b6c2b857dae261cdbb67a440aaa")
;;; Core packages
(package! clojure-mode :pin "25d713a67d8e0209ee74bfc0153fdf677697b43f")
(package! clj-refactor :pin "0a2a6cbc2e29177f4f55730637a357433a03fa38")
(package! cider :pin "120fd885d37c07137f1c162e8d522ab3eed1ac3f")
(package! clojure-mode :pin "222fdafa2add56a171ded245339a383e5e3078ec")
(package! clj-refactor :pin "fa3efe18e7150df5153a7d05c54e96d59398a0a8")
(package! cider :pin "aa26d62ac59930079e47e652ccd73e8e447defd5")
(when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
(package! flycheck-clj-kondo :pin "ff7bed2315755cfe02ef471edf522e27b78cd5ca"))
(package! flycheck-clj-kondo :pin "9089ade9e01b091139321c78ad75946944ff845d"))
(package! jet :pin "7d5157aac692fc761d8ed7a9f820fa6522136254")
(package! neil
:recipe (:host github :repo "babashka/neil" :files ("*.el"))
:pin "40993873bb4ef6d88af450e8a96d03275e266f6b")
:pin "a1db63d420b85db814207113ca4a0b4b959073cc")

View file

@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; lang/coq/packages.el
(package! proof-general :pin "8416875696cb0c4283e96fe721d343277882ecea")
(package! proof-general :pin "a38857a6a099d0d94184a50093ea6ad331c5c52e")
(package! company-coq :pin "5affe7a96a25df9101f9e44bac8a828d8292c2fa")

View file

@ -1,9 +1,9 @@
;; -*- no-byte-compile: t; -*-
;;; lang/crystal/packages.el
(package! crystal-mode :pin "9bfb9f0f566e937cc6a2f2913d1b56978b81dc99")
(package! crystal-mode :pin "ea89b108fa4222df94ffb99e6e7eaec5d7aa4fea")
(package! inf-crystal :pin "02007b2a2a3bea44902d7c83c4acba1e39d278e3")
(when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
(package! flycheck-crystal :pin "9bfb9f0f566e937cc6a2f2913d1b56978b81dc99")
(package! flycheck-crystal :pin "ea89b108fa4222df94ffb99e6e7eaec5d7aa4fea")
(package! flycheck-ameba :pin "0c4925ae0e998818326adcb47ed27ddf9761c7dc"))

View file

@ -1,12 +1,12 @@
;; -*- no-byte-compile: t; -*-
;;; lang/dart/packages.el
(package! dart-mode :pin "9c846769abd37f7fdc7ba8388d1f3a2b844b75e3")
(package! dart-mode :pin "dffc0209a19fdfac72b861d6adb445c1b6b464f7")
(when (and (modulep! +lsp)
(not (modulep! :tools lsp +eglot)))
(package! lsp-dart :pin "3db9f93c83052d6a8976c92d67d2b24473930760"))
(package! lsp-dart :pin "e7ee6afc2e165291360fd35d16648307920837c7"))
(when (modulep! +flutter)
(package! flutter :pin "edd3f5eb3f4603142f45c5890ee70b0dfb10772b")
(package! flutter :pin "004c91e070a9b4a2a5042f5bb20015ec65453acf")
(package! hover :pin "4ca0638a14a8b304ac2b46e7b342b8d8732ad199"))

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/data/packages.el
(package! csv-mode :pin "d190a479b4f36806b604da527e5d5a50909d3ceb")
(package! csv-mode :pin "81c1a9febd2adf79cfbdf939081ef7bf3a41ffd6")

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/dhall/packages.el
(package! dhall-mode :pin "c77f1c1e75b6d2725019c5275fc102ae98d25628")
(package! dhall-mode :pin "87ab69fe765d87b3bb1604a306a8c44d6887681d")

View file

@ -2,8 +2,8 @@
;;; lang/elixir/packages.el
;; +elixir.el
(package! elixir-mode :pin "7641373f0563cab67cc5459c34534a8176b5e676")
(package! exunit :pin "e0a8c2b81f3d53885ed753b911b3cb6ee9229bec")
(package! elixir-mode :pin "00d6580a040a750e019218f9392cf9a4c2dac23a")
(package! exunit :pin "e008c89e01e5680473278c7e7bab42842e294e4d")
(when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
(package! flycheck-credo :pin "e88f11ead53805c361ec7706e44c3dfee1daa19f"))
(package! flycheck-credo :pin "e285bd042a535d0f13e0b4c5226df404cdda4033"))

View file

@ -469,31 +469,6 @@ library/userland functions"
;;
;;; Advice
;;;###autoload
(defun +emacs-lisp--add-doom-elisp-demos-a (fn symbol)
"Add Doom's own demos to `elisp-demos'.
Intended as :around advice for `elisp-demos--search'."
(let ((org-inhibit-startup t)
enable-dir-local-variables
org-mode-hook)
(or (funcall fn symbol)
(with-file-contents! (doom-path doom-docs-dir "examples.org")
(save-excursion
(when (re-search-forward
(format "^\\*+[ \t]+\\(?:TODO \\)?%s$"
(regexp-quote (symbol-name symbol)))
nil t)
(forward-line 1)
(let ((demos
(string-trim
(buffer-substring-no-properties
(point) (if (re-search-forward "^\\*+ " nil t)
(line-beginning-position)
(point-max))))))
(unless (string-blank-p demos)
demos))))))))
;;;###autoload (put 'map! 'indent-plists-as-data t)
;;;###autoload
(defun +emacs-lisp--calculate-lisp-indent-a (&optional parse-start)

View file

@ -76,10 +76,10 @@ See `+emacs-lisp-non-package-mode' for details.")
face warning
mouse-face mode-line-highlight)))))
;; Fixed indenter that intends plists sensibly.
;; Introduces logic to improve plist indentation in emacs-lisp-mode.
(advice-add #'calculate-lisp-indent :override #'+emacs-lisp--calculate-lisp-indent-a)
;; variable-width indentation is superior in elisp. Otherwise, `dtrt-indent'
;; Variable-width indentation is superior in elisp. Otherwise, `dtrt-indent'
;; and `editorconfig' would force fixed indentation on elisp.
(add-to-list 'doom-detect-indentation-excluded-modes 'emacs-lisp-mode)
@ -96,10 +96,10 @@ See `+emacs-lisp-non-package-mode' for details.")
#'+emacs-lisp-init-straight-maybe-h)
;; UX: Both Flycheck's and Flymake's two emacs-lisp checkers produce a *lot*
;; of false positives in non-packages (like Emacs configs or elisp
;; scripts), so I disable `checkdoc' (`emacs-lisp-checkdoc',
;; `elisp-flymake-checkdoc') and set `byte-compile-warnings' to a subset
;; that makes more sense (see `+emacs-lisp-linter-warnings')
;; of false positives in non-packages (like Emacs configs or elisp scripts),
;; so I disable `checkdoc' (`emacs-lisp-checkdoc', `elisp-flymake-checkdoc')
;; and set `byte-compile-warnings' to a subset that makes more sense (see
;; `+emacs-lisp-linter-warnings')
(add-hook! '(flycheck-mode-hook flymake-mode-hook) #'+emacs-lisp-non-package-mode)
(defadvice! +syntax--fix-elisp-flymake-load-path (orig-fn &rest args)
@ -217,7 +217,26 @@ See `+emacs-lisp-non-package-mode' for details.")
(advice-add #'describe-function-1 :after #'elisp-demos-advice-describe-function-1)
(advice-add #'helpful-update :after #'elisp-demos-advice-helpful-update)
:config
(advice-add #'elisp-demos--search :around #'+emacs-lisp--add-doom-elisp-demos-a))
;; Add Doom's core and module demo files, so additional demos can be specified
;; by end-users (in $DOOMDIR/demos.org), by modules (modules/X/Y/demos.org),
;; or Doom's core (lisp/demos.org).
(dolist (file (doom-module-locate-paths (doom-module-list) "demos.org"))
(add-to-list 'elisp-demos-user-files file))
;; HACK: These functions open Org files non-interactively without any
;; performance optimizations. Given how prone org-mode is to being tied to
;; expensive functionality, this will often introduce unexpected freezes
;; without this advice.
;; TODO: PR upstream?
(defadvice! +emacs-lisp--optimize-org-init-a (fn &rest args)
"Disable unrelated functionality to optimize calls to `org-mode'."
:around #'elisp-demos--export-json-file
:around #'elisp-demos--symbols
:around #'elisp-demos--syntax-highlight
(let ((org-inhibit-startup t)
enable-dir-local-variables
org-mode-hook)
(apply fn args))))
(use-package! buttercup

View file

@ -14,7 +14,7 @@
(when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
(package! flycheck-package :pin "75efa098cf17dc14c363e2ca9b68afdac7766b5b")
(package! flycheck-cask :pin "4b2ede6362ded4a45678dfbef1876faa42edbd58"))
(package! flycheck-cask :pin "0eeec5197e9d31bfcfc39380b262d65259a87d91"))
;; Libraries
(package! buttercup :pin "24d43b2ce262faf59e5ff9f72466efb293aa6154")

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/erlang/packages.el
(package! erlang :pin "be7109f43beeeea199ae74a42393927d013f75d9")
(package! erlang :pin "0ca7e064f5a948d68db12b5d9f9cfa2faf0f0ea3")

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/factor/packages.el
(package! fuel :pin "76ac65649d61975899070cf043447a995bf76c97")
(package! fuel :pin "23fcfc70753abbbdc0e86af06330d63da6e4ea64")

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/fstar/packages.el
(package! fstar-mode :pin "ab0697b9474f36942a12a4b2a75251c247c18e9e")
(package! fstar-mode :pin "7d353de89248f1df6edd1f5672ab4d39f5d1353d")

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/gdscript/packages.el
(package! gdscript-mode :pin "d392e8aa7e7c6dd79ce52fb55d78f7acfa443194")
(package! gdscript-mode :pin "8a28276daaa23f10e986367b80dc751c5d26829e")

View file

@ -2,15 +2,15 @@
;;; lang/go/packages.el
(package! go-eldoc :pin "cbbd2ea1e94a36004432a9ac61414cb5a95a39bd")
(package! go-guru :pin "166dfb1e090233c4609a50c2ec9f57f113c1da72")
(package! go-mode :pin "166dfb1e090233c4609a50c2ec9f57f113c1da72")
(package! go-guru :pin "8dce1e3ba1cdc34a856ad53c8421413cfe33660e")
(package! go-mode :pin "8dce1e3ba1cdc34a856ad53c8421413cfe33660e")
(package! gorepl-mode :pin "6a73bf352e8d893f89cad36c958c4db2b5e35e07")
(package! go-tag :pin "33f2059551d5298ca228d90f525b99d1a8d70364")
(package! go-gen-test :pin "f84f4177af7fcbe10ce2116d5417ad5f0485034b")
(package! go-gen-test :pin "af00a9abbaba2068502327ecdef574fd894a884b")
(when (modulep! :completion company)
(package! company-go :pin "31948b463f2fc18f8801e5a8fe511fef300eb3dd"))
(when (and (modulep! :checkers syntax)
(not (modulep! :checkers syntax +flymake)))
(package! flycheck-golangci-lint :pin "8e446c68311048f0b87febf8ef0379e29d358851"))
(package! flycheck-golangci-lint :pin "9def093e416e9a6ddd3cae8590dbb7ff6314925a"))

View file

@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/graphql/packages.el
(package! graphql-mode :pin "1437b790060f6ce4a8dc57df2023443645b899e5")
(package! graphql-mode :pin "49a391b5290e3354b07f7b77ded97a154c084f46")
(package! graphql-doc :pin "d37140267e0c426c7c18aff31900aa1650257394")
(unless (modulep! +lsp)
(package! company-graphql

View file

@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/haskell/packages.el
(package! haskell-mode :pin "79eaf444a72109f93f552abb53f834cc63bbf9f2")
(package! haskell-mode :pin "43b4036bf02b02de75643a1a2a31e28efac1c50b")
(when (and (modulep! +lsp)
(not (modulep! :tools lsp +eglot)))

View file

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/idris/packages.el
(package! idris-mode :pin "c96f45d1b8fad193f09fb6139da17092003b5e74")
(package! idris-mode :pin "37c6b819903191acd85c56ef6f7ccf579b57eea4")

View file

@ -14,4 +14,4 @@
(when (modulep! +lsp)
(unless (modulep! :tools lsp +eglot)
(package! lsp-java :pin "449673da7221a30f1b1756cedcc48b9a2b52a51e")))
(package! lsp-java :pin "c962a3b3ac2beabdf1ce83b815396d6c38e3cefa")))

View file

@ -14,6 +14,6 @@
(package! skewer-mode :pin "e5bed351939c92a1f788f78398583c2f83f1bb3c")
;; Programming environment
(package! tide :pin "29475d9eee26f4101322209e9b6b199df5386094")
(package! tide :pin "b38dfc3f8fb754e64e48e76fc92d472cb3d1a3dc")
(when (modulep! :tools lookup)
(package! xref-js2 :pin "fd6b723e7f1f9793d189a815e1904364dc026b03"))

View file

@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/json/packages.el
(package! json-mode :pin "eedb4560034f795a7950fa07016bd4347c368873")
(package! json-mode :pin "bfd1557aaa20b7518b808fdc869f094b52205234")
(package! json-snatcher :pin "b28d1c0670636da6db508d03872d96ffddbc10f2")
(when (modulep! :completion ivy)
(package! counsel-jq :pin "8cadd2e96470402ede4881b4e955872976443689"))

View file

@ -2,12 +2,12 @@
;;; lang/julia/packages.el
(package! julia-mode :pin "7a8c868e0d3e51ba4a2c621ee22ca9599e0e4bbb")
(package! julia-repl :pin "9503ef7110732e444e686e815c5b2ae8228d274d")
(package! julia-repl :pin "4947319bc948b3f80d61b0d65a719737275949b8")
(when (modulep! +lsp)
(if (modulep! :tools lsp +eglot)
(package! eglot-jl :pin "7dc604fe42a459a987853d065cd6d0f3c4cbc02a")
(package! lsp-julia :pin "c584f79c7fee6176bbb6120f4cb0f1001bcf8113")))
(package! lsp-julia :pin "c869b2f6c05a97e5495ed3cc6710a33b4faf41a2")))
(when (modulep! +snail)
(package! julia-snail :pin "18b891b4569096d541e996cf7e24da01efdf2e03"))
(package! julia-snail :pin "d36653bb938050cfabbe3c1ea6d4575071085577"))

View file

@ -9,7 +9,7 @@
(`skim
(when-let
(app-path
(and IS-MAC
(and (featurep :system 'macos)
(file-exists-p! (or "/Applications/Skim.app"
"~/Applications/Skim.app"))))
(add-to-list 'TeX-view-program-selection '(output-pdf "Skim"))
@ -18,7 +18,7 @@
app-path)))))
(`sumatrapdf
(when (and IS-WINDOWS
(when (and (featurep :system 'windows)
(executable-find "SumatraPDF"))
(add-to-list 'TeX-view-program-selection '(output-pdf "SumatraPDF"))))
@ -40,7 +40,7 @@
(`pdf-tools
(when (modulep! :tools pdf)
(add-to-list 'TeX-view-program-selection '(output-pdf "PDF Tools"))
(when IS-MAC
(when (featurep :system 'macos)
;; PDF Tools isn't in `TeX-view-program-list-builtin' on macs.
(add-to-list 'TeX-view-program-list '("PDF Tools" TeX-pdf-tools-sync-view)))
;; Update PDF buffers after successful LaTeX runs.

View file

@ -4,11 +4,11 @@
(package! auctex
:recipe (:files ("*.el" "*.info" "dir"
"doc" "etc" "images" "latex" "style"))
:pin "3929d5408b1e0d68cadeef7536a26ce29b1d36ea")
(package! adaptive-wrap :pin "0d5b4a07de76d87dd64333a566a8a0a845f2b9f0")
:pin "86b2397abdc20a638e5751251026727bc6282022")
(package! adaptive-wrap :pin "70005d2012ab57c20be03c05aebd49318fe49c99")
(package! latex-preview-pane :pin "5297668a89996b50b2b62f99cba01cc544dbed2e")
(when (modulep! :editor evil +everywhere)
(package! evil-tex :pin "3e0a26b91a1a56b0f35cbd450d01431057551750"))
(package! evil-tex :pin "2a3177c818f106e6c11032ac261f8691f5e11f74"))
;; Optional module features.
@ -16,7 +16,7 @@
(package! auctex-latexmk :pin "b00a95e6b34c94987fda5a57c20cfe2f064b1c7a"))
(when (modulep! +cdlatex)
(package! cdlatex :pin "ac024ce29318cab812a743ad132a531c855c27a5"))
(package! cdlatex :pin "33770dec73138909714711b05a63e79da5a19ccd"))
;; Features according to other user selected options.

View file

@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/ledger/packages.el
(package! ledger-mode :pin "4b32f701736b37f99048be79583b0bde7cc14c85")
(package! ledger-mode :pin "11e748d4838d51772f531a75849349ed8cd939ed")
(when (modulep! :editor evil)
(package! evil-ledger :pin "7a9f9f5d39c42fffdba8004f8982642351f2b233"))

View file

@ -5,7 +5,7 @@
(format "%s %s"
(if (executable-find "love")
"love"
(if IS-MAC "open -a love.app"))
(if (featurep :system 'macos) "open -a love.app"))
(shell-quote-argument root))))
;;;###autoload

View file

@ -34,9 +34,9 @@ lua-language-server.")
;; is a function is to dynamically change when/if `+lua-lsp-dir' does
(list (or (executable-find "lua-language-server")
(doom-path +lua-lsp-dir
(cond (IS-MAC "bin/macOS")
(IS-LINUX "bin/Linux")
(IS-WINDOWS "bin/Windows"))
(cond ((featurep :system 'macos) "bin/macOS")
((featurep :system 'linux) "bin/Linux")
((featurep :system 'windows) "bin/Windows"))
"lua-language-server"))
"-E" "-e" "LANG=en"
(doom-path +lua-lsp-dir "main.lua")))

View file

@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/lua/packages.el
(package! lua-mode :pin "7eb8eaa420c25477c830623b830fd18dc350cdfb")
(package! lua-mode :pin "d074e4134b1beae9ed4c9b512af741ca0d852ba3")
(when (modulep! +moonscript)
(package! moonscript :pin "56f90471e2ced2b0a177aed4d8c2f854797e9cc7")
@ -12,7 +12,7 @@
:pin "fcb99e5efcf31db05f236f02eaa575986a57172d")))
(when (modulep! +fennel)
(package! fennel-mode :pin "8f721285e12382b72c2f7a769d21fd332461eb2a"))
(package! fennel-mode :pin "5965c8fc693a49e65237a087e693690cf8c9fcb3"))
(when (modulep! :completion company)
(package! company-lua :pin "29f6819de4d691e5fd0b62893a9f4fbc1c6fcb52"))

View file

@ -32,8 +32,8 @@ capture, the end position, and the output buffer.")
;; This is set to `nil' by default, which causes a wrong-type-arg error
;; when you use `markdown-open'. These are more sensible defaults.
markdown-open-command
(cond (IS-MAC "open")
(IS-LINUX "xdg-open"))
(cond ((featurep :system 'macos) "open")
((featurep :system 'linux) "xdg-open"))
;; A sensible and simple default preamble for markdown exports that
;; takes after the github asthetic (plus highlightjs syntax coloring).

View file

@ -1,12 +1,12 @@
;; -*- no-byte-compile: t; -*-
;;; lang/markdown/packages.el
(package! markdown-mode :pin "b1a862f0165b7bafe0f874738a55be1b1720dd7d")
(package! markdown-mode :pin "e096bb97a91fcd4dc2b46d8b6e093194b03b7364")
(package! markdown-toc :pin "3d724e518a897343b5ede0b976d6fb46c46bcc01")
(package! edit-indirect :pin "f80f63822ffae78de38dbe72cacaeb1aaa96c732")
(package! edit-indirect :pin "82a28d8a85277cfe453af464603ea330eae41c05")
(when (modulep! +grip)
(package! grip-mode :pin "5809fb62f6dd7b4bfa7685203aaa1474fca70f4e"))
(package! grip-mode :pin "e145adb22593a88249d964f77174207bcf755493"))
(when (modulep! :editor evil +everywhere)
(package! evil-markdown

View file

@ -14,7 +14,7 @@ nimsuggest isn't installed."
(set-formatter! 'nmfmt '("nimfmt" filepath) :modes '(nim-mode))
(when IS-WINDOWS
(when (featurep :system 'windows)
;; TODO File PR/report upstream (https://github.com/nim-lang/nim-mode)
(defadvice! +nim--suggest-get-temp-file-name-a (path)
"Removes invalid characters from the temp file path, including the unicode

Some files were not shown because too many files have changed in this diff Show more