diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py
index 73c4ed2..653e9be 100755
--- a/.config/qutebrowser/config.py
+++ b/.config/qutebrowser/config.py
@@ -186,6 +186,10 @@ c.downloads.location.directory = '/home/dt/Downloads'
# - switching: Show the tab bar when switching tabs.
c.tabs.show = 'always'
+# Setting default page for when opening new tabs or new windows with
+# commands like :open -t and :open -w .
+c.url.default_page = 'file:///home/dt/.surf/html/homepage.html'
+
# Search engines which can be used via the address bar. Maps a search
# engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}`
# placeholder. The placeholder will be replaced by the search term, use
@@ -364,6 +368,10 @@ c.fonts.prompts = 'default_size sans-serif'
# Type: Font
c.fonts.statusbar = '11pt "SauceCodePro Nerd Font"'
+# Bindings to use dmenu rather than qutebrowser's builtin search.
+#config.bind('o', 'spawn --userscript dmenu-open')
+#config.bind('O', 'spawn --userscript dmenu-open --tab')
+
# Bindings for normal mode
config.bind('M', 'hint links spawn mpv {hint-url}')
config.bind('Z', 'hint links spawn st -e youtube-dl {hint-url}')
diff --git a/.doom.d/config.el b/.doom.d/config.el
index d3f4af6..6c5a107 100644
--- a/.doom.d/config.el
+++ b/.doom.d/config.el
@@ -205,19 +205,19 @@
(map! :leader
:desc "Edit agenda file"
- "/ a" #'(lambda () (interactive) (find-file "~/Org/agenda.org"))
+ "- a" #'(lambda () (interactive) (find-file "~/Org/agenda.org"))
:leader
:desc "Edit doom config.org"
- "/ c" #'(lambda () (interactive) (find-file "~/.doom.d/config.org"))
+ "- c" #'(lambda () (interactive) (find-file "~/.doom.d/config.org"))
:leader
:desc "Edit eshell aliases"
- "/ e" #'(lambda () (interactive) (find-file "~/.doom.d/aliases"))
+ "- e" #'(lambda () (interactive) (find-file "~/.doom.d/aliases"))
:leader
:desc "Edit doom init.el"
- "/ i" #'(lambda () (interactive) (find-file "~/.doom.d/init.el"))
+ "- i" #'(lambda () (interactive) (find-file "~/.doom.d/init.el"))
:leader
:desc "Edit doom packages.el"
- "/ p" #'(lambda () (interactive) (find-file "~/.doom.d/packages.el")))
+ "- p" #'(lambda () (interactive) (find-file "~/.doom.d/packages.el")))
(after! org
(require 'org-bullets) ; Nicer bullets in org-mode
diff --git a/.doom.d/config.org b/.doom.d/config.org
index 08dbdc3..f500247 100644
--- a/.doom.d/config.org
+++ b/.doom.d/config.org
@@ -379,32 +379,32 @@ Neotree is a file tree viewer. When you open neotree, it jumps to the current f
#+END_SRC
* OPEN SPECIFIC FILES
-Keybindings to open files that I work with all the time using the find-file command, which is the interactive file search that opens with 'C-x C-f' in GNU Emacs or 'SPC f f' in Doom Emacs. These keybindings use find-file non-interactively since we specify exactly what file to open. The format I use for these bindings is 'SPC /' plus 'key' since Doom Emacs does not use these keybindings.
+Keybindings to open files that I work with all the time using the find-file command, which is the interactive file search that opens with 'C-x C-f' in GNU Emacs or 'SPC f f' in Doom Emacs. These keybindings use find-file non-interactively since we specify exactly what file to open. The format I use for these bindings is 'SPC -' plus 'key' since Doom Emacs does not use these keybindings.
-| PATH TO FILE | DESCRIPTION | KEYBINDING |
-|------------------------+-------------------------+------------|
-| ~/Org/agenda.org | /Edit agenda file/ | SPC / a |
-| ~/.doom.d/config.org" | /Edit doom config.org/ | SPC / c |
-| ~/.doom.d/aliases" | /Edit eshell aliases/ | SPC / e |
-| ~/.doom.d/init.el" | /Edit doom init.el/ | SPC / i |
-| ~/.doom.d/packages.el" | /Edit doom packages.el/ | SPC / p |
+| PATH TO FILE | DESCRIPTION | KEYBINDING |
+|------------------------+-----------------------+------------|
+| ~/Org/agenda.org | /Edit agenda file/ | SPC - a |
+| ~/.doom.d/config.org" | /Edit doom config.org/ | SPC - c |
+| ~/.doom.d/aliases" | /Edit eshell aliases/ | SPC - e |
+| ~/.doom.d/init.el" | /Edit doom init.el/ | SPC - i |
+| ~/.doom.d/packages.el" | /Edit doom packages.el/ | SPC - p |
#+BEGIN_SRC emacs-lisp
(map! :leader
:desc "Edit agenda file"
- "/ a" #'(lambda () (interactive) (find-file "~/Org/agenda.org"))
+ "- a" #'(lambda () (interactive) (find-file "~/Org/agenda.org"))
:leader
:desc "Edit doom config.org"
- "/ c" #'(lambda () (interactive) (find-file "~/.doom.d/config.org"))
+ "- c" #'(lambda () (interactive) (find-file "~/.doom.d/config.org"))
:leader
:desc "Edit eshell aliases"
- "/ e" #'(lambda () (interactive) (find-file "~/.doom.d/aliases"))
+ "- e" #'(lambda () (interactive) (find-file "~/.doom.d/aliases"))
:leader
:desc "Edit doom init.el"
- "/ i" #'(lambda () (interactive) (find-file "~/.doom.d/init.el"))
+ "- i" #'(lambda () (interactive) (find-file "~/.doom.d/init.el"))
:leader
:desc "Edit doom packages.el"
- "/ p" #'(lambda () (interactive) (find-file "~/.doom.d/packages.el")))
+ "- p" #'(lambda () (interactive) (find-file "~/.doom.d/packages.el")))
#+END_SRC
* ORG MODE
diff --git a/.doom.d/init.el b/.doom.d/init.el
index 2bc6e34..c5780cf 100644
--- a/.doom.d/init.el
+++ b/.doom.d/init.el
@@ -14,36 +14,35 @@
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
-;; Adding path to mu4e
-(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu4e")
-
(doom! :input
;;chinese
;;japanese
+ ;;layout ; auie,ctsrnm is the superior home row
:completion
company ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
- (ivy +fuzzy) ; a search engine for love and life
+ (ivy +fonts) ; a search engine for love and life
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
- ;;doom-quit ; DOOM quit-message prompts when you quit Emacs
+ doom-quit ; DOOM quit-message prompts when you quit Emacs
+ (emoji +unicode) ; 🙂
;;fill-column ; a `fill-column' indicator
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
- indent-guides ; highlighted indent columns
+ ;;indent-guides ; highlighted indent columns
+ ;;ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
- ;;pretty-code ; ligatures or substitute text with pretty symbols
- ;;tabs ; an tab bar for Emacs
+ ;;tabs ; a tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
@@ -59,7 +58,7 @@
;;(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
- ;;multiple-cursors ; editing in many places at once
+ multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
@@ -69,19 +68,19 @@
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
- ;;ibuffer ; interactive buffer management
+ ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
eshell ; the elisp shell that works everywhere
- ;;shell ; simple shell REPL for Emacs
- ;;term ; basic terminal emulator for Emacs
+ shell ; simple shell REPL for Emacs
+ term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
- ;;spell ; tasing you for misspelling mispelling
+ spell ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
:tools
@@ -94,8 +93,7 @@
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
- ;;lsp
- ;;macos ; MacOS-specific commands
+ lsp
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
@@ -107,11 +105,15 @@
;;tmux ; an API for interacting with tmux
;;upload ; map local to remote projects via ssh/ftp
+ :os
+ (:if IS-MAC macos) ; improve compatibility with macOS
+ ;;tty ; improve the terminal Emacs experience
+
:lang
;;agda ; types of types of types of types...
;;cc ; C/C++/Obj-C madness
;;clojure ; java with a lisp
- ;;common-lisp ; if you've seen one lisp, you've seen them all
+ common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
@@ -123,13 +125,13 @@
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;faust ; dsp, but you get to keep your soul
- ;;fsharp ; ML stands for Microsoft's Language
+ ;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
(haskell +dante) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
- ;;idris ;
+ ;;idris ; a language you can depend on
json ; At least it ain't XML
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
@@ -142,10 +144,9 @@
lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
- ;;nix ; I hereby declare "nix geht mehr!"
+ nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
- (org ; organize your plain life in plain text
- +journal)
+ org ; organize your plain life in plain text
php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
@@ -156,9 +157,9 @@
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
- ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
+ rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
- ;;scheme ; a fully conniving family of lisps
+ scheme ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
diff --git a/.emacs.d/core/autoload/config.el b/.emacs.d/core/autoload/config.el
index 1e643cf..00166d5 100644
--- a/.emacs.d/core/autoload/config.el
+++ b/.emacs.d/core/autoload/config.el
@@ -3,10 +3,6 @@
(defvar doom-bin-dir (concat doom-emacs-dir "bin/"))
(defvar doom-bin (concat doom-bin-dir "doom"))
-;;;###autoload
-(defvar doom-reload-hook nil
- "A list of hooks to run when `doom/reload' is called.")
-
;;;###autoload
(defvar doom-reloading-p nil
"TODO")
@@ -76,7 +72,7 @@ This is experimental! It will try to do as `bin/doom sync' does, but from within
this Emacs session. i.e. it reload autoloads files (if necessary), reloads your
package list, and lastly, reloads your private config.el.
-Runs `doom-reload-hook' afterwards."
+Runs `doom-after-reload-hook' afterwards."
(interactive)
(require 'core-cli)
(when (and IS-WINDOWS (file-exists-p doom-env-file))
@@ -86,13 +82,14 @@ Runs `doom-reload-hook' afterwards."
(mapc #'require (cdr doom-incremental-packages))
(doom--if-compile (format "%s sync -e" doom-bin)
(let ((doom-reloading-p t))
+ (run-hook-wrapped 'doom-before-reload-hook #'doom-try-run-hook)
(doom-initialize 'force)
(with-demoted-errors "PRIVATE CONFIG ERROR: %s"
(general-auto-unbind-keys)
(unwind-protect
(doom-initialize-modules 'force)
(general-auto-unbind-keys t)))
- (run-hook-wrapped 'doom-reload-hook #'doom-try-run-hook)
+ (run-hook-wrapped 'doom-after-reload-hook #'doom-try-run-hook)
(message "Config successfully reloaded!"))
(user-error "Failed to reload your config")))
diff --git a/.emacs.d/core/autoload/debug.el b/.emacs.d/core/autoload/debug.el
index cd4c27f..0410e03 100644
--- a/.emacs.d/core/autoload/debug.el
+++ b/.emacs.d/core/autoload/debug.el
@@ -12,7 +12,8 @@
init-file-debug
jka-compr-verbose
url-debug
- use-package-verbose)
+ use-package-verbose
+ (message-log-max . 16384))
"A list of variable to toggle on `doom-debug-mode'.
Each entry can be a variable symbol or a cons cell whose CAR is the variable
@@ -49,8 +50,9 @@ symbol and CDR is the value to set it to when `doom-debug-mode' is activated.")
((if (boundp var)
(set-default var enabled)
(add-to-list 'doom--debug-vars-undefined var)))))
- (when (fboundp 'explain-pause-mode)
- (explain-pause-mode enabled))
+ (when (called-interactively-p 'any)
+ (when (fboundp 'explain-pause-mode)
+ (explain-pause-mode (if enabled +1 -1))))
;; Watch for changes in `doom-debug-variables', or when packages load (and
;; potentially define one of `doom-debug-variables'), in case some of them
;; aren't defined when `doom-debug-mode' is first loaded.
@@ -211,16 +213,12 @@ branch and commit."
;;;###autoload
(defun doom/info (&optional raw)
- "Collects some debug information about your Emacs session, formats it into
-markdown and copies it to your clipboard, ready to be pasted into bug reports!"
+ "Collects some debug information about your Emacs session, formats it and
+copies it to your clipboard, ready to be pasted into bug reports!"
(interactive "P")
- (let ((buffer (get-buffer-create "*doom-info*"))
+ (let ((buffer (get-buffer-create "*doom info*"))
(info (doom-info)))
(with-current-buffer buffer
- (or (not doom-interactive-p)
- (eq major-mode 'markdown-mode)
- (not (fboundp 'markdown-mode))
- (markdown-mode))
(erase-buffer)
(if raw
(progn
@@ -234,7 +232,7 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!"
(let ((sexp (prin1-to-string (sexp-at-point))))
(delete-region beg end)
(insert sexp))))))
- (insert "\n\n```\n")
+ (insert "```\n")
(dolist (group info)
(insert! "%-8s%-10s %s\n"
((upcase (symbol-name (car group)))
@@ -243,12 +241,12 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!"
(dolist (spec (cddr group))
(insert! (indent 8 "%-10s %s\n")
((car spec) (cdr spec)))))
- (insert "```\n "))
+ (insert "```\n"))
(if (not doom-interactive-p)
(print! (buffer-string))
- (switch-to-buffer buffer)
+ (pop-to-buffer buffer)
(kill-new (buffer-string))
- (print! (green "Copied markdown to clipboard"))))))
+ (print! (green "Copied your doom info to clipboard"))))))
;;;###autoload
(defun doom/am-i-secure ()
@@ -316,14 +314,20 @@ Some items are not supported by the `nsm.el' module."
(with-temp-file file
(prin1 `(progn
(setq noninteractive nil
+ user-init-file ,file
process-environment ',doom--initial-process-environment
exec-path ',doom--initial-exec-path
init-file-debug t
+ doom--initial-load-path load-path
load-path ',load-path
package--init-file-ensured t
package-user-dir ,package-user-dir
package-archives ',package-archives
- user-emacs-directory ,doom-emacs-dir)
+ user-emacs-directory ,doom-emacs-dir
+ comp-deferred-compilation nil
+ comp-eln-load-path ',(bound-and-true-p comp-eln-load-path)
+ comp-async-env-modifier-form ',(bound-and-true-p comp-async-env-modifier-form)
+ comp-deferred-compilation-black-list ',(bound-and-true-p comp-deferred-compilation-black-list))
(with-eval-after-load 'undo-tree
;; undo-tree throws errors because `buffer-undo-tree' isn't
;; correctly initialized
@@ -446,6 +450,21 @@ will be automatically appended to the result."
(interactive)
(browse-url "https://github.com/hlissner/doom-emacs/issues/new/choose"))
+;;;###autoload
+(defun doom/copy-buffer-contents (buffer-name)
+ "Copy the contents of BUFFER-NAME to your clipboard."
+ (interactive
+ (list (if current-prefix-arg
+ (completing-read "Select buffer: " (mapcar #'buffer-name (buffer-list)))
+ (buffer-name (current-buffer)))))
+ (let ((buffer (get-buffer buffer-name)))
+ (unless (buffer-live-p buffer)
+ (user-error "Buffer isn't live"))
+ (kill-new
+ (with-current-buffer buffer
+ (substring-no-properties (buffer-string))))
+ (message "Contents of %S were copied to the clipboard" buffer-name)))
+
;;
;;; Profiling
diff --git a/.emacs.d/core/autoload/files.el b/.emacs.d/core/autoload/files.el
index 1fbb99b..3389016 100644
--- a/.emacs.d/core/autoload/files.el
+++ b/.emacs.d/core/autoload/files.el
@@ -245,7 +245,7 @@ If FORCE-P, delete without confirmation."
(user-error "Aborted"))
(let ((buf (current-buffer)))
(unwind-protect
- (progn (delete-file path) t)
+ (progn (delete-file path t) t)
(if (file-exists-p path)
(error "Failed to delete %S" short-path)
;; Ensures that windows displaying this buffer will be switched to
diff --git a/.emacs.d/core/autoload/help.el b/.emacs.d/core/autoload/help.el
index 146db99..a292937 100644
--- a/.emacs.d/core/autoload/help.el
+++ b/.emacs.d/core/autoload/help.el
@@ -662,6 +662,7 @@ Uses the symbol at point or the current selection, if available."
(doom--help-search
(cl-loop for (file . _) in (cl-remove-if-not #'stringp load-history :key #'car)
for filebase = (file-name-sans-extension file)
- if (file-exists-p! (format "%s.el" filebase))
+ if (file-exists-p! (or (format "%s.el.gz" filebase)
+ (format "%s.el" filebase)))
collect it)
query "Search loaded files: "))
diff --git a/.emacs.d/core/autoload/projects.el b/.emacs.d/core/autoload/projects.el
index 8206070..13fc0d7 100644
--- a/.emacs.d/core/autoload/projects.el
+++ b/.emacs.d/core/autoload/projects.el
@@ -98,8 +98,8 @@ If DIR is not a project, it will be indexed (but not cached)."
(error "Directory %S does not exist" dir))
(unless (file-readable-p dir)
(error "Directory %S isn't readable" dir))
- (let* ((default-directory (file-truename (expand-file-name dir)))
- (projectile-project-root (doom-project-root default-directory))
+ (let* ((default-directory (file-truename dir))
+ (projectile-project-root (doom-project-root dir))
(projectile-enable-caching projectile-enable-caching))
(cond ((and projectile-project-root (file-equal-p projectile-project-root default-directory))
(unless (doom-project-p default-directory)
@@ -116,8 +116,8 @@ If DIR is not a project, it will be indexed (but not cached)."
#'projectile-find-file)))
((fboundp 'counsel-file-jump) ; ivy only
(call-interactively #'counsel-file-jump))
- ((project-current)
- (project-find-file-in nil (list default-directory) nil))
+ ((project-current nil dir)
+ (project-find-file-in nil nil dir))
((fboundp 'helm-find-files)
(call-interactively #'helm-find-files))
((call-interactively #'find-file)))))
diff --git a/.emacs.d/core/autoload/ui.el b/.emacs.d/core/autoload/ui.el
index 5c27d7f..1f993d9 100644
--- a/.emacs.d/core/autoload/ui.el
+++ b/.emacs.d/core/autoload/ui.el
@@ -172,7 +172,9 @@ windows (unlike `doom/window-maximize-buffer'). Activate again to undo."
(let* ((window (selected-window))
(dedicated-p (window-dedicated-p window))
(preserved-p (window-parameter window 'window-preserved-size))
- (ignore-window-parameters t))
+ (ignore-window-parameters t)
+ (window-resize-pixelwise nil)
+ (frame-resize-pixelwise nil))
(unwind-protect
(progn
(when dedicated-p
diff --git a/.emacs.d/core/cli/autoloads.el b/.emacs.d/core/cli/autoloads.el
index c471b01..6e7ed77 100644
--- a/.emacs.d/core/cli/autoloads.el
+++ b/.emacs.d/core/cli/autoloads.el
@@ -10,6 +10,7 @@ one wants that.")
(defvar doom-autoloads-cached-vars
'(doom-modules
doom-disabled-packages
+ comp-deferred-compilation-black-list
load-path
auto-mode-alist
interpreter-mode-alist
@@ -34,16 +35,13 @@ one wants that.")
(and (print! (start "Generating autoloads file..."))
(doom-autoloads--write
file
- `((unless (equal emacs-major-version ,emacs-major-version)
- (signal 'doom-error
- (list "The installed version of Emacs has changed since last 'doom sync' ran"
- "Run 'doom sync && doom build' to bring Doom up to speed")))
- (unless (equal doom-version ,doom-version)
+ `((unless (equal doom-version ,doom-version)
(signal 'doom-error
(list "The installed version of Doom has changed since last 'doom sync' ran"
"Run 'doom sync' to bring Doom up to speed"))))
- (mapcar (lambda (var) `(set ',var ',(symbol-value var)))
- doom-autoloads-cached-vars)
+ (cl-loop for var in doom-autoloads-cached-vars
+ when (boundp var)
+ collect `(set ',var ',(symbol-value var)))
(doom-autoloads--scan
(append (cl-loop for dir
in (append (list doom-core-dir)
diff --git a/.emacs.d/core/cli/debug.el b/.emacs.d/core/cli/debug.el
index 1faa695..294abcc 100644
--- a/.emacs.d/core/cli/debug.el
+++ b/.emacs.d/core/cli/debug.el
@@ -15,10 +15,10 @@
(insert (json-encode (doom-info)))
(json-pretty-print-buffer)
(print! (buffer-string))))
- ("--md"
- (doom/info))
- ((or `nil "--lisp")
+ ("--lisp"
(doom/info 'raw))
+ (`nil
+ (doom/info))
(_
(user-error "I don't understand %S. Did you mean --json, --md/--markdown or --lisp?"
format)))
diff --git a/.emacs.d/core/cli/env.el b/.emacs.d/core/cli/env.el
index f8dabde..9467858 100644
--- a/.emacs.d/core/cli/env.el
+++ b/.emacs.d/core/cli/env.el
@@ -128,8 +128,8 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in
(remq nil (append blacklist doom-env-blacklist)))
(if (not (cl-find-if (doom-rpartial #'string-match-p (car (split-string env "=")))
(remq nil (append whitelist doom-env-whitelist))))
- (print! (info "Ignoring %s") env)
- (print! (info "Whitelisted %s") env)
+ (print! (debug "Ignoring %s") env)
+ (print! (debug "Whitelisted %s") env)
(insert env "\0\n"))
(insert env "\0\n")))
(print! (success "Successfully generated %S")
diff --git a/.emacs.d/core/cli/install.el b/.emacs.d/core/cli/install.el
index c764544..ba34d10 100644
--- a/.emacs.d/core/cli/install.el
+++ b/.emacs.d/core/cli/install.el
@@ -28,6 +28,12 @@ DOOMDIR environment variable. e.g.
;; Create `doom-private-dir'
(if noconfig-p
(print! (warn "Not copying private config template, as requested"))
+ ;; Create DOOMDIR in ~/.config/doom if ~/.config/emacs exists.
+ (when (and (not (file-directory-p doom-private-dir))
+ (not (getenv "DOOMDIR")))
+ (let ((xdg-config-dir (or (getenv "XDG_CONFIG_HOME") "~/.config")))
+ (when (file-in-directory-p doom-emacs-dir xdg-config-dir)
+ (setq doom-private-dir (expand-file-name "doom/" xdg-config-dir)))))
(print! (start "Creating %s") (relpath doom-private-dir))
(make-directory doom-private-dir 'parents)
(print-group!
diff --git a/.emacs.d/core/cli/packages.el b/.emacs.d/core/cli/packages.el
index 90debf0..8977ce5 100644
--- a/.emacs.d/core/cli/packages.el
+++ b/.emacs.d/core/cli/packages.el
@@ -61,10 +61,15 @@ list remains lean."
(if full commit (substring commit 0 7)))
(defun doom--commit-log-between (start-ref end-ref)
- (and (straight--call
- "git" "log" "--oneline" "--no-merges"
- "-n" "25" end-ref (concat "^" (regexp-quote start-ref)))
- (straight--process-get-output)))
+ (when-let*
+ ((status (straight--call
+ "git" "log" "--oneline" "--no-merges"
+ "-n" "26" end-ref (concat "^" (regexp-quote start-ref))))
+ (output (string-trim-right (straight--process-get-output)))
+ (lines (split-string output "\n")))
+ (if (> (length lines) 25)
+ (concat (string-join (butlast lines 1) "\n") "\n[...]")
+ output)))
(defun doom--barf-if-incomplete-packages ()
(let ((straight-safe-mode t))
@@ -115,9 +120,34 @@ list remains lean."
(setq straight--recipe-lookup-cache (make-hash-table :test #'eq)
doom--cli-updated-recipes t)))
-(defvar doom--expected-eln-files nil)
+(defvar doom--eln-output-expected nil)
+
+(defvar doom--eln-output-path (car (bound-and-true-p comp-eln-load-path)))
+
+(defun doom--eln-file-name (file)
+ "Return the short .eln file name corresponding to `file'."
+ (concat comp-native-version-dir "/"
+ (file-name-nondirectory
+ (comp-el-to-eln-filename file))))
+
+(defun doom--eln-output-file (eln-name)
+ "Return the expected .eln file corresponding to `eln-name'."
+ (concat doom--eln-output-path eln-name))
+
+(defun doom--eln-error-file (eln-name)
+ "Return the expected .error file corresponding to `eln-name'."
+ (concat doom--eln-output-path eln-name ".error"))
+
+(defun doom--find-eln-file (eln-name)
+ "Find `eln-name' on the `comp-eln-load-path'."
+ (cl-some (lambda (eln-path)
+ (let ((file (concat eln-path eln-name)))
+ (when (file-exists-p file)
+ file)))
+ comp-eln-load-path))
(defun doom--elc-file-outdated-p (file)
+ "Check whether the corresponding .elc for `file' is outdated."
(let ((elc-file (byte-compile-dest-file file)))
;; NOTE Ignore missing elc files, they could be missing due to
;; `no-byte-compile'. Rebuilding unnecessarily is expensive.
@@ -126,17 +156,12 @@ list remains lean."
(doom-log "%s is newer than %s" file elc-file)
t)))
-;; DEPRECATED Remove later
-(defun doom--comp-output-filename (file)
- (if (fboundp 'comp-output-filename)
- (comp-output-filename file)
- (comp-el-to-eln-filename file)))
-
(defun doom--eln-file-outdated-p (file)
- (when-let* ((eln-file (doom--comp-output-filename file))
- (error-file (concat eln-file ".error")))
- (push eln-file doom--expected-eln-files)
- (cond ((file-exists-p eln-file)
+ "Check whether the corresponding .eln for `file' is outdated."
+ (let* ((eln-name (doom--eln-file-name file))
+ (eln-file (doom--find-eln-file eln-name))
+ (error-file (doom--eln-error-file eln-name)))
+ (cond (eln-file
(when (file-newer-than-file-p file eln-file)
(doom-log "%s is newer than %s" file eln-file)
t))
@@ -145,18 +170,20 @@ list remains lean."
(doom-log "%s is newer than %s" file error-file)
t))
(t
- (doom-log "%s doesn't exist" eln-file)
+ (doom-log "%s doesn't exist" eln-name)
t))))
(defun doom--native-compile-done-h (file)
- (when-let* ((file)
- (eln-file (doom--comp-output-filename file))
- (error-file (concat eln-file ".error")))
- (if (file-exists-p eln-file)
- (doom-log "Compiled %s" eln-file)
- (make-directory (file-name-directory error-file) 'parents)
- (write-region "" nil error-file)
- (doom-log "Compiled %s" error-file))))
+ "Callback fired when an item has finished async compilation."
+ (when file
+ (let* ((eln-name (doom--eln-file-name file))
+ (eln-file (doom--eln-output-file eln-name))
+ (error-file (doom--eln-error-file eln-name)))
+ (if (file-exists-p eln-file)
+ (doom-log "Compiled %s" eln-file)
+ (make-directory (file-name-directory error-file) 'parents)
+ (write-region "" nil error-file)
+ (doom-log "Wrote %s" error-file)))))
(defun doom--native-compile-jobs ()
"How many async native compilation jobs are queued or in-progress."
@@ -169,25 +196,39 @@ list remains lean."
(defun doom--wait-for-compile-jobs ()
"Wait for all pending async native compilation jobs."
(cl-loop for pending = (doom--native-compile-jobs)
- for tick = 0 then (% (1+ tick) 15)
with previous = 0
while (not (zerop pending))
- if (and (zerop tick) (/= previous pending)) do
- (print! "- Waiting for %d async jobs..." pending)
+ if (/= previous pending) do
+ (print! (info "\033[KWaiting for %d async jobs...\033[1A" pending))
(setq previous pending)
else do
(let ((inhibit-message t))
- (sleep-for 0.1)))
- ;; HACK Write .error files for any missing files which still don't exist.
- ;; We'll just assume there was some kind of error...
- (cl-loop for eln-file in doom--expected-eln-files
- for error-file = (concat eln-file ".error")
+ (sleep-for 0.1))))
+
+(defun doom--write-missing-eln-errors ()
+ "Write .error files for any expected .eln files that are missing."
+ (cl-loop for file in doom--eln-output-expected
+ for eln-name = (doom--eln-file-name file)
+ for eln-file = (doom--eln-output-file eln-name)
+ for error-file = (doom--eln-error-file eln-name)
unless (or (file-exists-p eln-file)
- (file-exists-p error-file)) do
- (make-directory (file-name-directory error-file) 'parents)
- (write-region "" nil error-file)
- (doom-log "Compiled %s" error-file))
- (setq doom--expected-eln-files nil))
+ (file-newer-than-file-p error-file file))
+ do (make-directory (file-name-directory error-file) 'parents)
+ (write-region "" nil error-file)
+ (doom-log "Wrote %s" error-file))
+ (setq doom--eln-output-expected nil))
+
+(defun doom--compile-site-packages ()
+ "Queue async compilation for all non-doom Elisp files."
+ (when (fboundp 'native-compile-async)
+ (cl-loop with paths = (cl-loop for path in load-path
+ unless (string-prefix-p doom-local-dir path)
+ collect path)
+ for file in (doom-files-in paths :match "\\.el\\(?:\\.gz\\)?$")
+ if (and (file-exists-p (byte-compile-dest-file file))
+ (not (doom--find-eln-file (doom--eln-file-name file)))) do
+ (doom-log "Compiling %s" file)
+ (native-compile-async file nil 'late))))
(defun doom-cli-packages-install ()
@@ -209,7 +250,7 @@ declaration) or dependency thereof that hasn't already been."
(let ((straight-use-package-pre-build-functions
(cons (lambda (pkg &rest _)
(when-let (commit (cdr (assoc pkg pinned)))
- (print! (info "Checked out %s") commit)))
+ (print! (info "Checked out %s: %s") pkg commit)))
straight-use-package-pre-build-functions)))
(straight-use-package (intern package))
;; HACK Line encoding issues can plague repos with dirty
@@ -224,7 +265,9 @@ declaration) or dependency thereof that hasn't already been."
(error
(signal 'doom-package-error (list package e))))))
(progn
+ (doom--compile-site-packages)
(doom--wait-for-compile-jobs)
+ (doom--write-missing-eln-errors)
(print! (success "Installed %d packages") (length built)))
(print! (info "No packages need to be installed"))
nil))))
@@ -267,12 +310,16 @@ declaration) or dependency thereof that hasn't already been."
if (or (if want-byte (doom--elc-file-outdated-p file))
(if want-native (doom--eln-file-outdated-p file)))
do (setq outdated t)
+ (when want-native
+ (push file doom--eln-output-expected))
finally return outdated))
(puthash package t straight--packages-to-rebuild))))
(straight-use-package (intern package))))
(progn
+ (doom--compile-site-packages)
(doom--wait-for-compile-jobs)
- (print! (success "Rebuilt %d package(s)") (length built)))
+ (doom--write-missing-eln-errors)
+ (print! (success "\033[KRebuilt %d package(s)") (length built)))
(print! (success "No packages need rebuilding"))
nil))))
@@ -359,13 +406,12 @@ declaration) or dependency thereof that hasn't already been."
(cl-return)))
(puthash local-repo t repos-to-rebuild)
(puthash package t packages-to-rebuild)
- (unless (string-empty-p output)
- (print! (start "\033[K(%d/%d) Updating %s...") i total local-repo)
- (print-group! (print! "%s" (indent 2 output))))
(print! (success "\033[K(%d/%d) %s updated (%s -> %s)")
i total local-repo
(doom--abbrev-commit ref)
- (doom--abbrev-commit target-ref)))
+ (doom--abbrev-commit target-ref))
+ (unless (string-empty-p output)
+ (print-group! (print! "%s" (indent 2 output)))))
(user-error
(signal 'user-error (error-message-string e)))
(error
@@ -490,9 +536,10 @@ If ELPA-P, include packages installed with package.el (M-x package-install)."
(and (or repos-p regraft-repos-p)
(straight--directory-files (straight--repos-dir) nil nil 'sort))))
(list (when builds-p
- (seq-filter #'file-directory-p
- (seq-remove (doom-rpartial #'gethash straight--profile-cache)
- (straight--directory-files (straight--build-dir) nil nil 'sort))))
+ (let ((default-directory (straight--build-dir)))
+ (seq-filter #'file-directory-p
+ (seq-remove (doom-rpartial #'gethash straight--profile-cache)
+ (straight--directory-files default-directory nil nil 'sort)))))
(when repos-p
(seq-remove (doom-rpartial #'straight--checkhash straight--repo-cache)
rdirs))
diff --git a/.emacs.d/core/cli/upgrade.el b/.emacs.d/core/cli/upgrade.el
index d267684..6c1fd7f 100644
--- a/.emacs.d/core/cli/upgrade.el
+++ b/.emacs.d/core/cli/upgrade.el
@@ -11,8 +11,7 @@ following shell commands:
cd ~/.emacs.d
git pull --rebase
bin/doom clean
- bin/doom sync
- bin/doom update"
+ bin/doom sync -u"
:bare t
(let ((doom-auto-discard force-p))
(cond
@@ -100,13 +99,15 @@ following shell commands:
(cdr (doom-call-process "git" "log" "-1" "--format=%cr" "HEAD"))
(substring new-rev 0 10)
(cdr (doom-call-process "git" "log" "-1" "--format=%cr" target-remote))))
-
- (when (and (not auto-accept-p)
- (y-or-n-p "View the comparison diff in your browser?"))
- (print! (info "Opened github in your browser."))
- (browse-url (format "https://github.com/hlissner/doom-emacs/compare/%s...%s"
- this-rev
- new-rev)))
+ (let ((diff-url
+ (format "https://github.com/hlissner/doom-emacs/compare/%s...%s"
+ this-rev
+ new-rev)))
+ (print! "Link to diff: %s" diff-url)
+ (when (and (not auto-accept-p)
+ (y-or-n-p "View the comparison diff in your browser?"))
+ (print! (info "Opened github in your browser."))
+ (browse-url diff-url)))
(if (not (or auto-accept-p
(y-or-n-p "Proceed with upgrade?")))
diff --git a/.emacs.d/core/core-cli.el b/.emacs.d/core/core-cli.el
index 7587284..12f23ac 100644
--- a/.emacs.d/core/core-cli.el
+++ b/.emacs.d/core/core-cli.el
@@ -441,7 +441,12 @@ everywhere we use it (and internally)."
Includes package management, diagnostics, unit tests, and byte-compilation.
This tool also makes it trivial to launch Emacs out of a different folder or
-with a different private module."
+with a different private module.
+
+Environment variables:
+ EMACSDIR Where to find the Doom Emacs repo (normally ~/.emacs.d)
+ DOOMDIR Where to find your private Doom config (normally ~/.doom.d)
+ DOOMLOCALDIR Where to store local files (normally ~/.emacs.d/.local)"
(condition-case e
(with-output-to! doom-cli-log-file
(catch 'exit
diff --git a/.emacs.d/core/core-editor.el b/.emacs.d/core/core-editor.el
index e036de6..e8e7688 100644
--- a/.emacs.d/core/core-editor.el
+++ b/.emacs.d/core/core-editor.el
@@ -31,30 +31,30 @@ These thresholds are in MB, and is used by `doom--optimize-for-large-files-a'.")
;;
;;; File handling
-(defadvice! doom--optimize-for-large-files-a (orig-fn &rest args)
- "Set `doom-large-file-p' if the file is too large.
+(defadvice! doom--prepare-for-large-files-a (size _ filename &rest _)
+ "Sets `doom-large-file-p' if the file is considered large.
Uses `doom-large-file-size-alist' to determine when a file is too large. When
`doom-large-file-p' is set, other plugins can detect this and reduce their
runtime costs (or disable themselves) to ensure the buffer is as fast as
possible."
- :around #'after-find-file
- (if (setq doom-large-file-p
- (and buffer-file-name
- (not doom-large-file-p)
- (file-exists-p buffer-file-name)
- (ignore-errors
- (> (nth 7 (file-attributes buffer-file-name))
- (* 1024 1024
- (assoc-default buffer-file-name doom-large-file-size-alist
- #'string-match-p))))))
- (prog1 (apply orig-fn args)
- (if (memq major-mode doom-large-file-excluded-modes)
- (setq doom-large-file-p nil)
- (when (fboundp 'so-long-minor-mode) ; in case the user disabled it
- (so-long-minor-mode +1))
- (message "Large file detected! Cutting a few corners to improve performance...")))
- (apply orig-fn args)))
+ :before #'abort-if-file-too-large
+ (and (numberp size)
+ (> size
+ (* 1024 1024
+ (assoc-default filename doom-large-file-size-alist
+ #'string-match-p)))
+ (setq doom-large-file-p size)))
+
+(defadvice! doom--optimize-for-large-files-a (&rest _)
+ "Trigger `so-long-minor-mode' if the file is large."
+ :after #'after-find-file
+ (when (and doom-large-file-p buffer-file-name)
+ (if (memq major-mode doom-large-file-excluded-modes)
+ (setq doom-large-file-p nil)
+ (when (fboundp 'so-long-minor-mode) ; in case the user disabled it
+ (so-long-minor-mode +1))
+ (message "Large file detected! Cutting a few corners to improve performance..."))))
;; Resolve symlinks when opening files, so that any operations are conducted
;; from the file's true directory (like `find-file').
@@ -78,22 +78,35 @@ possible."
(progn (make-directory parent-directory 'parents)
t))))))
-;; Don't autosave files or create lock/history/backup files. We don't want
-;; copies of potentially sensitive material floating around or polluting our
-;; filesystem. We rely on git and our own good fortune instead. Fingers crossed!
-(setq auto-save-default nil
- create-lockfiles nil
+;; Don't generate backups or lockfiles. While auto-save maintains a copy so long
+;; as a buffer is unsaved, backups create copies once, when the file is first
+;; written, and never again until it is killed and reopened. This is better
+;; suited to version control, and I don't want world-readable copies of
+;; potentially sensitive material floating around our filesystem.
+(setq create-lockfiles nil
make-backup-files nil
- ;; But have a place to store them in case we do use them...
- ;; auto-save-list-file-name (concat doom-cache-dir "autosave")
- auto-save-list-file-prefix (concat doom-cache-dir "autosave/")
- auto-save-file-name-transforms `((".*" ,auto-save-list-file-prefix t))
- backup-directory-alist `((".*" . ,(concat doom-cache-dir "backup/"))))
+ ;; But in case the user does enable it, some sensible defaults:
+ version-control t ; number each backup file
+ backup-by-copying t ; instead of renaming current file (clobbers links)
+ delete-old-versions t ; clean up after itself
+ kept-old-versions 5
+ kept-new-versions 5
+ backup-directory-alist (list (cons "." (concat doom-cache-dir "backup/"))))
-(after! tramp
- ;; Backing up files on remotes can be incredibly slow and prone to a variety
- ;; of IO errors. Better to disable it altogether in tramp buffers:
- (add-to-list 'backup-directory-alist (cons tramp-file-name-regexp nil)))
+;; But turn on auto-save, so we have a fallback in case of crashes or lost data.
+;; Use `recover-file' or `recover-session' to recover them.
+(setq auto-save-default t
+ ;; Don't auto-disable auto-save after deleting big chunks. This defeats
+ ;; the purpose of a failsafe. This adds the risk of losing the data we
+ ;; just deleted, but I believe that's VCS's jurisdiction, not ours.
+ auto-save-include-big-deletions t
+ ;; ...but have directories set up in case we use it.
+ auto-save-list-file-prefix (concat doom-cache-dir "autosave/")
+ auto-save-file-name-transforms
+ (list (list "\\`/[^/]*:\\([^/]*/\\)*\\([^/]*\\)\\'"
+ ;; Prefix tramp autosaves to prevent conflicts with local ones
+ (concat auto-save-list-file-prefix "tramp-\\2") t)
+ (list ".*" auto-save-list-file-prefix t)))
(add-hook! 'after-save-hook
(defun doom-guess-mode-h ()
@@ -565,7 +578,13 @@ files, so we replace calls to `pp' with the much faster `prin1'."
(use-package! ws-butler
;; a less intrusive `delete-trailing-whitespaces' on save
- :hook (doom-first-buffer . ws-butler-global-mode))
+ :hook (doom-first-buffer . ws-butler-global-mode)
+ :config
+ ;; ws-butler normally preserves whitespace in the buffer (but strips it from
+ ;; the written file). While sometimes convenient, this behavior is not
+ ;; intuitive. To the average user it looks like whitespace cleanup is failing,
+ ;; which causes folks to redundantly install their own.
+ (setq ws-butler-keep-whitespace-before-point nil))
(provide 'core-editor)
;;; core-editor.el ends here
diff --git a/.emacs.d/core/core-keybinds.el b/.emacs.d/core/core-keybinds.el
index 55f9ae7..bc45975 100644
--- a/.emacs.d/core/core-keybinds.el
+++ b/.emacs.d/core/core-keybinds.el
@@ -26,15 +26,18 @@ and Emacs states, and for non-evil users.")
;;
;;; Keybind settings
-(cond (IS-MAC
- (setq mac-command-modifier 'super
- mac-option-modifier 'meta
- ns-command-modifier 'super
- ns-option-modifier 'meta
- ns-right-option-modifier 'none))
- (IS-WINDOWS
- (setq w32-lwindow-modifier 'super
- w32-rwindow-modifier 'super)))
+(cond
+ (IS-MAC
+ (setq mac-command-modifier 'super
+ ns-command-modifier 'super
+ mac-option-modifier 'meta
+ ns-option-modifier 'meta
+ ;; Free up the right option for character composition
+ mac-right-option-modifier 'none
+ ns-right-option-modifier 'none))
+ (IS-WINDOWS
+ (setq w32-lwindow-modifier 'super
+ w32-rwindow-modifier 'super)))
;;
@@ -184,15 +187,18 @@ localleader prefix."
(use-package! which-key
:hook (doom-first-input . which-key-mode)
:init
- (setq which-key-sort-order #'which-key-prefix-then-key-order
+ (setq which-key-sort-order #'which-key-key-order-alpha
which-key-sort-uppercase-first nil
which-key-add-column-padding 1
which-key-max-display-columns nil
which-key-min-display-lines 6
which-key-side-window-slot -10)
:config
+ (defvar doom--initial-which-key-replacement-alist which-key-replacement-alist)
+ (add-hook! 'doom-before-reload-hook
+ (defun doom-reset-which-key-replacements-h ()
+ (setq which-key-replacement-alist doom--initial-which-key-replacement-alist)))
;; general improvements to which-key readability
- (set-face-attribute 'which-key-local-map-description-face nil :weight 'bold)
(which-key-setup-side-window-bottom)
(setq-hook! 'which-key-init-buffer-hook line-spacing 3)
@@ -309,7 +315,7 @@ For example, :nvi will map to (list 'normal 'visual 'insert). See
(let ((a (plist-get doom--map-parent-state prop))
(b (plist-get doom--map-state prop)))
(if (and a b)
- `(general--concat nil ,a ,b)
+ `(general--concat t ,a ,b)
(or a b))))
(defun doom--map-nested (wrapper rest)
diff --git a/.emacs.d/core/core-lib.el b/.emacs.d/core/core-lib.el
index 1cea6ce..30d152f 100644
--- a/.emacs.d/core/core-lib.el
+++ b/.emacs.d/core/core-lib.el
@@ -492,8 +492,9 @@ advised)."
`(let ((fn (intern (format "%s-h" ,hook-var))))
(fset
fn (lambda (&rest _)
- (run-hook-wrapped ,hook-var #'doom-try-run-hook)
- (set ,hook-var nil)))
+ (when after-init-time
+ (run-hook-wrapped ,hook-var #'doom-try-run-hook)
+ (set ,hook-var nil))))
(put ,hook-var 'permanent-local t)
(dolist (on (list ,@targets))
(if (functionp on)
@@ -671,5 +672,27 @@ set earlier in the ‘setq-local’. The return value of the
(setq pairs (cdr (cdr pairs))))
(macroexp-progn (nreverse expr)))))
+(eval-when! (version< emacs-version "27.1")
+ ;; DEPRECATED Backported from Emacs 27; earlier verisons don't have REMOTE arg
+ (defun executable-find (command &optional remote)
+ "Search for COMMAND in `exec-path' and return the absolute file name.
+Return nil if COMMAND is not found anywhere in `exec-path'. If
+REMOTE is non-nil, search on the remote host indicated by
+`default-directory' instead."
+ (if (and remote (file-remote-p default-directory))
+ (let ((res (locate-file
+ command
+ (mapcar
+ (lambda (x) (concat (file-remote-p default-directory) x))
+ (exec-path))
+ exec-suffixes 'file-executable-p)))
+ (when (stringp res) (file-local-name res)))
+ ;; Use 1 rather than file-executable-p to better match the
+ ;; behavior of call-process.
+ (let ((default-directory
+ (let (file-name-handler-alist)
+ (file-name-quote default-directory))))
+ (locate-file command exec-path exec-suffixes 1)))))
+
(provide 'core-lib)
;;; core-lib.el ends here
diff --git a/.emacs.d/core/core-modules.el b/.emacs.d/core/core-modules.el
index d0e601b..6a1f776 100644
--- a/.emacs.d/core/core-modules.el
+++ b/.emacs.d/core/core-modules.el
@@ -249,8 +249,9 @@ those directories. The first returned path is always `doom-private-dir'."
:type 'dirs
:mindepth 1
:depth 1)))
- (cl-loop for plist being the hash-values of doom-modules
- collect (plist-get plist :path)))
+ (delq
+ nil (cl-loop for plist being the hash-values of doom-modules
+ collect (plist-get plist :path)) ))
nil))
(defun doom-module-mplist-map (fn mplist)
diff --git a/.emacs.d/core/core-packages.el b/.emacs.d/core/core-packages.el
index 0e0b1e9..bd2e916 100644
--- a/.emacs.d/core/core-packages.el
+++ b/.emacs.d/core/core-packages.el
@@ -79,6 +79,10 @@ uses a straight or package.el command directly).")
(setq straight-base-dir doom-local-dir
straight-repository-branch "develop"
+ ;; Since byte-code is rarely compatible across different versions of
+ ;; Emacs, it's best we build them in separate directories, per emacs
+ ;; version.
+ straight-build-dir (format "build-%s" emacs-version)
straight-cache-autoloads nil ; we already do this, and better.
;; Doom doesn't encourage you to modify packages in place. Disabling this
;; makes 'doom sync' instant (once everything set up), which is much nicer
@@ -474,8 +478,9 @@ elsewhere."
(when-let (recipe (plist-get plist :recipe))
(cl-destructuring-bind
(&key local-repo _files _flavor
- _no-build _no-byte-compile _no-native-compile _no-autoloads
- _type _repo _host _branch _remote _nonrecursive _fork _depth)
+ _no-build _build _post-build _no-byte-compile
+ _no-native-compile _no-autoloads _type _repo _host _branch
+ _remote _nonrecursive _fork _depth)
recipe
;; Expand :local-repo from current directory
(when local-repo
diff --git a/.emacs.d/core/core-projects.el b/.emacs.d/core/core-projects.el
index 061b6b9..009539d 100644
--- a/.emacs.d/core/core-projects.el
+++ b/.emacs.d/core/core-projects.el
@@ -166,29 +166,23 @@ And if it's a function, evaluate it."
projectile-indexing-method 'hybrid
projectile-generic-command
(lambda (_)
- (let ((find-exe-fn
- (if EMACS27+
- (doom-rpartial #'executable-find t)
- #'executable-find)))
- ;; If fd exists, use it for git and generic projects. fd is a rust
- ;; program that is significantly faster than git ls-files or find, and
- ;; it respects .gitignore. This is recommended in the projectile docs.
- (cond
- ((when-let
- (bin (if (ignore-errors (file-remote-p default-directory nil t))
- (cl-find-if find-exe-fn (list "fdfind" "fd"))
- doom-projectile-fd-binary))
- (concat (format "%s . -0 -H -E .git --color=never --type file --type symlink --follow"
- bin)
- (if IS-WINDOWS " --path-separator=/"))))
- ;; Otherwise, resort to ripgrep, which is also faster than find
- ((funcall find-exe-fn "rg")
- (concat "rg -0 --files --follow --color=never --hidden"
- (cl-loop for dir in projectile-globally-ignored-directories
- concat " --glob "
- concat (shell-quote-argument (concat "!" dir)))
- (if IS-WINDOWS " --path-separator /")))
- ("find . -type f -print0")))))
+ ;; If fd exists, use it for git and generic projects. fd is a rust
+ ;; program that is significantly faster than git ls-files or find, and
+ ;; it respects .gitignore. This is recommended in the projectile docs.
+ (cond
+ ((when-let
+ (bin (if (ignore-errors (file-remote-p default-directory nil t))
+ (cl-find-if (doom-rpartial #'executable-find t)
+ (list "fdfind" "fd"))
+ doom-projectile-fd-binary))
+ (concat (format "%s . -0 -H --color=never --type file --type symlink --follow"
+ bin)
+ (if IS-WINDOWS " --path-separator=/"))))
+ ;; Otherwise, resort to ripgrep, which is also faster than find
+ ((executable-find "rg" t)
+ (concat "rg -0 --files --follow --color=never --hidden"
+ (if IS-WINDOWS " --path-separator /")))
+ ("find . -type f -print0"))))
(defadvice! doom--projectile-default-generic-command-a (orig-fn &rest args)
"If projectile can't tell what kind of project you're in, it issues an error
diff --git a/.emacs.d/core/core-ui.el b/.emacs.d/core/core-ui.el
index 95cfb64..e178922 100644
--- a/.emacs.d/core/core-ui.el
+++ b/.emacs.d/core/core-ui.el
@@ -9,7 +9,7 @@
(defvar doom-theme nil
"A symbol representing the Emacs theme to load at startup.
-This is changed by `load-theme'.")
+Set to `default' to load no theme at all. This is changed by `load-theme'.")
(defvar doom-font nil
"The default font to use.
@@ -402,11 +402,16 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
;; serve much purpose when the selection is so much more visible.
(defvar doom--hl-line-mode nil)
+ (add-hook! 'hl-line-mode-hook
+ (defun doom-truly-disable-hl-line-h ()
+ (unless hl-line-mode
+ (setq-local doom--hl-line-mode nil))))
+
(add-hook! '(evil-visual-state-entry-hook activate-mark-hook)
(defun doom-disable-hl-line-h ()
(when hl-line-mode
- (setq-local doom--hl-line-mode t)
- (hl-line-mode -1))))
+ (hl-line-mode -1)
+ (setq-local doom--hl-line-mode t))))
(add-hook! '(evil-visual-state-exit-hook deactivate-mark-hook)
(defun doom-enable-hl-line-maybe-h ()
@@ -516,6 +521,12 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
(add-hook! '(prog-mode-hook text-mode-hook conf-mode-hook)
#'display-line-numbers-mode)
+;; Fix #2742: cursor is off by 4 characters in `artist-mode'
+;; REVIEW Reported upstream https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43811
+;; DEPRECATED Fixed in Emacs 28; remove when we drop 27 support
+(unless EMACS28+
+ (add-hook 'artist-mode-hook #'doom-disable-line-numbers-h))
+
;;
;;; Theme & font
@@ -570,7 +581,9 @@ behavior). Do not set this directly, this is let-bound in `doom-init-theme-h'.")
(defun doom-init-theme-h (&optional frame)
"Load the theme specified by `doom-theme' in FRAME."
- (when (and doom-theme (not (memq doom-theme custom-enabled-themes)))
+ (when (and doom-theme
+ (not (eq doom-theme 'default))
+ (not (memq doom-theme custom-enabled-themes)))
(with-selected-frame (or frame (selected-frame))
(let ((doom--prefer-theme-elc t)) ; DEPRECATED in Emacs 27
(load-theme doom-theme t)))))
diff --git a/.emacs.d/core/core.el b/.emacs.d/core/core.el
index 6ac54ac..a5b60aa 100644
--- a/.emacs.d/core/core.el
+++ b/.emacs.d/core/core.el
@@ -1,5 +1,10 @@
;;; core.el --- the heart of the beast -*- lexical-binding: t; -*-
+;; Prevent unwanted runtime builds in gccemacs (native-comp); packages are
+;; compiled ahead-of-time when they are installed and site files are compiled
+;; when gccemacs is installed.
+(setq comp-deferred-compilation nil)
+
(eval-when-compile
(when (< emacs-major-version 26)
(error "Detected Emacs v%s. Doom only supports Emacs 26 and newer"
@@ -34,7 +39,7 @@
;; path/io functions. You get a minor speed up by nooping this. However, this
;; may cause problems on builds of Emacs where its site lisp files aren't
;; byte-compiled and we're forced to load the *.el.gz files (e.g. on Alpine)
-(unless noninteractive
+(unless (or noninteractive (daemonp))
(defvar doom--initial-file-name-handler-alist file-name-handler-alist)
(setq file-name-handler-alist nil)
@@ -96,6 +101,7 @@ envvar will enable this at startup.")
"Root directory for local storage.
Use this as a storage location for this system's installation of Doom Emacs.
+
These files should not be shared across systems. By default, it is used by
`doom-etc-dir' and `doom-cache-dir'. Must end with a slash.")
@@ -127,7 +133,8 @@ Use this for files that change often, like cache files. Must end with a slash.")
Defaults to ~/.config/doom, ~/.doom.d or the value of the DOOMDIR envvar;
whichever is found first. Must end in a slash.")
-(defconst doom-autoloads-file (concat doom-local-dir "autoloads.el")
+(defconst doom-autoloads-file
+ (concat doom-local-dir "autoloads." emacs-version ".el")
"Where `doom-reload-core-autoloads' stores its core autoloads.
This file is responsible for informing Emacs where to find all of Doom's
@@ -154,7 +161,7 @@ users).")
;;; Emacs core configuration
;; lo', longer logs ahoy, so to reliably locate lapses in doom's logic later
-(setq message-log-max 8192)
+(setq message-log-max 4096)
;; Reduce debug output, well, unless we've asked for it.
(setq debug-on-error doom-debug-p
@@ -279,15 +286,10 @@ config.el instead."
(add-to-list 'comp-eln-load-path (concat doom-cache-dir "eln/")))
(after! comp
- ;; HACK `comp-eln-load-path' isn't fully respected yet, because native
- ;; compilation occurs in another emacs process that isn't seeded with our
- ;; value for `comp-eln-load-path', so we inject it ourselves:
- (setq comp-async-env-modifier-form
- `(progn
- ,comp-async-env-modifier-form
- (setq comp-eln-load-path ',(bound-and-true-p comp-eln-load-path))))
;; HACK Disable native-compilation for some troublesome packages
- (add-to-list 'comp-deferred-compilation-black-list "/evil-collection-vterm\\.el\\'"))
+ (dolist (entry (list (concat "\\`" (regexp-quote doom-local-dir) ".*/evil-collection-vterm\\.el\\'")
+ (concat "\\`" (regexp-quote doom-autoloads-file) "'")))
+ (add-to-list 'comp-deferred-compilation-black-list entry)))
;;
@@ -472,6 +474,12 @@ If this is a daemon session, load them all immediately instead."
(defvar doom-first-buffer-hook nil
"Transient hooks run before the first interactively opened buffer.")
+(defvar doom-after-reload-hook nil
+ "A list of hooks to run before `doom/reload' has reloaded Doom.")
+
+(defvar doom-before-reload-hook nil
+ "A list of hooks to run after `doom/reload' has reloaded Doom.")
+
;;
;;; Bootstrap helpers
@@ -565,16 +573,17 @@ to least)."
(with-eval-after-load 'package (require 'core-packages))
(with-eval-after-load 'straight (doom-initialize-packages))
+ ;; Bootstrap our GC manager
+ (add-hook 'doom-first-input-hook #'gcmh-mode)
+
;; Bootstrap the interactive session
- (add-hook! 'window-setup-hook
- (add-hook 'hack-local-variables-hook #'doom-run-local-var-hooks-h)
- (add-hook 'after-change-major-mode-hook #'doom-run-local-var-hooks-maybe-h 'append)
- (add-hook 'doom-first-input-hook #'gcmh-mode)
- (add-hook-trigger! 'doom-first-input-hook 'pre-command-hook)
- (add-hook-trigger! 'doom-first-file-hook 'after-find-file 'dired-initial-position-hook)
- (add-hook-trigger! 'doom-first-buffer-hook 'after-find-file 'doom-switch-buffer-hook))
+ (add-hook 'after-change-major-mode-hook #'doom-run-local-var-hooks-maybe-h)
(add-hook 'emacs-startup-hook #'doom-load-packages-incrementally-h)
- (add-hook 'window-setup-hook #'doom-display-benchmark-h 'append)
+ (add-hook 'hack-local-variables-hook #'doom-run-local-var-hooks-h)
+ (add-hook 'window-setup-hook #'doom-display-benchmark-h)
+ (add-hook-trigger! 'doom-first-buffer-hook 'after-find-file 'doom-switch-buffer-hook)
+ (add-hook-trigger! 'doom-first-file-hook 'after-find-file 'dired-initial-position-hook)
+ (add-hook-trigger! 'doom-first-input-hook 'pre-command-hook)
(if doom-debug-p (doom-debug-mode +1))
;; Load core/core-*.el, the user's private init.el, then their config.el
diff --git a/.emacs.d/core/packages.el b/.emacs.d/core/packages.el
index 55f99d2..dd48762 100644
--- a/.emacs.d/core/packages.el
+++ b/.emacs.d/core/packages.el
@@ -3,7 +3,7 @@
;; core.el
(package! auto-minor-mode :pin "17cfa1b54800fdef2975c0c0531dad34846a5065")
-(package! gcmh :pin "b1bde5089169a74f62033d027e06e98cbeedd43f")
+(package! gcmh :pin "84c43a4c0b41a595ac6e299fa317d2831813e580")
(package! explain-pause-mode
:recipe (:host github
:repo "lastquestion/explain-pause-mode")
@@ -16,9 +16,8 @@
:repo "raxod502/straight.el"
:branch ,straight-repository-branch
:local-repo "straight.el"
- :files ("straight*.el")
- :no-build t)
- :pin "0c7c7571349b628d87acde474a754f05e86ca876")
+ :files ("straight*.el"))
+ :pin "728ea18ea590fcd8fb48f5bed30e135942d97221")
;; core-modules.el
(package! use-package
@@ -26,18 +25,18 @@
:pin "4fb1f9a68f1e7e7d614652afc017a6652fd029f1")
;; core-ui.el
-(package! all-the-icons :pin "8c0228053dd6693d926970d89270094be52b0f75")
+(package! all-the-icons :pin "6917b08f64dd8487e23769433d6cb9ba11f4152f")
(package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea")
(package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307")
-(package! rainbow-delimiters :pin "5125f4e47604ad36c3eb4706310fcafac729ca8c")
+(package! rainbow-delimiters :pin "f43d48a24602be3ec899345a3326ed0247b960c6")
(package! restart-emacs :pin "9aa90d3df9e08bc420e1c9845ee3ff568e911bd9")
;; core-editor.el
-(package! better-jumper :pin "6d240032ca213ccb3347e25f26c29b6822bf03a7")
+(package! better-jumper :pin "fe548d22c9228b60d9c8a2a452a6c2e03dfdf238")
(package! dtrt-indent :pin "50c440c80e0d15303d8ab543bce4c56e9c2bf407")
-(package! helpful :pin "c0662aa07266fe204f4e6d72ccaa6af089400556")
+(package! helpful :pin "1671e1dd08ca9543bf80e878135c6bbba84efe05")
(package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d")
-(package! smartparens :pin "555626a43f9bb1985aa9a0eb675f2b88b29702c8")
+(package! smartparens :pin "c59bfef7e8f1687ac77b0afaaaed86d8051d3de1")
(package! so-long
:built-in 'prefer ; included in Emacs 27+
;; REVIEW so-long is slated to be published to ELPA eventually, but until then
@@ -52,8 +51,8 @@
:pin "2bb49d3ee7d2cba133bc7e9cdac416cd1c5e4fe0")
;; core-projects.el
-(package! projectile :pin "46d2010c6a6cccfc4be72317f10ea99fd041ab54")
+(package! projectile :pin "3670ebea092c7bae4973f5bcecf5ac3588a0ac60")
;; core-keybinds.el
(package! general :pin "a0b17d207badf462311b2eef7c065b884462cb7c")
-(package! which-key :pin "e48e190a75a0c176e1deac218b891e77792d6921")
+(package! which-key :pin "ae59b7edb0d82aa0251803fdfbde6b865083c8b8")
diff --git a/.emacs.d/docs/faq.org b/.emacs.d/docs/faq.org
index c6db28c..c524200 100644
--- a/.emacs.d/docs/faq.org
+++ b/.emacs.d/docs/faq.org
@@ -104,7 +104,7 @@ It does, /but/ there are caveats:
pioneers, willing to test Doom on Windows.
That said, Doom does have happy Windows users (using WSL or scoop/chocolatey).
-The [[file:getting_started.org::On Windows][Getting Starting guide]] will walk you through what we know.
+[[file:getting_started.org::On Windows][The Getting Starting guide]] will walk you through what we know.
Help us improve our documentation if you managed to get Doom running on Windows!
@@ -340,8 +340,9 @@ Emacs consults this variable every time a file is read or library loaded, or
when certain functions in the file API are used (like ~expand-file-name~ or
~file-truename~).
-Emacs does to check if a special handler is needed to read that file, but none
-of them are (typically) necessary at startup, so we disable them (temporarily!):
+Emacs does this to check if a special handler is needed to read that file, but
+none of them are (typically) necessary at startup, so we disable them
+(temporarily!):
#+BEGIN_SRC emacs-lisp
(defvar doom--file-name-handler-alist file-name-handler-alist)
@@ -527,7 +528,7 @@ This directory is referred to as your ~$DOOMDIR~.
Your private config is typically comprised of an =init.el=, =config.el= and
=packages.el= file. Put all your config in =config.el=, install packages by
adding ~package!~ declarations to =packages.el=, and enable/disable modules in
-you ~doom!~ block, which should have been created in your =init.el= when you
+your ~doom!~ block, which should have been created in your =init.el= when you
first ran ~doom install~.
You shouldn't need to fork Doom or modify =~/.emacs.d=. If you have to do this
diff --git a/.emacs.d/docs/getting_started.org b/.emacs.d/docs/getting_started.org
index 7b513ec..4aa943c 100644
--- a/.emacs.d/docs/getting_started.org
+++ b/.emacs.d/docs/getting_started.org
@@ -311,13 +311,13 @@ process.
Before moving on to installing Emacs et co, a few steps to prepare Windows for
Emacs are necessary:
-1. *Create a ~HOME~ [[https://mywindowshub.com/how-to-edit-system-environment-variables-for-a-user-in-windows-10/][system environment variable]].*
+1. Create a ~HOME~ [[https://mywindowshub.com/how-to-edit-system-environment-variables-for-a-user-in-windows-10/][system environment variable]].
Set it to =C:\Users\USERNAME\=, otherwise Emacs will treat
=C:\Users\USERNAME\AppData\Roaming= as your ~HOME~, which will cause issues
later.
-2. *Add =C:\Users\USERNAME\.emacs.d\bin= to your ~PATH~.*
+2. Add =C:\Users\USERNAME\.emacs.d\bin= to your ~PATH~.
This way, you don't have to type all of =C:\Users\USERNAME\.emacs.d\bin\doom=
every time you need to run this script (and you'll need to, often).
@@ -1068,8 +1068,7 @@ Of course, an empty module isn't terribly useful, but it goes to show that nothi
loaded when they are used.
These are a few exceptional examples of a well-rounded module:
-
-+ [[file:/mnt/projects/conf/doom-emacs/modules/completion/company/README.org][:completion company]]
++ [[file:../modules/completion/company/README.org][:completion company]]
The remainder of this guide will go over the technical details of a Doom module.
diff --git a/.emacs.d/early-init.el b/.emacs.d/early-init.el
index 91c64e5..a7ee4cc 100644
--- a/.emacs.d/early-init.el
+++ b/.emacs.d/early-init.el
@@ -10,7 +10,7 @@
;; loaded, but after `early-init-file'. Doom handles package initialization, so
;; we must prevent Emacs from doing it early!
(setq package-enable-at-startup nil)
-(advice-add #'package--ensure-init-file :override #'ignore)
+(fset #'package--ensure-init-file #'ignore)
;; Prevent the glimpse of un-styled Emacs by disabling these UI elements early.
(push '(menu-bar-lines . 0) default-frame-alist)
@@ -22,11 +22,7 @@
;; larger than the system default.
(setq frame-inhibit-implied-resize t)
-;; Ignore X resources; its settings would be redundant with the other settings
-;; in this file and can conflict with later config (particularly where the
-;; cursor color is concerned).
-(advice-add #'x-apply-session-resources :override #'ignore)
-
-;; Prevent unwanted runtime builds; packages are compiled ahead-of-time when
-;; they are installed and site files are compiled when gccemacs is installed.
+;; Prevent unwanted runtime builds in gccemacs (native-comp); packages are
+;; compiled ahead-of-time when they are installed and site files are compiled
+;; when gccemacs is installed.
(setq comp-deferred-compilation nil)
diff --git a/.emacs.d/init.example.el b/.emacs.d/init.example.el
index 2691851..9b84000 100644
--- a/.emacs.d/init.example.el
+++ b/.emacs.d/init.example.el
@@ -30,6 +30,7 @@
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
+ ;;(emoji +unicode) ; 🙂
;;fill-column ; a `fill-column' indicator
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
@@ -130,7 +131,7 @@
;;(go +lsp) ; the hipster dialect
;;(haskell +dante) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
- ;;idris ;
+ ;;idris ; a language you can depend on
;;json ; At least it ain't XML
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
diff --git a/.emacs.d/modules/app/calendar/autoload.el b/.emacs.d/modules/app/calendar/autoload.el
index 7a6a1b7..40e239e 100644
--- a/.emacs.d/modules/app/calendar/autoload.el
+++ b/.emacs.d/modules/app/calendar/autoload.el
@@ -31,7 +31,8 @@
(if (featurep! :ui workspaces)
(+workspace/delete "Calendar")
(doom-kill-matching-buffers "^\\*cfw:")
- (set-window-configuration +calendar--wconf)
+ (when (window-configuration-p +calendar--wconf)
+ (set-window-configuration +calendar--wconf))
(setq +calendar--wconf nil)))
;;;###autoload
diff --git a/.emacs.d/modules/app/irc/config.el b/.emacs.d/modules/app/irc/config.el
index 30b5c1e..6730d59 100644
--- a/.emacs.d/modules/app/irc/config.el
+++ b/.emacs.d/modules/app/irc/config.el
@@ -173,12 +173,13 @@ playback.")
(use-package! circe-notifications
:commands enable-circe-notifications
:init
- (if +irc-defer-notifications
- (add-hook! 'circe-server-connected-hook
- (setq +irc--defer-timer
- (run-at-time +irc-defer-notifications nil
- #'enable-circe-notifications)))
- (add-hook 'circe-server-connected-hook #'enable-circe-notifications))
+ (add-hook! 'circe-server-connected-hook
+ (defun +irc-init-circe-notifications-h ()
+ (if (numberp +irc-defer-notifications)
+ (setq +irc--defer-timer
+ (run-at-time +irc-defer-notifications nil
+ #'enable-circe-notifications))
+ (enable-circe-notifications))))
:config
(setq circe-notifications-watch-strings +irc-notifications-watch-strings
circe-notifications-emacs-focused nil
diff --git a/.emacs.d/modules/app/irc/packages.el b/.emacs.d/modules/app/irc/packages.el
index 1f1fc67..29e3ca2 100644
--- a/.emacs.d/modules/app/irc/packages.el
+++ b/.emacs.d/modules/app/irc/packages.el
@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; app/irc/packages.el
-(package! circe :pin "89aac22259e5d09ae1183e0df163338fe491e9e7")
+(package! circe :pin "d98986ce933c380b47d727beea8bad81bda65dc9")
(package! circe-notifications :pin "291149ac12877bbd062da993479d3533a26862b0")
diff --git a/.emacs.d/modules/app/rss/packages.el b/.emacs.d/modules/app/rss/packages.el
index 27ef2cf..86b6fca 100644
--- a/.emacs.d/modules/app/rss/packages.el
+++ b/.emacs.d/modules/app/rss/packages.el
@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; app/rss/packages.el
-(package! elfeed :pin "8fb09ad75f2ff7d6f7d8b8d1ac65b9be873cc31d")
+(package! elfeed :pin "7b2b6fadaa498fef2ba212a50da4a8afa2a5d305")
(package! elfeed-org :pin "77b6bbf222487809813de260447d31c4c59902c9")
diff --git a/.emacs.d/modules/completion/company/config.el b/.emacs.d/modules/completion/company/config.el
index 69f942c..109b986 100644
--- a/.emacs.d/modules/completion/company/config.el
+++ b/.emacs.d/modules/completion/company/config.el
@@ -4,8 +4,7 @@
:commands company-complete-common company-manual-begin company-grab-line
:hook (doom-first-input . global-company-mode)
:init
- (setq company-idle-delay 0.25
- company-minimum-prefix-length 2
+ (setq company-minimum-prefix-length 2
company-tooltip-limit 14
company-tooltip-align-annotations t
company-require-match 'never
@@ -53,20 +52,21 @@
:before #'company-begin-backend
(company-abort)))
- (add-hook 'after-change-major-mode-hook #'+company-init-backends-h 'append))
+ (add-hook 'after-change-major-mode-hook #'+company-init-backends-h 'append)
+ (when (featurep! +tng)
+ (company-tng-mode +1))
-(use-package! company-tng
- :when (featurep! +tng)
- :after-call post-self-insert-hook
- :config
- (add-to-list 'company-frontends 'company-tng-frontend)
- (define-key! company-active-map
- "RET" nil
- [return] nil
- "TAB" #'company-select-next
- [tab] #'company-select-next
- [backtab] #'company-select-previous))
+ ;; NOTE Fix #1335: ensure `company-emulation-alist' is the first item of
+ ;; `emulation-mode-map-alists', thus higher priority than keymaps of
+ ;; evil-mode. We raise the priority of company-mode keymaps
+ ;; unconditionally even when completion is not activated. This should not
+ ;; cause problems, because when completion is activated, the value of
+ ;; `company-emulation-alist' is ((t . company-my-keymap)), when
+ ;; completion is not activated, the value is ((t . nil)).
+ (add-hook! 'evil-local-mode-hook
+ (when (memq 'company-emulation-alist emulation-mode-map-alists)
+ (company-ensure-emulation-alist))))
;;
@@ -137,7 +137,20 @@
https://github.com/sebastiencs/company-box/issues/44"
:around #'company-box--update-scrollbar
(letf! ((#'display-buffer-in-side-window #'ignore))
- (apply orig-fn args))))
+ (apply orig-fn args)))
+
+ ;; `company-box' performs insufficient frame-live-p checks. Any command that
+ ;; "cleans up the session" will break company-box.
+ ;; TODO Fix this upstream.
+ (defadvice! +company-box-detect-deleted-frame-a (frame)
+ :filter-return #'company-box--get-frame
+ (if (frame-live-p frame) frame))
+ (defadvice! +company-box-detect-deleted-doc-frame-a (_selection frame)
+ :before #'company-box-doc
+ (and company-box-doc-enable
+ (frame-local-getq company-box-doc-frame frame)
+ (not (frame-live-p (frame-local-getq company-box-doc-frame frame)))
+ (frame-local-setq company-box-doc-frame nil frame))))
(use-package! company-dict
diff --git a/.emacs.d/modules/completion/company/packages.el b/.emacs.d/modules/completion/company/packages.el
index dd5dc45..6e9f21c 100644
--- a/.emacs.d/modules/completion/company/packages.el
+++ b/.emacs.d/modules/completion/company/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; completion/company/packages.el
-(package! company :pin "4462e7d399c3d2e1ea1f5d018f4537f1f3d5acfc")
+(package! company :pin "5f5949b6ae8ea9df94c6cb3e01d9cae43623b794")
(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4")
(when (featurep! +childframe)
- (package! company-box :pin "d8f71fde7a3301a62f9f6f627aa51610a294f4df"))
+ (package! company-box :pin "be37a9a30dc112ab172af21af694e2cb04a74f85"))
diff --git a/.emacs.d/modules/completion/helm/autoload/helm.el b/.emacs.d/modules/completion/helm/autoload/helm.el
index c453eab..c8bb41c 100644
--- a/.emacs.d/modules/completion/helm/autoload/helm.el
+++ b/.emacs.d/modules/completion/helm/autoload/helm.el
@@ -56,7 +56,8 @@ workspace."
(helm-rg-default-directory (or in (doom-project-root) default-directory))
(helm-rg-default-extra-args
(delq nil (append (list (when all-files "-z -uu")
- (unless recursive "--maxdepth 1"))
+ (unless recursive "--maxdepth 1")
+ "--hidden")
args))))
(setq deactivate-mark t)
(helm-rg (or query
diff --git a/.emacs.d/modules/completion/helm/packages.el b/.emacs.d/modules/completion/helm/packages.el
index 7a7f638..2bb4700 100644
--- a/.emacs.d/modules/completion/helm/packages.el
+++ b/.emacs.d/modules/completion/helm/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; completion/helm/packages.el
-(package! helm :pin "d2fbf66ea727f27cdf867b2bd6d6f7c706f99192")
+(package! helm :pin "19d2ba9d36615f1dea6be6cd6dcf5792dfefc45b")
(package! helm-rg :pin "ee0a3c09da0c843715344919400ab0a0190cc9dc")
(package! helm-c-yasnippet :pin "89cc8561e7e57e9d1070ee3641df019c7f49c5dd")
(package! helm-company :pin "6eb5c2d730a60e394e005b47c1db018697094dde")
@@ -13,7 +13,7 @@
(when (featurep! +fuzzy)
(package! helm-flx :pin "6640fac5cb16bee73c95b8ed1248a4e5e113690e"))
(when (featurep! +childframe)
- (package! posframe :pin "7b92a54e588889a74d36d51167e067676db7be8a"))
+ (package! posframe :pin "5696463afe2b0bc7b9c2705663daf9afc7ef18ad"))
(when (featurep! :lang org)
(package! helm-org :pin "b7a18dfc17e8b933956d61d68c435eee03a96c24"))
(package! helm-descbinds :pin "b72515982396b6e336ad7beb6767e95a80fca192")
diff --git a/.emacs.d/modules/completion/ido/packages.el b/.emacs.d/modules/completion/ido/packages.el
index ad90f74..d755eed 100644
--- a/.emacs.d/modules/completion/ido/packages.el
+++ b/.emacs.d/modules/completion/ido/packages.el
@@ -1,8 +1,8 @@
;; -*- no-byte-compile: t; -*-
;;; completion/ido/packages.el
-(package! flx-ido :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5")
+(package! flx-ido :pin "647cb2f92f9936c62e277d7a74ad54a80502d255")
(package! ido-completing-read+ :pin "b9ca2566b867464c25b720e2148d240961c110e7")
(package! ido-sort-mtime :pin "f638ff0c922af862f5211779f2311a27fde428eb")
-(package! ido-vertical-mode :pin "16c4c1a112796ee0bcf401ea39d3e2643a89feaf")
+(package! ido-vertical-mode :pin "5a6e17048528c328c129db6dccfe605f301ddef2")
(package! crm-custom :pin "f1aaccf64306a5f99d9bf7ba815d7ea41c15518d")
diff --git a/.emacs.d/modules/completion/ivy/autoload/hydras.el b/.emacs.d/modules/completion/ivy/autoload/hydras.el
index ee71f51..b879c23 100644
--- a/.emacs.d/modules/completion/ivy/autoload/hydras.el
+++ b/.emacs.d/modules/completion/ivy/autoload/hydras.el
@@ -1,33 +1,32 @@
;;; completion/ivy/autoload/hydras.el -*- lexical-binding: t; -*-
;;;###if (featurep! :ui hydra)
-(eval-when-compile (require 'ivy-hydra))
-
-;;;###autoload (autoload 'hydra-ivy/body "completion/ivy/autoload/hydras" nil nil)
-(defhydra+ hydra-ivy (:hint nil :color pink)
- "
+;;;###autoload
+(after! ivy-hydra
+ (defhydra+ hydra-ivy (:hint nil :color pink)
+ "
Move ^^^^^^^^^^ | Call ^^^^ | Cancel^^ | Options^^ | Action _w_/_s_/_a_: %s(ivy-action-name)
----------^^^^^^^^^^-+--------------^^^^-+-------^^-+--------^^-+---------------------------------
_g_ ^ ^ _k_ ^ ^ _u_ | _f_orward _o_ccur | _i_nsert | _c_alling: %-7s(if ivy-calling \"on\" \"off\") _C_ase-fold: %-10`ivy-case-fold-search
^↨^ _h_ ^+^ _l_ ^↕^ | _RET_ done ^^ | _q_uit | _m_atcher: %-7s(ivy--matcher-desc) _t_runcate: %-11`truncate-lines
_G_ ^ ^ _j_ ^ ^ _d_ | _TAB_ alt-done ^^ | ^ ^ | _<_/_>_: shrink/grow
"
- ;; arrows
- ("l" ivy-alt-done)
- ("h" ivy-backward-delete-char)
- ("g" ivy-beginning-of-buffer)
- ("G" ivy-end-of-buffer)
- ("d" ivy-scroll-up-command)
- ("u" ivy-scroll-down-command)
- ("e" ivy-scroll-down-command)
- ;; actions
- ("q" keyboard-escape-quit :exit t)
- ("" keyboard-escape-quit :exit t)
- ("TAB" ivy-alt-done :exit nil)
- ("RET" ivy-done :exit t)
- ("C-SPC" ivy-call-and-recenter :exit nil)
- ("f" ivy-call)
- ("c" ivy-toggle-calling)
- ("m" ivy-toggle-fuzzy)
- ("t" (setq truncate-lines (not truncate-lines)))
- ("o" ivy-occur :exit t))
+ ;; arrows
+ ("l" ivy-alt-done)
+ ("h" ivy-backward-delete-char)
+ ("g" ivy-beginning-of-buffer)
+ ("G" ivy-end-of-buffer)
+ ("d" ivy-scroll-up-command)
+ ("u" ivy-scroll-down-command)
+ ("e" ivy-scroll-down-command)
+ ;; actions
+ ("q" keyboard-escape-quit :exit t)
+ ("" keyboard-escape-quit :exit t)
+ ("TAB" ivy-alt-done :exit nil)
+ ("RET" ivy-done :exit t)
+ ("C-SPC" ivy-call-and-recenter :exit nil)
+ ("f" ivy-call)
+ ("c" ivy-toggle-calling)
+ ("m" ivy-toggle-fuzzy)
+ ("t" (setq truncate-lines (not truncate-lines)))
+ ("o" ivy-occur :exit t)))
diff --git a/.emacs.d/modules/completion/ivy/autoload/ivy.el b/.emacs.d/modules/completion/ivy/autoload/ivy.el
index 6a18bc7..70d9f3e 100644
--- a/.emacs.d/modules/completion/ivy/autoload/ivy.el
+++ b/.emacs.d/modules/completion/ivy/autoload/ivy.el
@@ -272,6 +272,7 @@ The point of this is to avoid Emacs locking up indexing massive file trees."
(directory (or in project-root))
(args (concat (if all-files " -uu")
(unless recursive " --maxdepth 1")
+ " --hidden"
" " (mapconcat #'shell-quote-argument args " "))))
(setq deactivate-mark t)
(counsel-rg
diff --git a/.emacs.d/modules/completion/ivy/config.el b/.emacs.d/modules/completion/ivy/config.el
index 785a0fe..764afe0 100644
--- a/.emacs.d/modules/completion/ivy/config.el
+++ b/.emacs.d/modules/completion/ivy/config.el
@@ -360,7 +360,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
(setf (alist-get fn ivy-posframe-display-functions-alist)
#'ivy-display-function-fallback))
- (add-hook 'doom-reload-hook #'posframe-delete-all))
+ (add-hook 'doom-after-reload-hook #'posframe-delete-all))
(use-package! flx
@@ -374,6 +374,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
:when (featurep! +prescient)
:hook (ivy-mode . ivy-prescient-mode)
:hook (ivy-prescient-mode . prescient-persist-mode)
+ :commands +ivy-prescient-non-fuzzy
:init
(setq prescient-filter-method
(if (featurep! +fuzzy)
diff --git a/.emacs.d/modules/completion/ivy/packages.el b/.emacs.d/modules/completion/ivy/packages.el
index ec4a388..5e49a0f 100644
--- a/.emacs.d/modules/completion/ivy/packages.el
+++ b/.emacs.d/modules/completion/ivy/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; completion/ivy/packages.el
-(package! swiper :pin "9bb68419f1088ee4d8f2b76f84995fa02bceeed3")
+(package! swiper :pin "b65e401c22ec56a008b00f651cd9536caf593d43")
(package! ivy)
(package! ivy-hydra)
(package! counsel)
@@ -12,12 +12,12 @@
(package! wgrep :pin "f0ef9bfa44db503cdb2f83fcfbd2fa4e2382ef1f")
(if (featurep! +prescient)
- (package! ivy-prescient :pin "cc289ba3b0d89f251267ca2b669d01b3afecc530")
+ (package! ivy-prescient :pin "0c5d611d9fc6431dd049a71a6eda163c37617a33")
(when (featurep! +fuzzy)
- (package! flx :pin "17f5c9cb2af18aa6f52910ff4a5a63591261ced5")))
+ (package! flx :pin "05600ff855020515d1243cf919cba1a6e77e7a1c")))
(when (featurep! +childframe)
- (package! ivy-posframe :pin "44749562a9e68bd43ccaa225b31311476fab1251"))
+ (package! ivy-posframe :pin "b4fed551ab7447ffaad1d802949cac7631e57a0d"))
(when (featurep! +icons)
(package! all-the-icons-ivy :pin "a70cbfa1effe36efc946a823a580cec686d5e88d"))
diff --git a/.emacs.d/modules/config/default/+emacs-bindings.el b/.emacs.d/modules/config/default/+emacs-bindings.el
index 2c12192..5e4dea2 100644
--- a/.emacs.d/modules/config/default/+emacs-bindings.el
+++ b/.emacs.d/modules/config/default/+emacs-bindings.el
@@ -124,6 +124,7 @@
;;; i --- insert
(:prefix-map ("i" . "insert")
+ :desc "Emoji" "e" #'emojify-insert-emoji
:desc "Current file name" "f" #'+default/insert-file-path
:desc "Current file path" "F" (cmd!! #'+default/insert-file-path t)
:desc "Snippet" "s" #'yas-insert-snippet
@@ -160,8 +161,9 @@
:desc "Org export to clipboard as RTF" "Y" #'+org/export-to-clipboard-as-rich-text
(:when (featurep! :lang org +journal)
(:prefix ("j" . "journal")
- :desc "New Entry" "j" #'org-journal-new-entry
- :desc "Search Forever" "s" #'org-journal-search-forever))
+ :desc "New Entry" "j" #'org-journal-new-entry
+ :desc "New Scheduled Entry" "J" #'org-journal-new-scheduled-entry
+ :desc "Search Forever" "s" #'org-journal-search-forever))
(:when (featurep! :lang org +roam)
(:prefix ("r" . "roam")
:desc "Switch to buffer" "b" #'org-roam-switch-to-buffer
@@ -265,6 +267,8 @@
;;; t --- toggle
(:prefix-map ("t" . "toggle")
:desc "Big mode" "b" #'doom-big-font-mode
+ (:when (featurep! :ui fill-column)
+ :desc "Fill Column Indicator" "c" #'+fill-column/toggle)
:desc "Flymake" "f" #'flymake-mode
:desc "Frame fullscreen" "F" #'toggle-frame-fullscreen
:desc "Indent style" "I" #'doom/toggle-indent-style
@@ -554,11 +558,7 @@
"C-M-b" #'sp-backward-sexp
"C-M-d" #'sp-splice-sexp
"C-M-k" #'sp-kill-sexp
- "C-M-t" #'sp-transpose-sexp
- "C-" #'sp-forward-slurp-sexp
- "M-" #'sp-forward-barf-sexp
- "C-" #'sp-backward-slurp-sexp
- "M-" #'sp-backward-barf-sexp)
+ "C-M-t" #'sp-transpose-sexp)
;;; treemacs
(:when (featurep! :ui treemacs)
diff --git a/.emacs.d/modules/config/default/+evil-bindings.el b/.emacs.d/modules/config/default/+evil-bindings.el
index c96659d..78ddf37 100644
--- a/.emacs.d/modules/config/default/+evil-bindings.el
+++ b/.emacs.d/modules/config/default/+evil-bindings.el
@@ -68,9 +68,10 @@
(:after geiser-doc :map geiser-doc-mode-map
:n "o" #'link-hint-open-link)
- (:after (evil-org evil-easymotion)
- :map evil-org-mode-map
- :m "gsh" #'+org/goto-visible)
+ (:unless (featurep! :input layout +bepo)
+ (:after (evil-org evil-easymotion)
+ :map evil-org-mode-map
+ :m "gsh" #'+org/goto-visible))
(:when (featurep! :editor multiple-cursors)
:prefix "gz"
@@ -218,30 +219,31 @@
;;; :editor
(map! (:when (featurep! :editor format)
- :n "gQ" #'+format:region)
+ :n "gQ" #'+format:region)
(:when (featurep! :editor rotate-text)
- :n "!" #'rotate-text)
+ :n "]r" #'rotate-text
+ :n "[r" #'rotate-text-backward)
(:when (featurep! :editor multiple-cursors)
- ;; evil-multiedit
- :v "R" #'evil-multiedit-match-all
- :n "M-d" #'evil-multiedit-match-symbol-and-next
- :n "M-D" #'evil-multiedit-match-symbol-and-prev
- :v "M-d" #'evil-multiedit-match-and-next
- :v "M-D" #'evil-multiedit-match-and-prev
- :nv "C-M-d" #'evil-multiedit-restore
- (:after evil-multiedit
- (:map evil-multiedit-state-map
- "M-d" #'evil-multiedit-match-and-next
- "M-D" #'evil-multiedit-match-and-prev
- "RET" #'evil-multiedit-toggle-or-restrict-region
- [return] #'evil-multiedit-toggle-or-restrict-region)))
+ ;; evil-multiedit
+ :v "R" #'evil-multiedit-match-all
+ :n "M-d" #'evil-multiedit-match-symbol-and-next
+ :n "M-D" #'evil-multiedit-match-symbol-and-prev
+ :v "M-d" #'evil-multiedit-match-and-next
+ :v "M-D" #'evil-multiedit-match-and-prev
+ :nv "C-M-d" #'evil-multiedit-restore
+ (:after evil-multiedit
+ (:map evil-multiedit-state-map
+ "M-d" #'evil-multiedit-match-and-next
+ "M-D" #'evil-multiedit-match-and-prev
+ "RET" #'evil-multiedit-toggle-or-restrict-region
+ [return] #'evil-multiedit-toggle-or-restrict-region)))
(:when (featurep! :editor snippets)
- ;; auto-yasnippet
- :i [C-tab] #'aya-expand
- :nv [C-tab] #'aya-create))
+ ;; auto-yasnippet
+ :i [C-tab] #'aya-expand
+ :nv [C-tab] #'aya-create))
;;; :tools
(when (featurep! :tools eval)
@@ -274,6 +276,7 @@
((featurep! :completion helm) #'helm-resume))
:desc "Search for symbol in project" "*" #'+default/search-project-for-symbol-at-point
+ :desc "Search project" "/" #'+default/search-project
:desc "Find file in project" "SPC" #'projectile-find-file
:desc "Jump to bookmark" "RET" #'bookmark-jump
@@ -314,6 +317,8 @@
:desc "Switch buffer" "B" #'switch-to-buffer)
(:unless (featurep! :ui workspaces)
:desc "Switch buffer" "b" #'switch-to-buffer)
+ :desc "Clone buffer" "c" #'clone-indirect-buffer
+ :desc "Clone buffer other window" "C" #'clone-indirect-buffer-other-window
:desc "Kill buffer" "d" #'kill-current-buffer
:desc "ibuffer" "i" #'ibuffer
:desc "Kill buffer" "k" #'kill-current-buffer
@@ -451,6 +456,7 @@
;;; i --- insert
(:prefix-map ("i" . "insert")
+ :desc "Emoji" "e" #'emojify-insert-emoji
:desc "Current file name" "f" #'+default/insert-file-path
:desc "Current file path" "F" (cmd!! #'+default/insert-file-path t)
:desc "Evil ex path" "p" (cmd! (evil-ex "R!echo "))
@@ -505,8 +511,9 @@
(:when (featurep! :lang org +journal)
(:prefix ("j" . "journal")
- :desc "New Entry" "j" #'org-journal-new-entry
- :desc "Search Forever" "s" #'org-journal-search-forever)))
+ :desc "New Entry" "j" #'org-journal-new-entry
+ :desc "New Scheduled Entry" "J" #'org-journal-new-scheduled-entry
+ :desc "Search Forever" "s" #'org-journal-search-forever)))
;;; o --- open
(:prefix-map ("o" . "open")
@@ -647,6 +654,8 @@
;;; t --- toggle
(:prefix-map ("t" . "toggle")
:desc "Big mode" "b" #'doom-big-font-mode
+ (:when (featurep! :ui fill-column)
+ :desc "Fill Column Indicator" "c" #'+fill-column/toggle)
:desc "Flymake" "f" #'flymake-mode
(:when (featurep! :checkers syntax)
:desc "Flycheck" "f" #'flycheck-mode)
diff --git a/.emacs.d/modules/editor/evil/+commands.el b/.emacs.d/modules/editor/evil/+commands.el
index 3bf6cf5..f7063a2 100644
--- a/.emacs.d/modules/editor/evil/+commands.el
+++ b/.emacs.d/modules/editor/evil/+commands.el
@@ -91,8 +91,8 @@
(evil-ex-define-cmd "tabl[ast]" #'+workspace/switch-to-last)
(evil-ex-define-cmd "tabload" #'+workspace:load)
(evil-ex-define-cmd "tabn[ew]" #'+workspace:new)
-(evil-ex-define-cmd "tabn[ext]" #'+workspace:switch-next)
-(evil-ex-define-cmd "tabp[rev]" #'+workspace:switch-previous)
+(evil-ex-define-cmd "tabnext" #'+workspace:switch-next)
+(evil-ex-define-cmd "tabprev" #'+workspace:switch-previous)
(evil-ex-define-cmd "tabr[ename]" #'+workspace:rename)
(evil-ex-define-cmd "tabs" #'+workspace/display)
(evil-ex-define-cmd "tabsave" #'+workspace:save)
diff --git a/.emacs.d/modules/editor/evil/README.org b/.emacs.d/modules/editor/evil/README.org
index 05d88a6..b0affc6 100644
--- a/.emacs.d/modules/editor/evil/README.org
+++ b/.emacs.d/modules/editor/evil/README.org
@@ -106,6 +106,8 @@ And these are text objects added by this module:
+ =g= The entire buffer
+ =i j k= by indentation (=k= includes one line above; =j= includes one line
above and below) (provided by ~evil-indent-plus~)
++ =q= For quotes (any kind)
++ =u= For URLs
+ =x= XML attributes (provided by ~exato~)
** Custom Ex Commands
diff --git a/.emacs.d/modules/editor/evil/autoload/textobjects.el b/.emacs.d/modules/editor/evil/autoload/textobjects.el
index ec40a41..29ffe25 100644
--- a/.emacs.d/modules/editor/evil/autoload/textobjects.el
+++ b/.emacs.d/modules/editor/evil/autoload/textobjects.el
@@ -42,3 +42,25 @@ This excludes the protocol and querystring."
(evil-range
beg (- end (if (evil-visual-state-p) 1 0))
type)))
+
+;;;###autoload (autoload '+evil:inner-any-quote "editor/evil/autoload/textobjects" nil nil)
+(evil-define-text-object +evil:inner-any-quote (count &optional beg end type)
+ "Select the closest inner quote."
+ (let ((evil-textobj-anyblock-blocks
+ '(("'" . "'")
+ ("\"" . "\"")
+ ("`" . "`")
+ ("‘" . "’")
+ ("“" . "”"))))
+ (evil-textobj-anyblock-inner-block count beg end type)))
+
+;;;###autoload (autoload '+evil:outer-any-quote "editor/evil/autoload/textobjects" nil nil)
+(evil-define-text-object +evil:outer-any-quote (count &optional beg end type)
+ "Select the closest outer quote."
+ (let ((evil-textobj-anyblock-blocks
+ '(("'" . "'")
+ ("\"" . "\"")
+ ("`" . "`")
+ ("‘" . "’")
+ ("“" . "”"))))
+ (evil-textobj-anyblock-a-block count beg end type)))
diff --git a/.emacs.d/modules/editor/evil/config.el b/.emacs.d/modules/editor/evil/config.el
index 41b8af2..db48990 100644
--- a/.emacs.d/modules/editor/evil/config.el
+++ b/.emacs.d/modules/editor/evil/config.el
@@ -49,7 +49,11 @@ directives. By default, this only recognizes C directives.")
evil-ex-interactive-search-highlight 'selected-window
;; It's infuriating that innocuous "beginning of line" or "end of line"
;; errors will abort macros, so suppress them:
- evil-kbd-macro-suppress-motion-error t)
+ evil-kbd-macro-suppress-motion-error t
+ evil-undo-system
+ (cond ((featurep! :emacs undo +tree) 'undo-tree)
+ ((featurep! :emacs undo) 'undo-fu)
+ (EMACS28+ 'undo-redo)))
;; Slow this down from 0.02 to prevent blocking in large or folded buffers
;; like magit while incrementally highlighting matches.
@@ -223,7 +227,7 @@ directives. By default, this only recognizes C directives.")
;;; Packages
(use-package! evil-easymotion
- :after-call pre-command-hook
+ :after-call doom-first-input-hook
:commands evilem-create evilem-default-keybindings
:config
;; Use evil-search backend, instead of isearch
@@ -234,7 +238,19 @@ directives. By default, this only recognizes C directives.")
(evilem-make-motion evilem-motion-search-word-forward #'evil-ex-search-word-forward
:bind ((evil-ex-search-highlight-all nil)))
(evilem-make-motion evilem-motion-search-word-backward #'evil-ex-search-word-backward
- :bind ((evil-ex-search-highlight-all nil))))
+ :bind ((evil-ex-search-highlight-all nil)))
+
+ ;; Rebind scope of w/W/e/E/ge/gE evil-easymotion motions to the visible
+ ;; buffer, rather than just the current line.
+ (put 'visible 'bounds-of-thing-at-point (lambda () (cons (window-start) (window-end))))
+ (evilem-make-motion evilem-motion-forward-word-begin #'evil-forward-word-begin :scope 'visible)
+ (evilem-make-motion evilem-motion-forward-WORD-begin #'evil-forward-WORD-begin :scope 'visible)
+ (evilem-make-motion evilem-motion-forward-word-end #'evil-forward-word-end :scope 'visible)
+ (evilem-make-motion evilem-motion-forward-WORD-end #'evil-forward-WORD-end :scope 'visible)
+ (evilem-make-motion evilem-motion-backward-word-begin #'evil-backward-word-begin :scope 'visible)
+ (evilem-make-motion evilem-motion-backward-WORD-begin #'evil-backward-WORD-begin :scope 'visible)
+ (evilem-make-motion evilem-motion-backward-word-end #'evil-backward-word-end :scope 'visible)
+ (evilem-make-motion evilem-motion-backward-WORD-end #'evil-backward-WORD-end :scope 'visible))
(use-package! evil-embrace
@@ -325,7 +341,8 @@ directives. By default, this only recognizes C directives.")
(use-package! evil-nerd-commenter
:commands (evilnc-comment-operator
evilnc-inner-comment
- evilnc-outer-commenter))
+ evilnc-outer-commenter)
+ :general ([remap comment-line] #'evilnc-comment-or-uncomment-lines))
(use-package! evil-snipe
@@ -353,6 +370,16 @@ directives. By default, this only recognizes C directives.")
:config (global-evil-surround-mode 1))
+(use-package! evil-textobj-anyblock
+ :defer t
+ :config
+ (setq evil-textobj-anyblock-blocks
+ '(("(" . ")")
+ ("{" . "}")
+ ("\\[" . "\\]")
+ ("<" . ">"))))
+
+
(use-package! evil-traces
:after evil-ex
:config
@@ -391,7 +418,7 @@ directives. By default, this only recognizes C directives.")
;; implement dictionary keybinds
;; evil already defines 'z=' to `ispell-word' = correct word at point
(:when (featurep! :checkers spell)
- :n "zq" #'+spell/add-word
+ :n "zg" #'+spell/add-word
:n "zw" #'+spell/remove-word
:m "[s" #'+spell/previous-error
:m "]s" #'+spell/next-error)
@@ -512,7 +539,8 @@ directives. By default, this only recognizes C directives.")
"o" #'doom/window-enlargen
;; Delete window
"d" #'evil-window-delete
- "C-C" #'ace-delete-window)
+ "C-C" #'ace-delete-window
+ "T" #'tear-off-window)
;; text objects
:textobj "a" #'evil-inner-arg #'evil-outer-arg
@@ -523,6 +551,7 @@ directives. By default, this only recognizes C directives.")
:textobj "i" #'evil-indent-plus-i-indent #'evil-indent-plus-a-indent
:textobj "j" #'evil-indent-plus-i-indent-up-down #'evil-indent-plus-a-indent-up-down
:textobj "k" #'evil-indent-plus-i-indent-up #'evil-indent-plus-a-indent-up
+ :textobj "q" #'+evil:inner-any-quote #'+evil:outer-any-quote
:textobj "u" #'+evil:inner-url-txtobj #'+evil:outer-url-txtobj
:textobj "x" #'evil-inner-xml-attr #'evil-outer-xml-attr
diff --git a/.emacs.d/modules/editor/evil/packages.el b/.emacs.d/modules/editor/evil/packages.el
index 89efbe1..7054734 100644
--- a/.emacs.d/modules/editor/evil/packages.el
+++ b/.emacs.d/modules/editor/evil/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; editor/evil/packages.el
-(package! evil :pin "1e7aa5bfbd86feff0ed5982e487070352d326b90")
+(package! evil :pin "373a57e5fc41b9597ed7f7223806ae2ffc16ade6")
(package! evil-args :pin "758ad5ae54ad34202064fec192c88151c08cb387")
(package! evil-easymotion :pin "f96c2ed38ddc07908db7c3c11bcd6285a3e8c2e9")
(package! evil-embrace :pin "4379adea032b25e359d01a36301b4a5afdd0d1b7")
@@ -11,7 +11,7 @@
(package! evil-exchange :pin "3030e21ee16a42dfce7f7cf86147b778b3f5d8c1")
(package! evil-indent-plus :pin "0c7501e6efed661242c3a20e0a6c79a6455c2c40")
(package! evil-lion :pin "6b03593f5dd6e7c9ca02207f9a73615cf94c93ab")
-(package! evil-nerd-commenter :pin "87734b9c7fcd047f73a072b9d03ec05f786eeb03")
+(package! evil-nerd-commenter :pin "b670f69b646693b50645760ee3b12bd1b9eba46b")
(package! evil-numbers
:recipe (:host github :repo "janpath/evil-numbers")
:pin "006da406d175c05fedca4431cccd569e20bef92c")
@@ -33,4 +33,4 @@
(package! neotree)
(autoload 'neotree-make-executor "neotree" nil nil 'macro))
- (package! evil-collection :pin "c136589d9584e5d01a4b3f2e4cf8ac5f5a23be63"))
+ (package! evil-collection :pin "a21725fd3256f024beb5355b7913d4f7d09d849a"))
diff --git a/.emacs.d/modules/editor/file-templates/templates/text-mode/__license-gpl3 b/.emacs.d/modules/editor/file-templates/templates/text-mode/__license-gpl3
index 197d810..f9f75f7 100644
--- a/.emacs.d/modules/editor/file-templates/templates/text-mode/__license-gpl3
+++ b/.emacs.d/modules/editor/file-templates/templates/text-mode/__license-gpl3
@@ -637,8 +637,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
-
- Copyright (C)
+ ${4:}
+ Copyright (C) ${1:`(format-time-string "%Y")`} ${2:`user-full-name`}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -658,7 +658,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
- Copyright (C)
+ ${3:} Copyright (C) ${1:`(format-time-string "%Y")`} ${2:`user-full-name`}
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
diff --git a/.emacs.d/modules/editor/format/autoload/format.el b/.emacs.d/modules/editor/format/autoload/format.el
index fb0934b..9e1020b 100644
--- a/.emacs.d/modules/editor/format/autoload/format.el
+++ b/.emacs.d/modules/editor/format/autoload/format.el
@@ -104,7 +104,7 @@ Stolen shamelessly from go-mode"
Prompts for a formatter if universal arg is set."
(cond ((or (eq +format-with :none)
(doom-temp-buffer-p (current-buffer))
- (doom-special-buffer-p (current-buffer)))
+ (derived-mode-p 'special-mode))
(list nil nil))
(current-prefix-arg
(list (or (+format-completing-read)
diff --git a/.emacs.d/modules/editor/format/config.el b/.emacs.d/modules/editor/format/config.el
index 9ba0a0f..f2810ce 100644
--- a/.emacs.d/modules/editor/format/config.el
+++ b/.emacs.d/modules/editor/format/config.el
@@ -44,7 +44,7 @@ This is controlled by `+format-on-save-enabled-modes'."
(memq major-mode (cdr +format-on-save-enabled-modes)))
((not (memq major-mode +format-on-save-enabled-modes))))
(not (require 'format-all nil t)))
- (format-all-mode +1)))
+ (+format-enable-on-save-h)))
(when (featurep! +onsave)
(add-hook 'after-change-major-mode-hook #'+format-enable-on-save-maybe-h))
@@ -62,3 +62,7 @@ This is controlled by `+format-on-save-enabled-modes'."
;; 2. Applies changes via RCS patch, line by line, to protect buffer markers
;; and avoid any jarring cursor+window scrolling.
(advice-add #'format-all-buffer--with :around #'+format-buffer-a)
+
+;; format-all-mode "helpfully" raises an error when it doesn't know how to
+;; format a buffer.
+(add-to-list 'debug-ignored-errors "^Don't know how to format ")
diff --git a/.emacs.d/modules/editor/multiple-cursors/config.el b/.emacs.d/modules/editor/multiple-cursors/config.el
index eb558ac..1dfc044 100644
--- a/.emacs.d/modules/editor/multiple-cursors/config.el
+++ b/.emacs.d/modules/editor/multiple-cursors/config.el
@@ -77,6 +77,8 @@
(evil-numbers/dec-at-pt-incremental)
;; :tools eval
(+eval:replace-region . +multiple-cursors-execute-default-operator-fn)
+ ;; :lang ess
+ (ess-smart-comma . evil-mc-execute-call)
;; :lang org
(evil-org-delete . evil-mc-execute-default-evil-delete)))
(setf (alist-get (car fn) evil-mc-custom-known-commands)
diff --git a/.emacs.d/modules/editor/snippets/config.el b/.emacs.d/modules/editor/snippets/config.el
index c16f73f..e35c223 100644
--- a/.emacs.d/modules/editor/snippets/config.el
+++ b/.emacs.d/modules/editor/snippets/config.el
@@ -15,7 +15,9 @@
yas-lookup-snippet
yas-insert-snippet
yas-new-snippet
- yas-visit-snippet-file)
+ yas-visit-snippet-file
+ yas-activate-extra-mode
+ yas-deactivate-extra-mode)
:init
;; Remove default ~/.emacs.d/snippets
(defvar yas-snippet-dirs nil)
diff --git a/.emacs.d/modules/editor/snippets/packages.el b/.emacs.d/modules/editor/snippets/packages.el
index 8f900a8..8e331d4 100644
--- a/.emacs.d/modules/editor/snippets/packages.el
+++ b/.emacs.d/modules/editor/snippets/packages.el
@@ -7,4 +7,4 @@
:recipe (:host github
:repo "hlissner/doom-snippets"
:files ("*.el" "*"))
- :pin "60c57d66d2afd1798bff5023a54ab155f311746a")
+ :pin "e1cbbdf526224066f6bb67f95672d329323ecb1c")
diff --git a/.emacs.d/modules/emacs/electric/autoload.el b/.emacs.d/modules/emacs/electric/autoload.el
index f4e3372..1326c9f 100644
--- a/.emacs.d/modules/emacs/electric/autoload.el
+++ b/.emacs.d/modules/emacs/electric/autoload.el
@@ -11,16 +11,16 @@ Enables `electric-indent-local-mode' in MODES.
(declare (indent defun))
(dolist (mode (doom-enlist modes))
(let ((hook (intern (format "%s-hook" mode)))
- (fn (intern (format "+electric|init-%s" mode))))
+ (fn (intern (format "+electric--init-%s-h" mode))))
(cond ((null (car-safe plist))
(remove-hook hook fn)
(unintern fn nil))
- ((fset fn
- (lambda ()
- (when (eq major-mode mode)
- (setq-local electric-indent-inhibit nil)
- (cl-destructuring-bind (&key chars words) plist
- (electric-indent-local-mode +1)
- (if chars (setq electric-indent-chars chars))
- (if words (setq +electric-indent-words words))))))
+ ((fset
+ fn (lambda ()
+ (when (eq major-mode mode)
+ (setq-local electric-indent-inhibit nil)
+ (cl-destructuring-bind (&key chars words) plist
+ (electric-indent-local-mode +1)
+ (if chars (setq-local electric-indent-chars chars))
+ (if words (setq +electric-indent-words words))))))
(add-hook hook fn))))))
diff --git a/.emacs.d/modules/emacs/vc/config.el b/.emacs.d/modules/emacs/vc/config.el
index 457ae50..f9854c5 100644
--- a/.emacs.d/modules/emacs/vc/config.el
+++ b/.emacs.d/modules/emacs/vc/config.el
@@ -1,5 +1,12 @@
;;; emacs/vc/config.el -*- lexical-binding: t; -*-
+(map! :when (fboundp 'bug-reference-mode)
+ :map bug-reference-map
+ "RET" (cmds! (and (bound-and-true-p evil-mode)
+ (evil-normal-state-p))
+ #'bug-reference-push-button))
+
+
(when IS-WINDOWS
(setenv "GIT_ASKPASS" "git-gui--askpass"))
diff --git a/.emacs.d/modules/emacs/vc/packages.el b/.emacs.d/modules/emacs/vc/packages.el
index 9295852..02c56d0 100644
--- a/.emacs.d/modules/emacs/vc/packages.el
+++ b/.emacs.d/modules/emacs/vc/packages.el
@@ -5,8 +5,8 @@
(package! vc-annotate :built-in t)
(package! smerge-mode :built-in t)
-(package! browse-at-remote :pin "6aecae4b5d202e582425fc8aa2c9c2b6a4779f25")
-(package! git-commit :pin "321214c3a2dd10fdf672ba96bd00703a51094bbe")
+(package! browse-at-remote :pin "fadf99d6d8e891f3b112e36c772e0eea0b9bc7f2")
+(package! git-commit :pin "2fb3bf782ccf5652b98f8de989f014749473eacf")
(package! git-timemachine :pin "8d675750e921a047707fcdc36d84f8439b19a907")
(package! gitconfig-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217")
(package! gitignore-mode :pin "55468314a5f6b77d2c96be62c7005ac94545e217")
diff --git a/.emacs.d/modules/email/mu4e/config.el b/.emacs.d/modules/email/mu4e/config.el
index 15028ca..72b9bcd 100644
--- a/.emacs.d/modules/email/mu4e/config.el
+++ b/.emacs.d/modules/email/mu4e/config.el
@@ -106,7 +106,7 @@
(use-package! org-msg
- :hook (org-load . org-msg-mode)
+ :hook (mu4e-compose-pre . org-msg-mode)
:config
(setq org-msg-startup "inlineimages"
org-msg-greeting-name-limit 3
diff --git a/.emacs.d/modules/email/mu4e/packages.el b/.emacs.d/modules/email/mu4e/packages.el
index 61c1ffa..3e66c31 100644
--- a/.emacs.d/modules/email/mu4e/packages.el
+++ b/.emacs.d/modules/email/mu4e/packages.el
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; email/mu4e/packages.el
-(package! org-msg :pin "2db6725c4a4f4342a9c61895b7c3c82795b01fee")
+(package! org-msg :pin "557d490ecbd80522a42f7b1fb6aaacca504d4512")
diff --git a/.emacs.d/modules/email/notmuch/config.el b/.emacs.d/modules/email/notmuch/config.el
index dd6b56f..7cf7c8c 100644
--- a/.emacs.d/modules/email/notmuch/config.el
+++ b/.emacs.d/modules/email/notmuch/config.el
@@ -22,7 +22,7 @@
(add-to-list 'org-modules 'ol-notmuch))
:config
(set-company-backend! 'notmuch-message-mode
- '(notmuch-company :with company-ispell company-yasnippet))
+ 'notmuch-company '(company-ispell company-yasnippet))
(set-popup-rule! "^\\*notmuch-hello" :side 'left :size 30 :ttl 0)
diff --git a/.emacs.d/modules/email/notmuch/packages.el b/.emacs.d/modules/email/notmuch/packages.el
index 79b1a3e..adcca5d 100644
--- a/.emacs.d/modules/email/notmuch/packages.el
+++ b/.emacs.d/modules/email/notmuch/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; email/notmuch/packages.el
-(package! notmuch :pin "8776faf6d5118e8152ecfacf94accf35ccebf1d2")
+(package! notmuch :pin "45193bab16c728ba892a5d45fc62ef59e2a6ef85")
(package! org-mime :pin "9bb6351b25c62835c7881fc64096028eb8ef83ef")
(when (featurep! :completion ivy)
(package! counsel-notmuch :pin "a4a1562935e4180c42524c51609d1283e9be0688"))
diff --git a/.emacs.d/modules/email/wanderlust/packages.el b/.emacs.d/modules/email/wanderlust/packages.el
index 056985f..8e7a2df 100644
--- a/.emacs.d/modules/email/wanderlust/packages.el
+++ b/.emacs.d/modules/email/wanderlust/packages.el
@@ -4,8 +4,8 @@
;; HACK These are wanderlust's dependencies (wanderlust depends on semi, semi
;; 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 "d146ddbf8818e81d3577d5eee7825d377bec0c73")
-(package! flim :recipe (:branch "flim-1_14-wl") :pin "f303f2f6c124bc8635add96d3326a2209749437b")
-(package! semi :recipe (:branch "semi-1_14-wl") :pin "10897f024fd9282c73385d24514cc4b57fe193db")
+(package! apel :recipe (:branch "apel-wl") :pin "28bca5f7027da26c90bf25ab835a1d615ce316e4")
+(package! flim :recipe (:branch "flim-1_14-wl") :pin "edb5982bdc24960798f6038db2c863d7c264cffb")
+(package! semi :recipe (:branch "semi-1_14-wl") :pin "939c80580101126c81a72f1643762fbc964f8b64")
-(package! wanderlust :pin "7af0d582cd48a37469e0606ea35887740d78c8b5")
+(package! wanderlust :pin "c7043e6446a302fee41b531d2daaa388c4d833a7")
diff --git a/.emacs.d/modules/input/japanese/config.el b/.emacs.d/modules/input/japanese/config.el
index 39f5041..63c9f74 100644
--- a/.emacs.d/modules/input/japanese/config.el
+++ b/.emacs.d/modules/input/japanese/config.el
@@ -35,7 +35,9 @@
(use-package! ddskk
- :general ("C-x j" #'skk-mode))
+ :general ("C-x j" #'skk-mode)
+ :init
+ (add-hook 'doom-escape-hook #'skk-mode-exit))
;;
diff --git a/.emacs.d/modules/lang/agda/config.el b/.emacs.d/modules/lang/agda/config.el
index d54bddc..212a9b5 100644
--- a/.emacs.d/modules/lang/agda/config.el
+++ b/.emacs.d/modules/lang/agda/config.el
@@ -7,33 +7,34 @@
(unless (require 'agda2 nil t)
(message "Failed to find the `agda2' package")))
-
-(map! :after agda2-mode
- :map agda2-mode-map
- :localleader
- "?" #'agda2-show-goals
- "." #'agda2-goal-and-context-and-inferred
- "," #'agda2-goal-and-context
- "=" #'agda2-show-constraints
- "SPC" #'agda2-give
- "a" #'agda2-auto-maybe-all
- "b" #'agda2-previous-goal
- "c" #'agda2-make-case
- "d" #'agda2-infer-type-maybe-toplevel
- "e" #'agda2-show-context
- "f" #'agda2-next-goal
- "gG" #'agda2-go-back
- "h" #'agda2-helper-function-type
- "l" #'agda2-load
- "n" #'agda2-compute-normalised-maybe-toplevel
- "p" #'agda2-module-contents-maybe-toplevel
- "r" #'agda2-refine
- "s" #'agda2-solveAll
- "t" #'agda2-goal-type
- "w" #'agda2-why-in-scope-maybe-toplevel
- (:prefix "x"
- "c" #'agda2-compile
- "d" #'agda2-remove-annotations
- "h" #'agda2-display-implicit-arguments
- "q" #'agda2-quit
- "r" #'agda2-restart))
+(after! agda2-mode
+ (set-lookup-handlers! 'agda2-mode
+ :definition #'agda2-goto-definition-keyboard)
+ (map! :map agda2-mode-map
+ :localleader
+ "?" #'agda2-show-goals
+ "." #'agda2-goal-and-context-and-inferred
+ "," #'agda2-goal-and-context
+ "=" #'agda2-show-constraints
+ "SPC" #'agda2-give
+ "a" #'agda2-auto-maybe-all
+ "b" #'agda2-previous-goal
+ "c" #'agda2-make-case
+ "d" #'agda2-infer-type-maybe-toplevel
+ "e" #'agda2-show-context
+ "f" #'agda2-next-goal
+ "gG" #'agda2-go-back
+ "h" #'agda2-helper-function-type
+ "l" #'agda2-load
+ "n" #'agda2-compute-normalised-maybe-toplevel
+ "p" #'agda2-module-contents-maybe-toplevel
+ "r" #'agda2-refine
+ "s" #'agda2-solveAll
+ "t" #'agda2-goal-type
+ "w" #'agda2-why-in-scope-maybe-toplevel
+ (:prefix "x"
+ "c" #'agda2-compile
+ "d" #'agda2-remove-annotations
+ "h" #'agda2-display-implicit-arguments
+ "q" #'agda2-quit
+ "r" #'agda2-restart)))
diff --git a/.emacs.d/modules/lang/agda/packages.el b/.emacs.d/modules/lang/agda/packages.el
index c6caeb7..5518c83 100644
--- a/.emacs.d/modules/lang/agda/packages.el
+++ b/.emacs.d/modules/lang/agda/packages.el
@@ -6,11 +6,11 @@
:recipe (:host github :repo "agda/agda"
:files ("src/data/emacs-mode/agda-input.el")
:nonrecursive t)
- :pin "36738c13e2e85f1029083e974cdcff6927d48980")
+ :pin "08191e66e65a4870bf43e21007909fc03150eabf")
(package! agda2-mode
:recipe (:host github :repo "agda/agda"
:files ("src/data/emacs-mode/*.el"
(:exclude "agda-input.el"))
:nonrecursive t)
- :pin "36738c13e2e85f1029083e974cdcff6927d48980"))
+ :pin "08191e66e65a4870bf43e21007909fc03150eabf"))
diff --git a/.emacs.d/modules/lang/cc/autoload.el b/.emacs.d/modules/lang/cc/autoload.el
index e368241..1b94ade 100644
--- a/.emacs.d/modules/lang/cc/autoload.el
+++ b/.emacs.d/modules/lang/cc/autoload.el
@@ -129,7 +129,7 @@ simpler."
;; Eglot specific helper, courtesy of MaskRay
;;;###autoload
-(defun +cc/eglot-ccls-inheritance-hierarchy (&optional derived)
+(defun +cc/eglot-ccls-show-inheritance-hierarchy (&optional derived)
"Show inheritance hierarchy for the thing at point.
If DERIVED is non-nil (interactively, with prefix argument), show
the children of class at point."
@@ -224,3 +224,95 @@ header files."
(`c-mode 'ffap-c-path)
(`c++-mode 'ffap-c++-path))
(expand-file-name dir project-root)))))
+
+
+;;
+;;; CCLS specific helpers
+
+;; ccls-show-vars ccls-show-base ccls-show-derived ccls-show-members have a
+;; parameter while others are interactive.
+;;
+;; (+cc/ccls-show-base 1) direct bases
+;; (+cc/ccls-show-derived 1) direct derived
+;; (+cc/ccls-show-member 2) => 2 (Type) => nested classes / types in a namespace
+;; (+cc/ccls-show-member 3) => 3 (Func) => member functions / functions in a namespace
+;; (+cc/ccls-show-member 0) => member variables / variables in a namespace
+;; (+cc/ccls-show-vars 1) => field
+;; (+cc/ccls-show-vars 2) => local variable
+;; (+cc/ccls-show-vars 3) => field or local variable. 3 = 1 | 2
+;; (+cc/ccls-show-vars 4) => parameter
+
+;;;###autoload
+(defun +cc/ccls-show-callee ()
+ "Show callees of symbol under point."
+ (interactive)
+ (lsp-ui-peek-find-custom "$ccls/call" '(:callee t)))
+
+;;;###autoload
+(defun +cc/ccls-show-caller ()
+ "Show callers of symbol under point."
+ (interactive)
+ (lsp-ui-peek-find-custom "$ccls/call"))
+
+;;;###autoload
+(defun +cc/ccls-show-vars (kind)
+ "Show variables of type KIND as symbol under point.
+ 1 -> field
+ 2 -> local variable
+ 3 -> field or local variables. 3 = 1 | 2.
+ 4 -> parameter"
+ (lsp-ui-peek-find-custom "$ccls/vars" `(:kind ,kind)))
+
+;;;###autoload
+(defun +cc/ccls-show-base (levels)
+ "Show bases of class under point up to LEVELS levels (1 for direct bases)."
+ (lsp-ui-peek-find-custom "$ccls/inheritance" `(:levels ,levels)))
+
+;;;###autoload
+(defun +cc/ccls-show-derived (levels)
+ "Show derived classes from class under point down to LEVELS levels (1 for direct derived)."
+ (lsp-ui-peek-find-custom "$ccls/inheritance" `(:levels ,levels :derived t)))
+
+;;;###autoload
+(defun +cc/ccls-show-member (kind)
+ "Show member elements of kind KIND for class/namespace under point.
+ 0 -> member variables/ variables in a namespace
+ 2 -> nested classes / types in a namespace
+ 3 -> member functions / functions in a namespace"
+ (lsp-ui-peek-find-custom "$ccls/member" `(:kind ,kind)))
+
+;; The meaning of :role corresponds to https://github.com/maskray/ccls/blob/master/src/symbol.h
+;;;###autoload
+(defun +cc/ccls-show-references-address ()
+ "References w/ Role::Address bit (e.g. variables explicitly being taken addresses)"
+ (interactive)
+ (lsp-ui-peek-find-custom "textDocument/references"
+ (plist-put (lsp--text-document-position-params) :role 128)))
+
+;;;###autoload
+(defun +cc/ccls-show-references-macro ()
+ "References w/ Role::Dynamic bit (macro expansions)"
+ (interactive)
+ (lsp-ui-peek-find-custom "textDocument/references"
+ (plist-put (lsp--text-document-position-params) :role 64)))
+
+;;;###autoload
+(defun +cc/ccls-show-references-not-call ()
+ "References w/o Role::Call bit (e.g. where functions are taken addresses)"
+ (interactive)
+ (lsp-ui-peek-find-custom "textDocument/references"
+ (plist-put (lsp--text-document-position-params) :excludeRole 32)))
+
+;;;###autoload
+(defun +cc/ccls-show-references-read ()
+ "References w/ Role::Read"
+ (interactive)
+ (lsp-ui-peek-find-custom "textDocument/references"
+ (plist-put (lsp--text-document-position-params) :role 8)))
+
+;;;###autoload
+(defun +cc/ccls-show-references-write ()
+ "References w/ Role::Write"
+ (interactive)
+ (lsp-ui-peek-find-custom "textDocument/references"
+ (plist-put (lsp--text-document-position-params) :role 16)))
diff --git a/.emacs.d/modules/lang/cc/config.el b/.emacs.d/modules/lang/cc/config.el
index 825f04c..c928c16 100644
--- a/.emacs.d/modules/lang/cc/config.el
+++ b/.emacs.d/modules/lang/cc/config.el
@@ -230,14 +230,33 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
(add-hook! '(c-mode-local-vars-hook
c++-mode-local-vars-hook
objc-mode-local-vars-hook)
- #'lsp!)
+ #'lsp!)
+
+ (map! :after ccls
+ :map (c-mode-map c++-mode-map)
+ :n "C-h" (cmd! (ccls-navigate "U"))
+ :n "C-j" (cmd! (ccls-navigate "R"))
+ :n "C-k" (cmd! (ccls-navigate "L"))
+ :n "C-l" (cmd! (ccls-navigate "D"))
+ (:localleader
+ :desc "Preprocess file" "lp" #'ccls-preprocess-file
+ :desc "Reload cache & CCLS" "lf" #'ccls-reload)
+ (:after lsp-ui-peek
+ (:localleader
+ :desc "Callers list" "c" #'+cc/ccls-show-caller
+ :desc "Callees list" "C" #'+cc/ccls-show-callee
+ :desc "References (address)" "a" #'+cc/ccls-show-references-address
+ :desc "References (not call)" "f" #'+cc/ccls-show-references-not-call
+ :desc "References (Macro)" "m" #'+cc/ccls-show-references-macro
+ :desc "References (Read)" "r" #'+cc/ccls-show-references-read
+ :desc "References (Write)" "w" #'+cc/ccls-show-references-write)))
(when (featurep! :tools lsp +eglot)
;; Map eglot specific helper
(map! :localleader
:after cc-mode
:map c++-mode-map
- :n :desc "Show type inheritance hierarchy" "ct" #'+cc/eglot-ccls-inheritance-hierarchy)
+ :desc "Show type inheritance hierarchy" "ct" #'+cc/eglot-ccls-inheritance-hierarchy)
;; NOTE : This setting is untested yet
(after! eglot
@@ -249,20 +268,37 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
"-isystem/usr/local/include"]
:resourceDir (cdr (doom-call-process "clang" "-print-resource-dir"))))))))))))
-
(use-package! ccls
:when (featurep! +lsp)
:unless (featurep! :tools lsp +eglot)
- :after lsp-mode
+ :hook (lsp-lens-mode . ccls-code-lens-mode)
:init
+ (defvar ccls-sem-highlight-method 'font-lock)
(after! projectile
(add-to-list 'projectile-globally-ignored-directories ".ccls-cache")
(add-to-list 'projectile-project-root-files-bottom-up ".ccls-root")
(add-to-list 'projectile-project-root-files-top-down-recurring "compile_commands.json"))
+ ;; Avoid using `:after' because it ties the :config below to when `lsp-mode'
+ ;; loads, rather than `ccls' loads.
+ (after! lsp-mode (require 'ccls))
:config
+ (set-evil-initial-state! 'ccls-tree-mode 'emacs)
+ ;; Disable `ccls-sem-highlight-method' if `lsp-enable-semantic-highlighting'
+ ;; is nil. Otherwise, it appears ccls bypasses it.
+ (setq-hook! 'lsp-configure-hook
+ ccls-sem-highlight-method (if lsp-enable-semantic-highlighting
+ ccls-sem-highlight-method))
+ (when (or IS-MAC IS-LINUX)
+ (let ((cpu-count-command (cond (IS-MAC '("sysctl" "-n" "hw.ncpu"))
+ (IS-LINUX '("nproc"))
+ (t (error "unreachable code")))))
+ (setq ccls-initialization-options
+ `(:index (:trackDependency 1
+ :threads ,(max 1 (/ (string-to-number (cdr (apply #'doom-call-process cpu-count-command))) 2)))))))
(when IS-MAC
(setq ccls-initialization-options
- `(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
- "-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
- "-isystem/usr/local/include"]
- :resourceDir (cdr (doom-call-process "clang" "-print-resource-dir")))))))
+ (append ccls-initialization-options
+ `(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
+ "-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
+ "-isystem/usr/local/include"]
+ :resourceDir (cdr (doom-call-process "clang" "-print-resource-dir"))))))))
diff --git a/.emacs.d/modules/lang/cc/packages.el b/.emacs.d/modules/lang/cc/packages.el
index fa8933f..789911b 100644
--- a/.emacs.d/modules/lang/cc/packages.el
+++ b/.emacs.d/modules/lang/cc/packages.el
@@ -5,7 +5,7 @@
:recipe (:host github :repo "emacsmirror/cmake-mode" :files (:defaults "*"))
:pin "e58c41145a879f0314b2821eada7fd0dc898b6b6")
(package! cuda-mode :pin "9ae9eacfdba3559b5456342d0d03296290df8ff5")
-(package! demangle-mode :pin "697c1dbde93f164eac7ea0dc530d7e8b799272d6")
+(package! demangle-mode :pin "aaef0bd77a3ea9ce9132e9a53ac021b0f5d33e12")
(package! disaster :pin "10a785facc60d89d78e0d5177985ab1af1741bb4")
(package! modern-cpp-font-lock :pin "865955d0035382a17a7f03add0d00d0bd812b103")
(package! opencl-mode :pin "55cb49c8243e6420961d719faced035bc547c1ef")
@@ -27,7 +27,7 @@
(when (featurep! :completion company)
(package! company-irony :pin "b44711dfce445610c1ffaec4951c6ff3882b216a")
(package! company-irony-c-headers :pin "72c386aeb079fb261d9ec02e39211272f76bbd97")))
- (when (package! rtags :pin "b57b36039f6411f23009c4ec0315ca5a7adb6824")
+ (when (package! rtags :pin "e6c7005bfad5df335ce86378b642ebd33aa66f26")
(when (featurep! :completion ivy)
(package! ivy-rtags))
(when (featurep! :completion helm)
diff --git a/.emacs.d/modules/lang/clojure/packages.el b/.emacs.d/modules/lang/clojure/packages.el
index e54f732..fc175e3 100644
--- a/.emacs.d/modules/lang/clojure/packages.el
+++ b/.emacs.d/modules/lang/clojure/packages.el
@@ -1,9 +1,9 @@
;; -*- no-byte-compile: t; -*-
;;; lang/clojure/packages.el
-(package! clojure-mode :pin "84ed16c5ddb6561620886485e20669d0c81f88a1")
-(package! cider :pin "a89b694cc3cec0294d84bf9dbe1163ad2373e8db")
-(package! clj-refactor :pin "97095682580bbc5bfebcbc5349f03f5bd7121c96")
+(package! clojure-mode :pin "75c28897c7e91aa130c71c076aa2a6ce2e02da8f")
+(package! cider :pin "f1c2a797291fd3d2a44cb32372852950d5ecf8a2")
+(package! clj-refactor :pin "6db85b37b57497b56d97d5e5512160e5db85f798")
(when (featurep! :checkers syntax)
- (package! flycheck-clj-kondo :pin "5472c26ffdf754a0661357564874ffd4f8598805"))
+ (package! flycheck-clj-kondo :pin "152df7ffa1ba3ea6dfcb238fabbf50e1e1a4dc97"))
diff --git a/.emacs.d/modules/lang/common-lisp/packages.el b/.emacs.d/modules/lang/common-lisp/packages.el
index 828edbb..1de4fab 100644
--- a/.emacs.d/modules/lang/common-lisp/packages.el
+++ b/.emacs.d/modules/lang/common-lisp/packages.el
@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; lang/common-lisp/packages.el
-(when (package! sly :pin "34239bc5954ef41a4db49144925290dc794a6c4d")
+(when (package! sly :pin "fce4f9be39b6a40a4128458ff34151eecb5e27de")
(package! sly-macrostep :pin "5113e4e926cd752b1d0bcc1508b3ebad5def5fad")
(package! sly-repl-ansi-color :pin "b9cd52d1cf927bf7e08582d46ab0bcf1d4fb5048"))
diff --git a/.emacs.d/modules/lang/coq/packages.el b/.emacs.d/modules/lang/coq/packages.el
index 061be85..546c006 100644
--- a/.emacs.d/modules/lang/coq/packages.el
+++ b/.emacs.d/modules/lang/coq/packages.el
@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; lang/coq/packages.el
-(package! proof-general :pin "03e427a8f19485e12b2f95387ed3e0bff7cc944c")
+(package! proof-general :pin "0fdb1ae633baeb9afb07bbd8632bece5976f95f2")
(package! company-coq :pin "b096cb528de1e0bb31cc1059d0bd698b98a6cc6a")
diff --git a/.emacs.d/modules/lang/csharp/packages.el b/.emacs.d/modules/lang/csharp/packages.el
index 99c34d6..78d736d 100644
--- a/.emacs.d/modules/lang/csharp/packages.el
+++ b/.emacs.d/modules/lang/csharp/packages.el
@@ -1,9 +1,9 @@
;; -*- no-byte-compile: t; -*-
;;; lang/csharp/packages.el
-(package! csharp-mode :pin "48851778e0f01a2b0395e054e418a1d8a1687a06")
+(package! csharp-mode :pin "f46d656fc4ceefeb0ed8f5df8baaf0809a7a495d")
(package! csproj-mode :pin "a7f0f4610c976a28c41b9b8299892f88b5d0336c")
(unless (featurep! +lsp)
- (package! omnisharp :pin "e658a18a762438c3e1737612737b05d02a21ca2a"))
+ (package! omnisharp :pin "e26ff8b8d34a247cd4a93be5d62a5f21859b7b57"))
(when (featurep! +unity)
(package! shader-mode :pin "d7dc8d0d6fe8914e8b6d5cf2081ad61e6952359c"))
diff --git a/.emacs.d/modules/lang/data/config.el b/.emacs.d/modules/lang/data/config.el
index da0e723..45ec4f6 100644
--- a/.emacs.d/modules/lang/data/config.el
+++ b/.emacs.d/modules/lang/data/config.el
@@ -4,7 +4,6 @@
:mode "\\.p\\(?:list\\|om\\)\\'" ; plist, pom
:mode "\\.xs\\(?:d\\|lt\\)\\'" ; xslt, xsd
:mode "\\.rss\\'"
- :magic "<\\?xml"
:config
(setq nxml-slash-auto-complete-flag t
nxml-auto-insert-xml-declaration-flag t)
diff --git a/.emacs.d/modules/lang/data/packages.el b/.emacs.d/modules/lang/data/packages.el
index 72a9dae..7b14445 100644
--- a/.emacs.d/modules/lang/data/packages.el
+++ b/.emacs.d/modules/lang/data/packages.el
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/data/packages.el
-(package! csv-mode :pin "635337407c")
+(package! csv-mode :pin "635337407c44c1c3e9f7052afda7e27cf8a05c14")
diff --git a/.emacs.d/modules/lang/emacs-lisp/autoload.el b/.emacs.d/modules/lang/emacs-lisp/autoload.el
index dfa18b6..b7257ad 100644
--- a/.emacs.d/modules/lang/emacs-lisp/autoload.el
+++ b/.emacs.d/modules/lang/emacs-lisp/autoload.el
@@ -274,6 +274,7 @@ library/userland functions"
((let ((symbol (intern-soft (match-string-no-properties 0))))
(and (cond ((null symbol) nil)
((eq symbol t) nil)
+ ((keywordp symbol) nil)
((special-variable-p symbol)
(setq +emacs-lisp--face 'font-lock-variable-name-face))
((and (fboundp symbol)
diff --git a/.emacs.d/modules/lang/emacs-lisp/packages.el b/.emacs.d/modules/lang/emacs-lisp/packages.el
index 1a20000..d541ce6 100644
--- a/.emacs.d/modules/lang/emacs-lisp/packages.el
+++ b/.emacs.d/modules/lang/emacs-lisp/packages.el
@@ -10,9 +10,9 @@
(package! macrostep :pin "424e3734a1ee526a1bd7b5c3cd1d3ef19d184267")
(package! overseer :pin "02d49f582e80e36b4334c9187801c5ecfb027789")
(package! elisp-def :pin "da1f76391ac0d277e3c5758203e0150f6bae0beb")
-(package! elisp-demos :pin "8c9748134f7c017ae1536dbd0b76434afb52e64d")
+(package! elisp-demos :pin "3cca49676894134437273d63a43a003b57fa84ec")
(when (featurep! :checkers syntax)
- (package! flycheck-cask :pin "3457ae553c4feaf8168008f063d78fdde8fb5f94"))
+ (package! flycheck-cask :pin "4b2ede6362ded4a45678dfbef1876faa42edbd58"))
;; Libraries
-(package! buttercup :pin "0e5eae0766a33b5c8997e1477e3914d5c8ba3d29")
+(package! buttercup :pin "cccdedff38208ad4aa989ccdab8e0b059adf3728")
diff --git a/.emacs.d/modules/lang/erlang/packages.el b/.emacs.d/modules/lang/erlang/packages.el
index 862a159..e4267fb 100644
--- a/.emacs.d/modules/lang/erlang/packages.el
+++ b/.emacs.d/modules/lang/erlang/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/erlang/packages.el
-(package! erlang :pin "d9bc7858e985143a433953ba286422511b466a0c")
+(package! erlang :pin "36b4ba407e6f3c70ff88f8e3321622372601f6f6")
(when (featurep! :checkers syntax)
(package! flycheck-rebar3 :pin "3cca1268c54643204b5bae52e3f0bf5bc921018c"))
(unless (featurep! +lsp)
diff --git a/.emacs.d/modules/lang/ess/packages.el b/.emacs.d/modules/lang/ess/packages.el
index 98da135..6eb34a9 100644
--- a/.emacs.d/modules/lang/ess/packages.el
+++ b/.emacs.d/modules/lang/ess/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/ess/packages.el
-(package! ess :pin "1baf8bf1403fe5956a25475b03be0d8f02b3f3ca")
+(package! ess :pin "a694b2627992bda5489c1b4b5bb750c590aa8d85")
(package! ess-R-data-view :pin "d6e98d3ae1e2a2ea39a56eebcdb73e99d29562e9")
(package! polymode :pin "3284ff10017d280ba82f27dc20fe5223b0df709c")
(package! poly-R :pin "51ffeb6ec45dd44eafa4d22ad2d6150cc4b248fc")
diff --git a/.emacs.d/modules/lang/factor/packages.el b/.emacs.d/modules/lang/factor/packages.el
index 8ad9aae..4a99063 100644
--- a/.emacs.d/modules/lang/factor/packages.el
+++ b/.emacs.d/modules/lang/factor/packages.el
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/factor/packages.el
-(package! fuel :pin "3fdb0325ca2a6d80e4111af43b1b166808022020")
+(package! fuel :pin "c6e15bd49e9d37dfe6dce167210fde22031d0d88")
diff --git a/.emacs.d/modules/lang/fsharp/packages.el b/.emacs.d/modules/lang/fsharp/packages.el
index 4346d24..4b54ba0 100644
--- a/.emacs.d/modules/lang/fsharp/packages.el
+++ b/.emacs.d/modules/lang/fsharp/packages.el
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/fsharp/packages.el
-(package! fsharp-mode :pin "3e41fe1391b64eefa66a8a02fce27a12a04e1e01")
+(package! fsharp-mode :pin "68dfc223561d85b5408348ab77bc98b19cbcc0ed")
diff --git a/.emacs.d/modules/lang/go/packages.el b/.emacs.d/modules/lang/go/packages.el
index 2008ca5..6eb9df0 100644
--- a/.emacs.d/modules/lang/go/packages.el
+++ b/.emacs.d/modules/lang/go/packages.el
@@ -2,8 +2,8 @@
;;; lang/go/packages.el
(package! go-eldoc :pin "cbbd2ea1e94a36004432a9ac61414cb5a95a39bd")
-(package! go-guru :pin "734d5232455ffde088021ea5908849ac570e890f")
-(package! go-mode :pin "734d5232455ffde088021ea5908849ac570e890f")
+(package! go-guru :pin "d17d21060b16a77f9ee28ff453e674225acbf1b1")
+(package! go-mode :pin "d17d21060b16a77f9ee28ff453e674225acbf1b1")
(package! gorepl-mode :pin "6a73bf352e8d893f89cad36c958c4db2b5e35e07")
(package! go-tag :pin "59b243f2fa079d9de9d56f6e2d94397e9560310a")
(package! go-gen-test :pin "44c202ac97e728e93a35cee028a0ea8dd6e4292c")
diff --git a/.emacs.d/modules/lang/haskell/+lsp.el b/.emacs.d/modules/lang/haskell/+lsp.el
index da53d1f..f46eb85 100644
--- a/.emacs.d/modules/lang/haskell/+lsp.el
+++ b/.emacs.d/modules/lang/haskell/+lsp.el
@@ -4,10 +4,8 @@
:after lsp-mode
:preface (add-hook 'haskell-mode-local-vars-hook #'lsp!)
:config
- (when IS-MAC
- (setq lsp-haskell-process-path-hie "hie-wrapper"))
(when (featurep! +ghcide)
- (setq lsp-haskell-process-path-hie "ghcide"
- lsp-haskell-process-args-hie nil))
+ (setq lsp-haskell-server-path "ghcide"
+ lsp-haskell-server-args nil))
;; Does some strange indentation if it pastes in the snippet
(setq-hook! 'haskell-mode-hook yas-indent-line 'fixed))
diff --git a/.emacs.d/modules/lang/haskell/README.org b/.emacs.d/modules/lang/haskell/README.org
index 1657796..1963290 100644
--- a/.emacs.d/modules/lang/haskell/README.org
+++ b/.emacs.d/modules/lang/haskell/README.org
@@ -10,7 +10,7 @@
- [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]]
- [[#cabal][Cabal]]
- - [[#lsp-haskell-ide-engine][LSP (haskell-ide-engine)]]
+ - [[#lsp-haskell-language-server][LSP (haskell-language-server)]]
- [[#lsp-ghcide][LSP (ghcide)]]
- [[#stack][Stack]]
- [[#haskell-packages][Haskell packages]]
@@ -43,7 +43,7 @@ Here are a few resources I've found indispensable in my Haskell adventures:
doesn't depend on =stack=, supports both ~cabal~-only and ~stack~ projects,
but lacks eldoc support.
+ =+ghcide= Enables LSP support with ghcide (requires the ~:tools lsp~ module).
-+ =+lsp= Enables LSP support with haskell-ide-engine (requires the ~:tools lsp~
++ =+lsp= Enables LSP support with haskell-language-server (requires the ~:tools lsp~
module).
** Plugins
@@ -59,7 +59,7 @@ Depending on whether you use Dante, haskell-language-server or ghcide, your
dependencies will differ:
+ Dante users need =cabal=, =ghc= and =ghc-mod=
-+ LSP users need the =haskell-ide-engine= LSP server OR =ghcide=
++ LSP users need the =haskell-language-server= LSP server OR =ghcide=
+ All users will need the =hoogle= package
** Cabal
@@ -81,27 +81,15 @@ sudo pacman -S cabal-install ghc
sudo zypper install cabal-install ghc
#+END_SRC
-** LSP (haskell-ide-engine)
+** LSP (haskell-language-server)
You will need =stack= and =git= installed.
-You will find a comprehensive [[https://github.com/haskell/haskell-ide-engine#installation][install guide for haskell-ide-engine on its
-project page]], but here's a TL;DR:
-
-*** MacOS
-haskell-ide-engine must be build and installed manually on MacOS, e.g.
+You will find a comprehensive [[https://github.com/haskell/haskell-language-server#installation][instructions for haskell-language-server on its project page]], but if you are using [[https://www.haskell.org/ghcup/][ghcup]]:
#+BEGIN_SRC bash
-git clone https://github.com/haskell/haskell-ide-engine
-cd haskell-ide-engine
-make
+ghcup install hls
#+END_SRC
-*** Arch Linux
-=haskell-ide-engine-git= is available on the AUR
-
-#+BEGIN_SRC bash
-yay -S haskell-ide-engine-git
-#+END_SRC
** LSP (ghcide)
See https://github.com/digital-asset/ghcide for install instructions.
diff --git a/.emacs.d/modules/lang/haskell/packages.el b/.emacs.d/modules/lang/haskell/packages.el
index 8d2b45d..65b1c23 100644
--- a/.emacs.d/modules/lang/haskell/packages.el
+++ b/.emacs.d/modules/lang/haskell/packages.el
@@ -1,12 +1,12 @@
;; -*- no-byte-compile: t; -*-
;;; lang/haskell/packages.el
-(package! haskell-mode :pin "41683c0e634bb3f54eac8747919a82132e1714fe")
+(package! haskell-mode :pin "e72677668f5fc7cc148008e885a0f256e245dd43")
(when (featurep! +dante)
- (package! dante :pin "c516bc9e8f09e0f928de9a93e82acfb382636f5c")
- (package! attrap :pin "4cf3e4a16255997e7c3c39682a72866a0a37dd4b"))
+ (package! dante :pin "e2acbf6dd37818cbf479c9c3503d8a59192e34af")
+ (package! attrap :pin "9c881548debcf59b8aadda0ef4abca3c9a68dd80"))
(when (or (and (featurep! +lsp)
(not (featurep! :tools lsp +eglot)))
(featurep! +ghcide))
- (package! lsp-haskell :pin "17d7d4c6615b5e6c7442828720730bfeda644af8"))
+ (package! lsp-haskell :pin "4d85cb3693d893ec34d8a0be9794d468a0a28b7b"))
diff --git a/.emacs.d/modules/lang/hy/packages.el b/.emacs.d/modules/lang/hy/packages.el
index 2ea7c36..bbc422a 100644
--- a/.emacs.d/modules/lang/hy/packages.el
+++ b/.emacs.d/modules/lang/hy/packages.el
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/hy/packages.el
-(package! hy-mode :pin "55e84cadbdb63427a8d531992df3990414a26688")
+(package! hy-mode :pin "7256844f24a3b727e252a008d7a142fd3b3921da")
diff --git a/.emacs.d/modules/lang/idris/README.org b/.emacs.d/modules/lang/idris/README.org
index 60f8ef1..e21ac86 100644
--- a/.emacs.d/modules/lang/idris/README.org
+++ b/.emacs.d/modules/lang/idris/README.org
@@ -1,3 +1,30 @@
-#+TITLE: :lang idris
+#+TITLE: lang/idris
+#+DATE: October 6, 2020
+#+SINCE: v2.0.9
+#+STARTUP: inlineimages nofold
-Adds support for the [[https://www.idris-lang.org/][idris]] programming language.
+* Table of Contents :TOC_3:noexport:
+- [[#description][Description]]
+ - [[#maintainers][Maintainers]]
+ - [[#module-flags][Module Flags]]
+ - [[#plugins][Plugins]]
+- [[#prerequisites][Prerequisites]]
+- [[#features][Features]]
+
+* Description
+This module adds rudimentary Idris support.
+** Maintainers
+This module has no dedicated maintainers.
+
+** Module Flags
+This module provides no flags.
+
+** Plugins
+# A list of linked plugins
++ [[https://github.com/idris-hackers/idris-mode/][idris-mode]]
+
+* Prerequisites
+This module has no prerequisites.
+
+* Features
+In addition to =idris-mode= goodness, adds frequently used functions under the localleader key.
diff --git a/.emacs.d/modules/lang/java/+lsp.el b/.emacs.d/modules/lang/java/+lsp.el
index df19dca..7d62383 100644
--- a/.emacs.d/modules/lang/java/+lsp.el
+++ b/.emacs.d/modules/lang/java/+lsp.el
@@ -1,5 +1,5 @@
;;; lang/java/+lsp.el -*- lexical-binding: t; -*-
-;;;###if (featurep! +lsp)
+;;;###if (and (featurep! +lsp) (not (featurep! :tools lsp +eglot)))
(use-package! lsp-java
:after lsp-mode
diff --git a/.emacs.d/modules/lang/java/config.el b/.emacs.d/modules/lang/java/config.el
index f02a829..1a537cb 100644
--- a/.emacs.d/modules/lang/java/config.el
+++ b/.emacs.d/modules/lang/java/config.el
@@ -26,8 +26,9 @@ If the depth is 2, the first two directories are removed: net.lissner.game.")
(add-hook 'java-mode-hook #'rainbow-delimiters-mode)
-(cond ((featurep! +lsp) (load! "+lsp"))
- ((featurep! +meghanada) (load! "+meghanada")))
+(cond ((featurep! +meghanada) (load! "+meghanada"))
+ ((featurep! :tools lsp +eglot))
+ ((featurep! +lsp) (load! "+lsp")))
;;
diff --git a/.emacs.d/modules/lang/java/doctor.el b/.emacs.d/modules/lang/java/doctor.el
index b57601c..4a9372c 100644
--- a/.emacs.d/modules/lang/java/doctor.el
+++ b/.emacs.d/modules/lang/java/doctor.el
@@ -7,3 +7,7 @@
(unless (executable-find "javac")
(warn! "Couldn't find the javac executable, are you sure the JDK is installed?"))
+
+(when (featurep! :editor format)
+ (unless (executable-find "clang-format")
+ (warn! "Couldn't find clang-format. Code formatting will not work.")))
diff --git a/.emacs.d/modules/lang/java/packages.el b/.emacs.d/modules/lang/java/packages.el
index 630fdd7..db5506b 100644
--- a/.emacs.d/modules/lang/java/packages.el
+++ b/.emacs.d/modules/lang/java/packages.el
@@ -13,4 +13,5 @@
(package! company-emacs-eclim :pin "222ddd48fcf0ee01592dec77c58e0cf3f2ea1100")))
(when (featurep! +lsp)
- (package! lsp-java :pin "260016236fa0520b5b6ec7f51ca2086288524cba"))
+ (unless (featurep! :tools lsp +eglot)
+ (package! lsp-java :pin "3f1ed1762fd7cb2fece606df6fc63d35d0a6b835")))
diff --git a/.emacs.d/modules/lang/javascript/packages.el b/.emacs.d/modules/lang/javascript/packages.el
index aec912c..9015d90 100644
--- a/.emacs.d/modules/lang/javascript/packages.el
+++ b/.emacs.d/modules/lang/javascript/packages.el
@@ -3,9 +3,9 @@
;; Major modes
(package! coffee-mode :pin "35a41c7d8233eac0b267d9593e67fb8b6235e134")
-(package! js2-mode :pin "40aab27581279d0fdbfeb9afeb85f39d401a927f")
+(package! js2-mode :pin "ffb70990c1a4d4616034cb810b4ce36953aecb47")
(package! rjsx-mode :pin "0061587a06cdc2579a8d0e90863498d96bf982d8")
-(package! typescript-mode :pin "42a60e5c881082db2ec2c541a5c154308c4863e6")
+(package! typescript-mode :pin "e6f68ab2dd998af0b50ae89a781e1c04539d23d6")
;; Tools
(package! js2-refactor :pin "d4c40b5fc86d3edd7c6a7d83ac86483ee1cb7a28")
@@ -17,6 +17,6 @@
(package! skewer-mode :pin "e5bed351939c92a1f788f78398583c2f83f1bb3c")
;; Programming environment
-(package! tide :pin "fa617f54629dc53a3182251dd8076c9e7ac9effa")
+(package! tide :pin "ac5f070138fbc3657082412c3911d46a1107f39d")
(when (featurep! :tools lookup)
(package! xref-js2 :pin "6f1ed5dae0c2485416196a51f2fa92f32e4b8262"))
diff --git a/.emacs.d/modules/lang/julia/packages.el b/.emacs.d/modules/lang/julia/packages.el
index 922c275..a8b3bc8 100644
--- a/.emacs.d/modules/lang/julia/packages.el
+++ b/.emacs.d/modules/lang/julia/packages.el
@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; lang/julia/packages.el
-(package! julia-mode :pin "b5f5983d2b232c8bba4c5eff75cccdb787c19d98")
+(package! julia-mode :pin "8ea90c7927f6d87a291cfb0216f34dacf43c722e")
(package! julia-repl :pin "d073acb6339e99edf77833f82277afd9a076f16a")
diff --git a/.emacs.d/modules/lang/kotlin/packages.el b/.emacs.d/modules/lang/kotlin/packages.el
index b265b3e..a07fd5a 100644
--- a/.emacs.d/modules/lang/kotlin/packages.el
+++ b/.emacs.d/modules/lang/kotlin/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/kotlin/packages.el
-(package! kotlin-mode :pin "8e6dd578f2b3d77ac33b6384d2bfe1b1f6799a1a")
+(package! kotlin-mode :pin "0e4bafb31d1fc2a0a420a521c2723d5526646c0b")
(when (featurep! :checkers syntax)
(package! flycheck-kotlin :pin "5104ee9a3fdb7f0a0a3d3bcfd8dd3c45a9929310"))
diff --git a/.emacs.d/modules/lang/latex/+viewers.el b/.emacs.d/modules/lang/latex/+viewers.el
index 85a0587..2d87bfe 100644
--- a/.emacs.d/modules/lang/latex/+viewers.el
+++ b/.emacs.d/modules/lang/latex/+viewers.el
@@ -50,6 +50,17 @@
(after! latex-preview-pane
(setq latex-preview-pane-multifile-mode 'auctex)
+ ;; TODO PR this to maintained fork. Original project appears abandoned
+ (defadvice! +latex--dont-reopen-preview-pane-a (orig-fn &rest args)
+ "Once the preview pane has been closed it should not be reopened."
+ :around #'latex-preview-pane-update
+ (letf! (defun init-latex-preview-pane (&rest _)
+ ;; HACK Avoid the function because it tries to delete the current
+ ;; window, but it's already gone, so it ends up deleting the
+ ;; wrong window.
+ (setq-local latex-preview-pane-mode nil))
+ (apply orig-fn args)))
+
(define-key! doc-view-mode-map
"ESC" #'delete-window
"q" #'delete-window
diff --git a/.emacs.d/modules/lang/latex/README.org b/.emacs.d/modules/lang/latex/README.org
index 07e2598..2546eda 100644
--- a/.emacs.d/modules/lang/latex/README.org
+++ b/.emacs.d/modules/lang/latex/README.org
@@ -64,7 +64,7 @@ apt-get install texlive
** Arch Linux
#+BEGIN_SRC sh
-pacman -S texlive
+pacman -S texlive-core
#+END_SRC
** TODO macOS
diff --git a/.emacs.d/modules/lang/latex/autoload.el b/.emacs.d/modules/lang/latex/autoload.el
index cb570e2..99567c1 100644
--- a/.emacs.d/modules/lang/latex/autoload.el
+++ b/.emacs.d/modules/lang/latex/autoload.el
@@ -1,43 +1,44 @@
;;; lang/latex/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
-(defun +latex/LaTeX-indent-item ()
- "Provide proper indentation for LaTeX \"itemize\",\"enumerate\", and
-\"description\" environments.
+(defun +latex-indent-item-fn ()
+ "Indent LaTeX \"itemize\",\"enumerate\", and \"description\" environments.
\"\\item\" is indented `LaTeX-indent-level' spaces relative to the the beginning
of the environment.
-Continuation lines are indented either twice `LaTeX-indent-level', or
-`LaTeX-indent-level-item-continuation' if the latter is bound."
+See `LaTeX-indent-level-item-continuation' for the indentation strategy this
+function uses."
(save-match-data
- (let* ((offset LaTeX-indent-level)
- (contin (or (and (boundp '+latex-indent-level-item-continuation)
- +latex-indent-level-item-continuation)
- (* 4 offset)))
- (re-beg "\\\\begin{")
+ (let* ((re-beg "\\\\begin{")
(re-end "\\\\end{")
- (re-env "\\(itemize\\|\\enumerate\\|description\\)")
+ (re-env "\\(?:itemize\\|\\enumerate\\|description\\)")
(indent (save-excursion
(when (looking-at (concat re-beg re-env "}"))
(end-of-line))
(LaTeX-find-matching-begin)
- (current-column))))
+ (current-column)))
+ (contin (pcase +latex-indent-item-continuation-offset
+ (`auto LaTeX-indent-level)
+ (`align 6)
+ (`nil (- LaTeX-indent-level))
+ (x x))))
(cond ((looking-at (concat re-beg re-env "}"))
(or (save-excursion
(beginning-of-line)
(ignore-errors
(LaTeX-find-matching-begin)
(+ (current-column)
+ LaTeX-indent-level
(if (looking-at (concat re-beg re-env "}"))
contin
- offset))))
+ 0))))
indent))
((looking-at (concat re-end re-env "}"))
indent)
((looking-at "\\\\item")
- (+ offset indent))
- ((+ contin indent))))))
+ (+ LaTeX-indent-level indent))
+ ((+ contin LaTeX-indent-level indent))))))
;;;###autoload
(defun +latex-fold-last-macro-a (&rest _)
diff --git a/.emacs.d/modules/lang/latex/config.el b/.emacs.d/modules/lang/latex/config.el
index 5634cbf..ddc303f 100644
--- a/.emacs.d/modules/lang/latex/config.el
+++ b/.emacs.d/modules/lang/latex/config.el
@@ -1,7 +1,27 @@
;;; lang/latex/config.el -*- lexical-binding: t; -*-
-(defvar +latex-indent-level-item-continuation 4
- "Custom indentation level for items in enumeration-type environments")
+(defconst +latex-indent-item-continuation-offset 'align
+ "Level to indent continuation of enumeration-type environments.
+
+i.e. This affects \\item, \\enumerate, and \\description.
+
+Set this to `align' for:
+
+ \\item lines aligned
+ like this.
+
+Set to `auto' for continuation lines to be offset by `LaTeX-indent-line':
+
+ \\item lines aligned
+ like this, assuming LaTeX-indent-line == 2
+
+Any other fixed integer will be added to `LaTeX-item-indent' and the current
+indentation level.
+
+Set this to `nil' to disable all this behavior.
+
+You'll need to adjust `LaTeX-item-indent' to control indentation of \\item
+itself.")
(defvar +latex-enable-unicode-math nil
"If non-nil, use `company-math-symbols-unicode' backend in LaTeX-mode,
@@ -75,7 +95,10 @@ If no viewers are found, `latex-preview-pane' is used.")
(when (featurep! +lsp)
(add-hook! '(tex-mode-local-vars-hook
latex-mode-local-vars-hook)
- #'lsp!)))
+ #'lsp!))
+ (map! :map LaTeX-mode-map
+ :localleader
+ :desc "View" "v" #'TeX-view))
(use-package! tex-fold
@@ -130,16 +153,17 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for
;; Provide proper indentation for LaTeX "itemize","enumerate", and
;; "description" environments. See
;; http://emacs.stackexchange.com/questions/3083/how-to-indent-items-in-latex-auctex-itemize-environments
+ ;; Set `+latex-indent-item-continuation-offset' to 0 to disable this
(dolist (env '("itemize" "enumerate" "description"))
- (add-to-list 'LaTeX-indent-environment-list `(,env +latex/LaTeX-indent-item)))
+ (add-to-list 'LaTeX-indent-environment-list `(,env +latex-indent-item-fn)))
;; Fix #1849: allow fill-paragraph in itemize/enumerate
(defadvice! +latex--re-indent-itemize-and-enumerate-a (orig-fn &rest args)
:around #'LaTeX-fill-region-as-para-do
(let ((LaTeX-indent-environment-list
(append LaTeX-indent-environment-list
- '(("itemize" +latex/LaTeX-indent-item)
- ("enumerate" +latex/LaTeX-indent-item)))))
+ '(("itemize" +latex-indent-item-fn)
+ ("enumerate" +latex-indent-item-fn)))))
(apply orig-fn args)))
(defadvice! +latex--dont-indent-itemize-and-enumerate-a (orig-fn &rest args)
:around #'LaTeX-fill-region-as-paragraph
diff --git a/.emacs.d/modules/lang/latex/packages.el b/.emacs.d/modules/lang/latex/packages.el
index 0d2264f..f1ae13a 100644
--- a/.emacs.d/modules/lang/latex/packages.el
+++ b/.emacs.d/modules/lang/latex/packages.el
@@ -5,7 +5,7 @@
(package! adaptive-wrap :pin "319db649fb083db3ad07b4c71ee6c9429497043b")
(package! latex-preview-pane :pin "5297668a89996b50b2b62f99cba01cc544dbed2e")
(when (featurep! :editor evil +everywhere)
- (package! evil-tex :pin "06234c9ea4a7ffac91f7b4f3fd683014bb8137af"))
+ (package! evil-tex :pin "a3b6875d4027c675cf490622026a15a12fe1a911"))
;; Optional module features:
diff --git a/.emacs.d/modules/lang/lean/packages.el b/.emacs.d/modules/lang/lean/packages.el
index 0045cdf..b4285dd 100644
--- a/.emacs.d/modules/lang/lean/packages.el
+++ b/.emacs.d/modules/lang/lean/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/lean/packages.el
-(package! lean-mode :pin "6b4377686128d5c2fb55d8fe61b92a9991d40fbd")
+(package! lean-mode :pin "cc1f5fadf8e9ae08aa25828985edc97df04d94a7")
(when (featurep! :completion company)
- (package! company-lean :pin "6b4377686128d5c2fb55d8fe61b92a9991d40fbd"))
+ (package! company-lean :pin "cc1f5fadf8e9ae08aa25828985edc97df04d94a7"))
diff --git a/.emacs.d/modules/lang/lua/packages.el b/.emacs.d/modules/lang/lua/packages.el
index a52388c..fdfd977 100644
--- a/.emacs.d/modules/lang/lua/packages.el
+++ b/.emacs.d/modules/lang/lua/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/lua/packages.el
-(package! lua-mode :pin "35b6e4c20b8b4eaf783ccc8e613d0dd06dbd165c")
+(package! lua-mode :pin "345ebfc1e236d9676e7e9f7364493785e7756348")
(when (featurep! +moonscript)
(package! moonscript :pin "56f90471e2ced2b0a177aed4d8c2f854797e9cc7")
diff --git a/.emacs.d/modules/lang/markdown/config.el b/.emacs.d/modules/lang/markdown/config.el
index 414a683..ef85248 100644
--- a/.emacs.d/modules/lang/markdown/config.el
+++ b/.emacs.d/modules/lang/markdown/config.el
@@ -23,7 +23,6 @@ capture, the end position, and the output buffer.")
markdown-italic-underscore t
markdown-asymmetric-header t
markdown-fontify-code-blocks-natively t
- markdown-gfm-uppercase-checkbox t ; for compat with org-mode
markdown-gfm-additional-languages '("sh")
markdown-make-gfm-checkboxes-buttons t
@@ -45,6 +44,7 @@ capture, the end position, and the output buffer.")
markdown-xhtml-header-content
(concat ""
""
+ ""
""
""))
diff --git a/.emacs.d/modules/lang/markdown/packages.el b/.emacs.d/modules/lang/markdown/packages.el
index baf5dc5..b4f5778 100644
--- a/.emacs.d/modules/lang/markdown/packages.el
+++ b/.emacs.d/modules/lang/markdown/packages.el
@@ -1,12 +1,12 @@
;; -*- no-byte-compile: t; -*-
;;; lang/markdown/packages.el
-(package! markdown-mode :pin "ef2cb4d94af68908a4963afa492afba876725128")
+(package! markdown-mode :pin "152eae2415258141043e559af97d37a72de6c4e5")
(package! markdown-toc :pin "9565eeaa1d26bc0ab83eb65bd30470888f724044")
(package! edit-indirect :pin "bdc8f542fe8430ba55f9a24a7910639d4c434422")
(when (featurep! +grip)
- (package! grip-mode :pin "281ada2c93bac7043c6f665fac065a17d4247bdc"))
+ (package! grip-mode :pin "91da46f29c455c3cd24b2a6b20ff2db2c4ce8cd6"))
(when (featurep! :editor evil +everywhere)
(package! evil-markdown
diff --git a/.emacs.d/modules/lang/nix/config.el b/.emacs.d/modules/lang/nix/config.el
index 43dd95f..3f132ee 100644
--- a/.emacs.d/modules/lang/nix/config.el
+++ b/.emacs.d/modules/lang/nix/config.el
@@ -1,5 +1,12 @@
;;; lang/nix/config.el -*- lexical-binding: t; -*-
+(after! tramp
+ (add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
+
+
+;;
+;;; Plugins
+
(use-package! nix-mode
:interpreter ("\\(?:cached-\\)?nix-shell" . +nix-shell-init-mode)
:mode "\\.nix\\'"
@@ -8,6 +15,11 @@
(set-company-backend! 'nix-mode 'company-nixos-options)
(set-lookup-handlers! 'nix-mode
:documentation '(+nix/lookup-option :async t))
+ (set-popup-rule! "^\\*nixos-options-doc\\*$" :ttl 0 :quit t)
+
+ ;; Fix #3927: disable idle completion because `company-nixos-options' is
+ ;; dreadfully slow. It can still be invoked manually..
+ (setq-hook! 'nix-mode-hook company-idle-delay nil)
(map! :localleader
:map nix-mode-map
diff --git a/.emacs.d/modules/lang/nix/packages.el b/.emacs.d/modules/lang/nix/packages.el
index 732987c..7df8cda 100644
--- a/.emacs.d/modules/lang/nix/packages.el
+++ b/.emacs.d/modules/lang/nix/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/nix/packages.el
-(package! nix-mode :pin "0cf1ea1e0ed330b59f47056d927797e625ba8f53")
+(package! nix-mode :pin "bb0b49e3ac1579d3d811529ed274272c54a9fe3c")
(package! nix-update :pin "fc6c39c2da3fcfa62f4796816c084a6389c8b6e7")
(when (featurep! :completion company)
diff --git a/.emacs.d/modules/lang/ocaml/packages.el b/.emacs.d/modules/lang/ocaml/packages.el
index 922d94b..1c0f9d3 100644
--- a/.emacs.d/modules/lang/ocaml/packages.el
+++ b/.emacs.d/modules/lang/ocaml/packages.el
@@ -4,7 +4,7 @@
(package! tuareg :pin "ccde45bbc292123ec20617f1af7f7e19f7481545")
(unless (featurep! +lsp)
- (package! merlin :pin "3751cbfff75022c396c4ff4dc1729048f80daa4f")
+ (package! merlin :pin "06833e9dab5d5bb5ece68f11eb15797b6cd00933")
(package! merlin-eldoc :pin "db7fab1eddfe34781b7e79694f8923b285698032")
(when (featurep! :checkers syntax)
(package! flycheck-ocaml :pin "8707a7bf545a8639a6a5c600a98d9a2ea1487dc9")))
@@ -17,8 +17,8 @@
(when (featurep! :editor format)
(package! ocamlformat
:recipe (:host github :repo "ocaml-ppx/ocamlformat" :files ("emacs/*.el"))
- :pin "cd0eaa8bbb7df431276cf65741c53eaa913f7807"))
+ :pin "1dec6c3ffb2572b21d43e99653cabdf0406e7eef"))
(package! dune
:recipe (:host github :repo "ocaml/dune" :files ("editor-integration/emacs/*.el"))
- :pin "daea74e5366c8571af8674860a733b0c9e1eaf81")
+ :pin "f967df6f51f690eab612cdeb458926a4bdd41e11")
diff --git a/.emacs.d/modules/lang/org/config.el b/.emacs.d/modules/lang/org/config.el
index 2d6bbf6..e51114c 100644
--- a/.emacs.d/modules/lang/org/config.el
+++ b/.emacs.d/modules/lang/org/config.el
@@ -66,13 +66,13 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
(defun +org-init-org-directory-h ()
(unless org-directory
- (setq org-directory "~/org"))
+ (setq-default org-directory "~/org"))
(setq org-id-locations-file (expand-file-name ".orgids" org-directory)))
(defun +org-init-agenda-h ()
(unless org-agenda-files
- (setq org-agenda-files (list org-directory)))
+ (setq-default org-agenda-files (list org-directory)))
(setq-default
;; Different colors for different priority levels
org-agenda-deadline-faces
@@ -129,19 +129,9 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
org-refile-use-outline-path 'file
org-outline-path-complete-in-steps nil)
+ ;; Previews are rendered with the incorrect background
(plist-put org-format-latex-options :scale 1.5) ; larger previews
- (add-hook! 'doom-load-theme-hook
- (defun +org-refresh-latex-background-h ()
- "Previews are rendered with the incorrect background.
-This forces it to read the background before rendering."
- (plist-put! org-format-latex-options
- :background
- (face-attribute (if-let (remap (cadr (assq 'default face-remapping-alist)))
- (if (keywordp (car-safe remap))
- (plist-get remap :background)
- remap)
- 'default)
- :background nil t))))
+ (plist-put org-format-latex-options :background 'default) ; match the background
;; HACK Face specs fed directly to `org-todo-keyword-faces' don't respect
;; underlying faces like the `org-todo' face does, so we define our own
@@ -407,7 +397,7 @@ relative to `org-directory', unless it is an absolute path."
:config
(unless org-attach-id-dir
;; Centralized attachments directory by default
- (setq org-attach-id-dir (expand-file-name ".attach/" org-directory)))
+ (setq-default org-attach-id-dir (expand-file-name ".attach/" org-directory)))
(after! projectile
(add-to-list 'projectile-globally-ignored-directories org-attach-id-dir)))
@@ -421,6 +411,8 @@ relative to `org-directory', unless it is an absolute path."
"file"
:face (lambda (path)
(if (or (file-remote-p path)
+ ;; filter out network shares on windows (slow)
+ (and IS-WINDOWS (string-prefix-p "//" path))
(file-exists-p path))
'org-link
'error)))
@@ -493,13 +485,14 @@ the exported output (i.e. formatters)."
:around #'org-export-to-file
(if (not org-export-in-background)
(apply orig-fn args)
- (setq org-export-async-init-file (make-temp-file "doom-org-async-export"))
- (with-temp-file org-export-async-init-file
- (prin1 `(progn (setq org-export-async-debug ,debug-on-error
- load-path ',load-path)
- (load ,user-init-file nil t))
- (current-buffer)))
- (apply orig-fn args))))
+ (let ((user-init-file (or org-export-async-init-file user-init-file)))
+ (setq org-export-async-init-file (make-temp-file "doom-org-async-export"))
+ (with-temp-file org-export-async-init-file
+ (prin1 `(progn (setq org-export-async-debug ,debug-on-error
+ load-path ',load-path)
+ (load ,user-init-file nil t))
+ (current-buffer)))
+ (apply orig-fn args)))))
(defun +org-init-habit-h ()
@@ -529,6 +522,14 @@ the exported output (i.e. formatters)."
;; Open directory links in dired
(add-to-list 'org-file-apps '(directory . emacs))
+ ;; Some uses of `org-fix-tags-on-the-fly' occur without a check on
+ ;; `org-auto-align-tags', such as in `org-self-insert-command' and
+ ;; `org-delete-backward-char'.
+ ;; TODO Should be reported/PR'ed upstream
+ (defadvice! +org--respect-org-auto-align-tags-a (&rest _)
+ :before-while #'org-fix-tags-on-the-fly
+ org-auto-align-tags)
+
;; HACK Org is known to use a lot of unicode symbols (and large org files tend
;; to be especially memory hungry). Compounded with
;; `inhibit-compacting-font-caches' being non-nil, org needs more memory
diff --git a/.emacs.d/modules/lang/org/contrib/journal.el b/.emacs.d/modules/lang/org/contrib/journal.el
index 518afff..6f93b05 100644
--- a/.emacs.d/modules/lang/org/contrib/journal.el
+++ b/.emacs.d/modules/lang/org/contrib/journal.el
@@ -38,17 +38,18 @@
;; we wanted to keep visible.
org-journal-find-file #'find-file)
- ;; Setup carryover to include all configured TODO states.
+ ;; Setup carryover to include all configured TODO states. We cannot carry over
+ ;; [ ] keywords because `org-journal-carryover-items's syntax cannot correctly
+ ;; interpret it as anything other than a date.
(setq org-journal-carryover-items "TODO=\"TODO\"|TODO=\"PROJ\"|TODO=\"STRT\"|TODO=\"WAIT\"|TODO=\"HOLD\"")
-
(set-popup-rule! "^\\*Org-journal search" :select t :quit t)
(map! (:map org-journal-mode-map
- :n "]f" #'org-journal-open-next-entry
- :n "[f" #'org-journal-open-previous-entry
- :n "C-n" #'org-journal-open-next-entry
- :n "C-p" #'org-journal-open-previous-entry)
+ :n "]f" #'org-journal-next-entry
+ :n "[f" #'org-journal-previous-entry
+ :n "C-n" #'org-journal-next-entry
+ :n "C-p" #'org-journal-previous-entry)
(:map org-journal-search-mode-map
"C-n" #'org-journal-search-next
"C-p" #'org-journal-search-previous)
@@ -56,8 +57,8 @@
(:map org-journal-mode-map
"c" #'org-journal-new-entry
"d" #'org-journal-new-date-entry
- "n" #'org-journal-open-next-entry
- "p" #'org-journal-open-previous-entry
+ "n" #'org-journal-next-entry
+ "p" #'org-journal-previous-entry
(:prefix "s"
"s" #'org-journal-search
"f" #'org-journal-search-forever
diff --git a/.emacs.d/modules/lang/org/packages.el b/.emacs.d/modules/lang/org/packages.el
index 3193ac3..f18cf52 100644
--- a/.emacs.d/modules/lang/org/packages.el
+++ b/.emacs.d/modules/lang/org/packages.el
@@ -21,7 +21,7 @@
:recipe (:host github
:repo "emacs-straight/org-mode"
:files ("*.el" "lisp/*.el" "contrib/lisp/*.el"))
- :pin "220f2b0d93a6927eb673978c0042a1d4673e86aa"
+ :pin "a88806b554b15461a88a4e00c9e0e338fe59ac37"
;; Prevents built-in Org from sneaking into the byte-compilation of
;; `org-plus-contrib', and inform other packages that `org-mode' satisfies the
;; `org' dependency: https://github.com/raxod502/straight.el/issues/352
@@ -33,21 +33,21 @@
:recipe (:host github :repo "TobiasZawada/org-yt")
:pin "40cc1ac76d741055cbefa13860d9f070a7ade001")
(package! ox-clip :pin "f5eac28734ea33d0b7a3dbe10b777907a91cf9f9")
-(package! toc-org :pin "5deaec41ed0e5c51715737d7f74c5ae1b3c00387")
+(package! toc-org :pin "ff8d49c2c7daab0061250b581d3eebc7265ee267")
(package! org-cliplink :pin "82402cae7e118d67de7328417fd018a18f95fac2")
(when (featurep! :editor evil +everywhere)
(package! evil-org
:recipe (:host github :repo "hlissner/evil-org-mode")
- :pin "2e9c4a295ee6aea7c97c5b1f3892b1c6e28a32d9"))
+ :pin "658dadfe2700f08323ece3efb1af48657b9446df"))
(when (featurep! :tools pdf)
- (package! org-pdftools :pin "8cc15bb8014ed1f047eecc0abd8bf447f86c0505"))
+ (package! org-pdftools :pin "3c2b9a413eb841c781cfb49d8c343bf07aa0ad1f"))
(when (featurep! :tools magit)
(package! orgit :pin "ac9b1a42863a864fde9d225890ef5464bffdc646"))
(when (featurep! +brain)
- (package! org-brain :pin "671db0e08b91c7d2637d765a7afca8b2561275c8"))
+ (package! org-brain :pin "e703ae0f3fbdf488bf7442276a90fcb52e11cde7"))
(when (featurep! +dragndrop)
- (package! org-download :pin "67b3c744f94cf0bf50f7052ce428e95af5a6ff3f"))
+ (package! org-download :pin "42ac361ef5502017e6fc1bceb00333eba90402f4"))
(when (featurep! +gnuplot)
(package! gnuplot :pin "f0001c30010b2899e36d7d89046322467e923088")
(package! gnuplot-mode :pin "601f6392986f0cba332c87678d31ae0d0a496ce7"))
@@ -56,31 +56,29 @@
(when (featurep! +jupyter)
(package! jupyter :pin "360cae2c70ab28c7a7848c0c56473d984f0243e5"))
(when (featurep! +journal)
- (package! org-journal :pin "a2728e25b854af21cea8e8d313714c993eb1c848"))
+ (package! org-journal :pin "fce4fa7e7286280ecd7b42c2f67f0d73048d2c7a"))
(when (featurep! +noter)
(package! org-noter :pin "9ead81d42dd4dd5074782d239b2efddf9b8b7b3d"))
(when (featurep! +pomodoro)
(package! org-pomodoro :pin "aa07c11318f91219336197e62c47bc7a3d090479"))
(when (featurep! +pretty)
- (package! org-superstar :pin "94f35c20f8b84a63defa145e3e6ae735fa33dd5d")
+ (package! org-superstar :pin "7f83636db215bf5a10edbfdf11d12a132864a914")
(package! org-fancy-priorities :pin "819bb993b71e7253cefef7047306ab4e0f9d0a86"))
(when (featurep! +present)
(package! centered-window
:recipe (:host github :repo "anler/centered-window-mode")
:pin "f50859941ab5c7cbeaee410f2d38716252b552ac")
- (package! org-tree-slide :pin "7126a4365072a32898f169ead8fb59265dabc605")
- (package! org-re-reveal :pin "7fe39d5d03ccc75d2811445d25cbbb473b53de76")
+ (package! org-tree-slide :pin "18034c476038adcc1c4697168b8068f4d0ce62fe")
+ (package! org-re-reveal :pin "2035217ae9f9dbd20bf054daa8dabf7c6aa3938d")
(package! revealjs
:recipe (:host github :repo "hakimel/reveal.js"
:files ("css" "dist" "js" "plugin"))
- :pin "15815efe05ca69c35ce66cfdbf93316e1db66ecb"))
+ :pin "0582f57517c97a4c7bfeb58762138c78883f94c5"))
(when (featurep! +roam)
- (package! org-roam :pin "c33867e6bc282ff0a69d4ef4a020db82604039bb")
- (when (featurep! :completion company)
- (package! company-org-roam :pin "1132663bd68022aa7ea005ff53c7c7571890769d")))
+ (package! org-roam :pin "a7cf48ea895ee5aae93ad6d5b4550fb803f6ef8a"))
;;; Babel
-(package! ob-async :pin "80a30b96a007d419ece12c976a81804ede340311")
+(package! ob-async :pin "de1cd6c93242a4cb8773bbe115b7be3d4dd6b97e")
(when (featurep! :lang crystal)
(package! ob-crystal :pin "d84c1adee4b269cdba06a97caedb8071561a09af"))
(when (featurep! :lang go)
@@ -104,6 +102,6 @@
(when (featurep! +hugo)
(package! ox-hugo
:recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t)
- :pin "75b849e9561c4a6022babf6eaf0e037310ded7c1"))
+ :pin "1909c6effe578cf41fcf436da881f1cd430a498a"))
(when (featurep! :lang rst)
(package! ox-rst :pin "99fa790da55b57a3f2e9aa187493ba434a64250e"))
diff --git a/.emacs.d/modules/lang/php/README.org b/.emacs.d/modules/lang/php/README.org
index 22f7b8f..e4a1832 100644
--- a/.emacs.d/modules/lang/php/README.org
+++ b/.emacs.d/modules/lang/php/README.org
@@ -45,9 +45,8 @@ This module has no dedicated maintainers.
** Module Flags
+ =+hack= Add support for the [[https://hacklang.org/][Hack dialect of PHP]] by Facebook.
-+ =+lsp= Enable LSP support through phpactor. Requires the ~:tools lsp~ module
- and the phpactor server to be installed on your system.
-
++ =+lsp= Enable LSP support through phpactor or intelephense. Requires the
+ ~:tools lsp~ module and the [[https://phpactor.readthedocs.io/en/develop/usage/standalone.html][phpactor server]] to be installed on your system.
** Plugins
+ [[https://github.com/tomterl/php-boris][async]]
+ [[https://github.com/tomterl/php-boris][php-boris]]
@@ -65,7 +64,11 @@ This module has no dedicated maintainers.
* Prerequisites
** PHP
-To get started with PHP, you'll need ~php~ (5.3+) and ~composer~:
+To get started with PHP, you'll need ~php~ (5.3+) and ~composer~.
+
+Note for =+lsp=:
+1. In order to make full use of phpactor server, ~php~ (7.3+) is recommended.
+2. If you use intelephense, ~node~ and ~npm~ are needed.
*** MacOS
PHP 5.5 comes prepackaged with newer versions of MacOS. These instructions are provided for reference:
@@ -74,16 +77,26 @@ PHP 5.5 comes prepackaged with newer versions of MacOS. These instructions are p
brew tap homebrew/homebrew-php
brew install php71 # or php53, php54, php55
brew install composer
+
+# If you use intelephense:
+brew install node
+brew install npm
#+END_SRC
*** Arch Linux
#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes")
sudo pacman --needed --noconfirm -S php composer # or php53, php54, php55
+
+# If you use intelephense:
+sudo pacman -S nodejs npm
#+END_SRC
*** openSUSE
#+BEGIN_SRC sh :dir /sudo::
sudo zypper install php-composer
+
+# If you use intelephense:
+sudo zypper install nodejs npm
#+END_SRC
** Dependencies
@@ -108,6 +121,8 @@ Ensure that ~\~/.composer/vendor/bin~ is in ~PATH~:
export PATH="~/.composer/vendor/bin:$PATH"
#+END_SRC
+By the way, if you use intelephense, running =M-x lsp-install-server= and
+choose ~iph~ to install lsp-intelephense.
* TODO Features
# An in-depth list of features, how to use them, and their dependencies.
diff --git a/.emacs.d/modules/lang/php/config.el b/.emacs.d/modules/lang/php/config.el
index aaacd08..8ec078b 100644
--- a/.emacs.d/modules/lang/php/config.el
+++ b/.emacs.d/modules/lang/php/config.el
@@ -39,14 +39,16 @@
:return "return"
:yield "use")
- (if (featurep! +lsp)
- (add-hook 'php-mode-local-vars-hook #'lsp!)
- ;; `+php-company-backend' uses `company-phpactor', `php-extras-company' or
- ;; `company-dabbrev-code', in that order.
- (when +php--company-backends
- (set-company-backend! 'php-mode
- (cons :separate +php--company-backends)
- 'company-dabbrev-code)))
+ (if (not (featurep! +lsp))
+ ;; `+php-company-backend' uses `company-phpactor', `php-extras-company' or
+ ;; `company-dabbrev-code', in that order.
+ (when +php--company-backends
+ (set-company-backend! 'php-mode
+ (cons :separate +php--company-backends)
+ 'company-dabbrev-code))
+ (when (executable-find "php-language-server.php")
+ (setq lsp-clients-php-server-command "php-language-server.php"))
+ (add-hook 'php-mode-local-vars-hook #'lsp!))
;; Use the smallest `sp-max-pair-length' for optimum `smartparens' performance
(setq-hook! 'php-mode-hook sp-max-pair-length 5)
diff --git a/.emacs.d/modules/lang/php/packages.el b/.emacs.d/modules/lang/php/packages.el
index ac714f9..4d0e83b 100644
--- a/.emacs.d/modules/lang/php/packages.el
+++ b/.emacs.d/modules/lang/php/packages.el
@@ -12,7 +12,7 @@
(when (featurep! +hack)
(package! hack-mode
:recipe (:host github :repo "hhvm/hack-mode")
- :pin "572c3b41bed91ea543434c04914a7a0c45fec7c7"))
+ :pin "9079bc333e715a13e57ab366522b15d0307e32cd"))
(unless (featurep! +lsp)
(package! phpactor :pin "62d2372ea55c0c5fb4e77076988472ebb5d85f24")
@@ -23,4 +23,4 @@
(package! php-cs-fixer :pin "95eace9bc0ace128d5166e303c76df2b778c4ddb"))
;; For building php-extras
-(package! async :pin "36a10151e70e956e2f766ed9e65f4a9cfc8479b2")
+(package! async :pin "14f48de586b0977e3470f053b810d77b07ea427a")
diff --git a/.emacs.d/modules/lang/python/config.el b/.emacs.d/modules/lang/python/config.el
index 1254041..f1d23d1 100644
--- a/.emacs.d/modules/lang/python/config.el
+++ b/.emacs.d/modules/lang/python/config.el
@@ -181,18 +181,19 @@
(use-package! python-pytest
- :defer t
+ :commands python-pytest-dispatch
:init
(map! :after python
:localleader
:map python-mode-map
:prefix ("t" . "test")
+ "a" #'python-pytest
"f" #'python-pytest-file-dwim
"F" #'python-pytest-file
"t" #'python-pytest-function-dwim
"T" #'python-pytest-function
"r" #'python-pytest-repeat
- "p" #'python-pytest-popup))
+ "p" #'python-pytest-dispatch))
;;
@@ -266,6 +267,7 @@
"~/.miniconda3"
"~/anaconda3"
"~/miniconda3"
+ "~/opt/miniconda3"
"/usr/bin/anaconda3"
"/usr/local/anaconda3"
"/usr/local/miniconda3"
@@ -286,7 +288,9 @@
(use-package! poetry
:when (featurep! +poetry)
- :after python)
+ :after python
+ :init
+ (add-hook 'python-mode-hook #'poetry-tracking-mode))
(use-package! cython-mode
diff --git a/.emacs.d/modules/lang/python/packages.el b/.emacs.d/modules/lang/python/packages.el
index 8ec454b..6654a7c 100644
--- a/.emacs.d/modules/lang/python/packages.el
+++ b/.emacs.d/modules/lang/python/packages.el
@@ -4,7 +4,7 @@
;; Major modes
(package! pip-requirements :pin "216cd1690f80cc965d4ae47b8753fc185f778ff6")
(when (featurep! +cython)
- (package! cython-mode :pin "fcfd16c7467c31f255287a73f36cf66b32bc096c")
+ (package! cython-mode :pin "ba6cbed8193775c80402bc5112cbaf16246ee6bd")
(when (featurep! :checkers syntax)
(package! flycheck-cython :pin "ecc4454d35ab5317ab66a04406f36f0c1dbc0b76")))
@@ -12,11 +12,11 @@
(when (featurep! +lsp)
(unless (featurep! :tools lsp +eglot)
(if (featurep! +pyright)
- (package! lsp-pyright :pin "9603dda12afaae9c82608c7d3762f98b24b8563f")
- (package! lsp-python-ms :pin "a884a9a4eb1a3acd3d70c776aec5e968bbdc1731"))))
+ (package! lsp-pyright :pin "ccd00074622520acb7a65357a59d8c8426c12a00")
+ (package! lsp-python-ms :pin "a0c56f429e14cc9086fd06aa764e9aab697970d7"))))
;; Programming environment
-(package! anaconda-mode :pin "73266a48fa964d44268c3f3478597e553b9843f1")
+(package! anaconda-mode :pin "39b1cf88c8c459901630d248d6135d8644075648")
(when (featurep! :completion company)
(package! company-anaconda :pin "da1566db41a68809ef7f91ebf2de28118067c89b"))
@@ -24,18 +24,18 @@
(package! pipenv :pin "b730bb509e8b60af9f5ab1f1e6c3458d1d95d789")
(package! pyvenv :pin "861998b6d157ae73b829f02a5a6c8a9118310831")
(when (featurep! +pyenv)
- (package! pyenv-mode :pin "d191037fe62ed8d4fee5888845da3e2c386d8e89"))
+ (package! pyenv-mode :pin "b818901b8eac0e260ced66a6a5acabdbf6f5ba99"))
(when (featurep! +conda)
(package! conda :pin "9f7eea16e9ad3eb34fe3d1cbd9d6162b8046c2f8"))
(when (featurep! +poetry)
- (package! poetry :pin "22a76cdcba180b4689a6b45c97669e3c76cd36ed"))
+ (package! poetry :pin "eb238d9085d884ffb2b7fda985cca1ce81747d58"))
;; Testing frameworks
(package! nose
;; REVIEW Remove this when emacsmirror/epkgs updates its emacsattic index
:recipe (:host github :repo "emacsattic/nose")
:pin "f8528297519eba911696c4e68fa88892de9a7b72")
-(package! python-pytest :pin "fc056faf2757c42641ed94d36a090e56eb13572f")
+(package! python-pytest :pin "a2f88b197cc1c38c6d5a20c46d801f3377c54822")
;; Import managements
(package! pyimport :pin "a6f63cf7ed93f0c0f7c207e6595813966f8852b9")
diff --git a/.emacs.d/modules/lang/racket/packages.el b/.emacs.d/modules/lang/racket/packages.el
index 49e141e..3f75130 100644
--- a/.emacs.d/modules/lang/racket/packages.el
+++ b/.emacs.d/modules/lang/racket/packages.el
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/racket/packages.el
-(package! racket-mode :pin "c55fd70c5e9a371f262486f7d5d8837481388b95")
+(package! racket-mode :pin "0ca8b26e69de2bada6ff7e08d3722d9259b18d3f")
diff --git a/.emacs.d/modules/lang/rest/config.el b/.emacs.d/modules/lang/rest/config.el
index 1445029..a4cbcd7 100644
--- a/.emacs.d/modules/lang/rest/config.el
+++ b/.emacs.d/modules/lang/rest/config.el
@@ -7,7 +7,6 @@
:config
(set-popup-rule! "^\\*HTTP Response" :size 0.4 :quit 'other)
- ;; TODO PR this upstream! This adds imenu support to `restclient-mode'
(setq-hook! 'restclient-mode-hook
imenu-generic-expression '((nil "^[A-Z]+\s+.+" 0)))
diff --git a/.emacs.d/modules/lang/rest/packages.el b/.emacs.d/modules/lang/rest/packages.el
index 9a01fce..c367354 100644
--- a/.emacs.d/modules/lang/rest/packages.el
+++ b/.emacs.d/modules/lang/rest/packages.el
@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; lang/rest/packages.el
-(package! restclient :pin "ac8aad6c6b9e9d918062fa3c89c22c2f4ec48bc3")
+(package! restclient :pin "abc307b965bf6720bc466281f2e204cd5ce37dc3")
(when (featurep! :completion company)
(package! company-restclient :pin "e5a3ec54edb44776738c13e13e34c85b3085277b"))
diff --git a/.emacs.d/modules/lang/ruby/packages.el b/.emacs.d/modules/lang/ruby/packages.el
index 1274b53..3063d81 100644
--- a/.emacs.d/modules/lang/ruby/packages.el
+++ b/.emacs.d/modules/lang/ruby/packages.el
@@ -6,7 +6,7 @@
(package! yard-mode :pin "ba74a47463b0320ae152bd42a7dd7aeecd7b5748")
;; REPL
-(package! inf-ruby :pin "9f0f79ff459c7c417e8931ca020db121e24b45b5")
+(package! inf-ruby :pin "b0124578db09b64902c8ca981b02e74bec92ef36")
(when (featurep! :completion company)
(package! company-inf-ruby :pin "fe3e4863bc971fbb81edad447efad5795ead1b17"))
@@ -22,7 +22,7 @@
(when (featurep! +rbenv)
(package! rbenv :pin "2ea1a5bdc1266caef1dd77700f2c8f42429b03f1"))
(when (featurep! +rvm)
- (package! rvm :pin "081d5173158054c6d0780b9462c74c5697eac1fc"))
+ (package! rvm :pin "6897576bb068b967347fabd7fb15f4ae7ec13462"))
(when (featurep! +chruby)
(package! chruby :pin "42bc6d521f832eca8e2ba210f30d03ad5529788f"))
@@ -32,5 +32,5 @@
;; Rails
(when (featurep! +rails)
- (package! projectile-rails :pin "11980b2bcb99208888856a9b8666ff329b6f0142")
+ (package! projectile-rails :pin "7a256b1b1444fe0001f97095d99252e946dd9777")
(package! inflections :pin "e4f1372cf22e811faca52fc86bdd5d817498a4d8"))
diff --git a/.emacs.d/modules/lang/rust/README.org b/.emacs.d/modules/lang/rust/README.org
index b902012..fa5a5ed 100644
--- a/.emacs.d/modules/lang/rust/README.org
+++ b/.emacs.d/modules/lang/rust/README.org
@@ -17,6 +17,7 @@
- [[#enable-rls-by-default][Enable RLS by default]]
- [[#enabling-elgot-support-for-rust][Enabling elgot support for Rust]]
- [[#troubleshooting][Troubleshooting]]
+ - [[#errore0670-async-fn-is-not-permitted-in-the-2015-edition][error[E0670]: `async fn` is not permitted in the 2015 edition]]
* Description
This module adds support for the Rust language and integration for its tools,
@@ -100,4 +101,11 @@ selected by default. Modify ~rustic-lsp-server~ to change the default:
Doom's =:tools lsp= module has an =+eglot= flag. Enable it and this module will
use eglot instead.
-* TODO Troubleshooting
+* Troubleshooting
+** error[E0670]: `async fn` is not permitted in the 2015 edition
+You may be seeing this error, despite having ~edition = "2018"~ in your
+=Cargo.toml=. This error actually originates from ~rustfmt~, which the LSP
+server tries to invoke on save (if you have ~rustic-format-on-save~ or =:editor
+format= enabled).
+
+To fix this your project needs a =rustfmt.toml= with ~edition = "2018"~ in it.
diff --git a/.emacs.d/modules/lang/rust/packages.el b/.emacs.d/modules/lang/rust/packages.el
index 021d6d6..65f30e3 100644
--- a/.emacs.d/modules/lang/rust/packages.el
+++ b/.emacs.d/modules/lang/rust/packages.el
@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; lang/rust/packages.el
-(package! rustic :pin "75b99201bb4e7a0bd990c006896ad7897f284ca2")
+(package! rustic :pin "7c9d55bdd47e98d2ac12e13dcb12703e6ffe377f")
(unless (featurep! +lsp)
(package! racer :pin "a0bdf778f01e8c4b8a92591447257422ac0b455b"))
diff --git a/.emacs.d/modules/lang/scala/config.el b/.emacs.d/modules/lang/scala/config.el
index 1329f92..10611e6 100644
--- a/.emacs.d/modules/lang/scala/config.el
+++ b/.emacs.d/modules/lang/scala/config.el
@@ -16,6 +16,7 @@
comment-line-break-function #'+scala-comment-indent-new-line-fn)
(when (featurep! +lsp)
+ (setq-hook! 'scala-mode-hook lsp-enable-indentation nil)
(add-hook 'scala-mode-local-vars-hook #'lsp!))
(set-ligatures! 'scala-mode
diff --git a/.emacs.d/modules/lang/scala/packages.el b/.emacs.d/modules/lang/scala/packages.el
index 97149b8..56c9918 100644
--- a/.emacs.d/modules/lang/scala/packages.el
+++ b/.emacs.d/modules/lang/scala/packages.el
@@ -5,4 +5,4 @@
(package! scala-mode :pin "1d08e885b1489313666c7f15a3962432a4f757ee")
(when (featurep! +lsp)
- (package! lsp-metals :pin "039aa72439e3c52cfef4bcde416ba49d88ac0991"))
+ (package! lsp-metals :pin "e42c0b2448847f5de8ae73beae4dd695b560c4e0"))
diff --git a/.emacs.d/modules/lang/scheme/packages.el b/.emacs.d/modules/lang/scheme/packages.el
index 8d2a2b4..1e389a1 100644
--- a/.emacs.d/modules/lang/scheme/packages.el
+++ b/.emacs.d/modules/lang/scheme/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/scheme/packages.el
-(package! geiser :pin "adc5c4ab5ff33cf94cb3fcd892bb9503b5fa2aa2")
+(package! geiser :pin "2accab72e289ed82707237d2013ba034c88ff6c2")
(when (featurep! :checkers syntax)
(package! flycheck-guile
diff --git a/.emacs.d/modules/lang/sh/README.org b/.emacs.d/modules/lang/sh/README.org
index 873d4a2..8ce5159 100644
--- a/.emacs.d/modules/lang/sh/README.org
+++ b/.emacs.d/modules/lang/sh/README.org
@@ -23,10 +23,12 @@ This module adds support for shell scripting languages.
+ =+lsp= Enables LSP support for sh-mode. This requires the =:tools lsp= module
to be enabled and [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]] to be installed on your system.
+ =+fish= Add syntax highlighting for fish script files.
++ =+powershell= Add syntax highlighting for Powershell script files .ps1 and .psm1
** Plugins
+ [[https://github.com/Alexander-Miller/company-shell][company-shell]]* (=:completion company=)
+ [[https://github.com/wwwjfy/emacs-fish][fish-mode]]* (=+fish=)
++ [[https://github.com/jschaf/powershell.el][powershell-mode]]* (=+powershell=)
** Hacks
+ Interpolated variables are fontified.
diff --git a/.emacs.d/modules/lang/sh/config.el b/.emacs.d/modules/lang/sh/config.el
index b6a0b27..944cebb 100755
--- a/.emacs.d/modules/lang/sh/config.el
+++ b/.emacs.d/modules/lang/sh/config.el
@@ -65,7 +65,6 @@
;; autoclose backticks
(sp-local-pair 'sh-mode "`" "`" :unless '(sp-point-before-word-p sp-point-before-same-p)))
-
(use-package! company-shell
:when (featurep! :completion company)
:unless (featurep! +lsp)
@@ -74,8 +73,14 @@
(set-company-backend! 'sh-mode '(company-shell company-files))
(setq company-shell-delete-duplicates t))
-
(use-package! fish-mode
:when (featurep! +fish)
:defer t
:config (set-formatter! 'fish-mode #'fish_indent))
+
+(use-package! powershell
+ :when (featurep! +powershell)
+ :defer t
+ :config
+ (when (featurep! +lsp)
+ (add-hook 'powershell-mode-local-vars-hook #'lsp!)))
diff --git a/.emacs.d/modules/lang/sh/packages.el b/.emacs.d/modules/lang/sh/packages.el
index 02c841a..55e8325 100644
--- a/.emacs.d/modules/lang/sh/packages.el
+++ b/.emacs.d/modules/lang/sh/packages.el
@@ -6,3 +6,6 @@
(when (featurep! +fish)
(package! fish-mode :pin "db257db81058b0b12f788c324c264cc59b9a5bf4"))
+
+(when (featurep! +powershell)
+ (package! powershell :pin "d1b3f95669343399f199f291ef76c09a0ede5e60"))
diff --git a/.emacs.d/modules/lang/swift/packages.el b/.emacs.d/modules/lang/swift/packages.el
index a3b4a18..070599a 100644
--- a/.emacs.d/modules/lang/swift/packages.el
+++ b/.emacs.d/modules/lang/swift/packages.el
@@ -1,10 +1,10 @@
;; -*- no-byte-compile: t; -*-
;;; lang/swift/packages.el
-(package! swift-mode :pin "d266fbd300a1bf1592e1462ead4be093b8b68f98")
+(package! swift-mode :pin "e65a80a659c74d0a62b00dff183a0f7fc8385ce1")
(if (featurep! +lsp)
- (package! lsp-sourcekit :pin "130f7a8f7a37869515953aa7715b3b969c3d7a0b")
+ (package! lsp-sourcekit :pin "948c3a35fd05496a77af2d8935e754db112cb4c3")
(when (featurep! :completion company)
(package! company-sourcekit :pin "abf9bc5a0102eb666d3aa6d6bf22f6efcc852781"))
(when (featurep! :checkers syntax)
diff --git a/.emacs.d/modules/lang/web/+html.el b/.emacs.d/modules/lang/web/+html.el
index 68d7e7b..81f2f88 100644
--- a/.emacs.d/modules/lang/web/+html.el
+++ b/.emacs.d/modules/lang/web/+html.el
@@ -12,6 +12,7 @@
:mode "\\.svelte\\'"
:mode "\\.twig\\'"
:mode "\\.jinja2?\\'"
+ :mode "\\.eco\\'"
:mode "wp-content/themes/.+/.+\\.php\\'"
:mode "templates/.+\\.php\\'"
:init
diff --git a/.emacs.d/modules/lang/web/autoload/html.el b/.emacs.d/modules/lang/web/autoload/html.el
index 7956eff..e605255 100644
--- a/.emacs.d/modules/lang/web/autoload/html.el
+++ b/.emacs.d/modules/lang/web/autoload/html.el
@@ -124,7 +124,8 @@ snippet, or `emmet-expand-yas'/`emmet-expand-line', depending on whether
(call-interactively
(cond ((or (<= (current-column) (current-indentation))
(not (eolp))
- (not (memq (char-after) (list ?\n ?\s ?\t))))
+ (not (or (memq (char-after) (list ?\n ?\s ?\t))
+ (eobp))))
#'indent-for-tab-command)
((bound-and-true-p yas-minor-mode)
(if (yas--templates-for-key-at-point)
diff --git a/.emacs.d/modules/lang/web/packages.el b/.emacs.d/modules/lang/web/packages.el
index 499df9d..6d8492c 100644
--- a/.emacs.d/modules/lang/web/packages.el
+++ b/.emacs.d/modules/lang/web/packages.el
@@ -6,7 +6,7 @@
(package! haml-mode :pin "bf5b6c11b1206759d2b28af48765e04882dd1fc4")
(package! pug-mode :pin "685fd3414d89736bf232f5d1a6bed9e0353b98fe")
(package! slim-mode :pin "3636d18ab1c8b316eea71c4732eb44743e2ded87")
-(when (package! web-mode :pin "60ffd878c4371644bd964f00fea38054645e3e47")
+(when (package! web-mode :pin "b4b0a857088d12cf254f6a2105c58039f29a0d04")
(when (featurep! :completion company)
(package! company-web :pin "f0cc9187c9c34f72ad71f5649a69c74f996bae9a")))
@@ -17,7 +17,7 @@
(package! sass-mode :pin "247a0d4b509f10b28e4687cd8763492bca03599b")
(package! stylus-mode :pin "4dbde92542fc7ad61df38776980905a4721d642e")
(package! sws-mode :pin "4dbde92542fc7ad61df38776980905a4721d642e")
-(package! rainbow-mode :pin "f780ddb18c2a73a666d093f606df92058e5601ea")
+(package! rainbow-mode :pin "fdff98b12e62df7a6dbb009321430c90a47bb89b")
(when (featurep! :completion ivy)
(package! counsel-css :pin "6427dfcbda0d2bbd81db03f9d6b56b06c260ac02"))
(when (featurep! :completion helm)
diff --git a/.emacs.d/modules/term/eshell/config.el b/.emacs.d/modules/term/eshell/config.el
index 778e0a5..b7cf638 100644
--- a/.emacs.d/modules/term/eshell/config.el
+++ b/.emacs.d/modules/term/eshell/config.el
@@ -116,41 +116,38 @@ You should use `set-eshell-alias!' to change this.")
(setq +eshell--default-aliases eshell-command-aliases-list
eshell-command-aliases-list
(append eshell-command-aliases-list
- +eshell-aliases))))
+ +eshell-aliases)))))
- (add-hook! 'eshell-first-time-mode-hook
- (defun +eshell-init-keymap-h ()
- ;; Keys must be bound in a hook because eshell resets its keymap every
- ;; time `eshell-mode' is enabled. Why? It is not for us mere mortals to
- ;; grasp such wisdom.
- (map! :map eshell-mode-map
- :n "RET" #'+eshell/goto-end-of-prompt
- :n [return] #'+eshell/goto-end-of-prompt
- :ni "C-j" #'eshell-next-matching-input-from-input
- :ni "C-k" #'eshell-previous-matching-input-from-input
- :ig "C-d" #'+eshell/quit-or-delete-char
- :i "C-c h" #'evil-window-left
- :i "C-c j" #'evil-window-down
- :i "C-c k" #'evil-window-up
- :i "C-c l" #'evil-window-right
- "C-s" #'+eshell/search-history
- ;; Emacs bindings
- "C-e" #'end-of-line
- ;; Tmux-esque prefix keybinds
- "C-c s" #'+eshell/split-below
- "C-c v" #'+eshell/split-right
- "C-c x" #'+eshell/kill-and-close
- [remap split-window-below] #'+eshell/split-below
- [remap split-window-right] #'+eshell/split-right
- [remap doom/backward-to-bol-or-indent] #'eshell-bol
- [remap doom/backward-kill-to-bol-and-indent] #'eshell-kill-input
- [remap evil-delete-back-to-indentation] #'eshell-kill-input
- [remap evil-window-split] #'+eshell/split-below
- [remap evil-window-vsplit] #'+eshell/split-right
- (:localleader
- "b" #'eshell-insert-buffer-name
- "e" #'eshell-insert-envvar
- "s" #'+eshell/search-history)))))
+
+(after! esh-mode
+ (map! :map eshell-mode-map
+ :n "RET" #'+eshell/goto-end-of-prompt
+ :n [return] #'+eshell/goto-end-of-prompt
+ :ni "C-j" #'eshell-next-matching-input-from-input
+ :ni "C-k" #'eshell-previous-matching-input-from-input
+ :ig "C-d" #'+eshell/quit-or-delete-char
+ :i "C-c h" #'evil-window-left
+ :i "C-c j" #'evil-window-down
+ :i "C-c k" #'evil-window-up
+ :i "C-c l" #'evil-window-right
+ "C-s" #'+eshell/search-history
+ ;; Emacs bindings
+ "C-e" #'end-of-line
+ ;; Tmux-esque prefix keybinds
+ "C-c s" #'+eshell/split-below
+ "C-c v" #'+eshell/split-right
+ "C-c x" #'+eshell/kill-and-close
+ [remap split-window-below] #'+eshell/split-below
+ [remap split-window-right] #'+eshell/split-right
+ [remap doom/backward-to-bol-or-indent] #'eshell-bol
+ [remap doom/backward-kill-to-bol-and-indent] #'eshell-kill-input
+ [remap evil-delete-back-to-indentation] #'eshell-kill-input
+ [remap evil-window-split] #'+eshell/split-below
+ [remap evil-window-vsplit] #'+eshell/split-right
+ (:localleader
+ "b" #'eshell-insert-buffer-name
+ "e" #'eshell-insert-envvar
+ "s" #'+eshell/search-history)))
(use-package! eshell-up
diff --git a/.emacs.d/modules/term/eshell/packages.el b/.emacs.d/modules/term/eshell/packages.el
index 3e6b12b..036e5d3 100644
--- a/.emacs.d/modules/term/eshell/packages.el
+++ b/.emacs.d/modules/term/eshell/packages.el
@@ -10,4 +10,4 @@
(unless IS-WINDOWS
(when (featurep! :completion company)
(package! fish-completion :pin "10384881817b5ae38cf6197a077a663420090d2c")
- (package! bash-completion :pin "d47edb9d4142a22746009c1f680df93a4fefd107")))
+ (package! bash-completion :pin "65e54c6f9c0ffebf94f7c505694bd249b9b53d32")))
diff --git a/.emacs.d/modules/term/vterm/config.el b/.emacs.d/modules/term/vterm/config.el
index e21b7a6..c2faad4 100644
--- a/.emacs.d/modules/term/vterm/config.el
+++ b/.emacs.d/modules/term/vterm/config.el
@@ -13,6 +13,9 @@
;; spawn another if want one.
(setq vterm-kill-buffer-on-exit t)
+ ;; 5000 lines of scrollback, instead of 1000
+ (setq vterm-max-scrollback 5000)
+
(setq-hook! 'vterm-mode-hook
;; Don't prompt about dying processes when killing vterm
confirm-kill-processes nil
diff --git a/.emacs.d/modules/term/vterm/packages.el b/.emacs.d/modules/term/vterm/packages.el
index 00a0204..461ac22 100644
--- a/.emacs.d/modules/term/vterm/packages.el
+++ b/.emacs.d/modules/term/vterm/packages.el
@@ -3,4 +3,4 @@
(package! vterm
:built-in 'prefer
- :pin "797357bf65952337627f2d0c594c2fef600aafae")
+ :pin "01a1332ebb11daca5408f7fcb8a08454b0176e79")
diff --git a/.emacs.d/modules/tools/ansible/packages.el b/.emacs.d/modules/tools/ansible/packages.el
index 3dcf4b9..a5796f6 100644
--- a/.emacs.d/modules/tools/ansible/packages.el
+++ b/.emacs.d/modules/tools/ansible/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; tools/ansible/packages.el
-(package! ansible :recipe (:nonrecursive t) :pin "b5ef59406604bc5027f4d816d90e633feef0149c")
+(package! ansible :recipe (:nonrecursive t) :pin "cf6b8f06c2628357fc2a72ea9817a2c2d0ebf690")
(package! ansible-doc :pin "86083a7bb2ed0468ca64e52076b06441a2f8e9e0")
(package! jinja2-mode :pin "ecd19a40b7832bb00f0a2244e3b0713d0bf3850d")
(package! yaml-mode :pin "68fecb5f0dec712a10c8655df6881392a4613617")
diff --git a/.emacs.d/modules/tools/debugger/config.el b/.emacs.d/modules/tools/debugger/config.el
index e745e08..bccd09b 100644
--- a/.emacs.d/modules/tools/debugger/config.el
+++ b/.emacs.d/modules/tools/debugger/config.el
@@ -24,7 +24,7 @@
((:lang php +lsp) :after php-mode :require dap-php)
((:lang python +lsp) :after python :require dap-python)
((:lang ruby +lsp) :after ruby-mode :require dap-ruby)
- ((:lang rust +lsp) :after rust-mode :require dap-lldb)
+ ((:lang rust +lsp) :after rustic-mode :require dap-lldb)
((:lang javascript +lsp)
:after (js2-mode typescript-mode)
:require (dap-node dap-chrome dap-firefox ,@(if IS-WINDOWS '(dap-edge)))))
@@ -105,11 +105,10 @@
(use-package! dap-mode
:when (and (featurep! +lsp) (not (featurep! :tools lsp +eglot)))
:hook (dap-mode . dap-tooltip-mode)
- :after lsp-mode
- :demand t
- :preface
+ :init
(setq dap-breakpoints-file (concat doom-etc-dir "dap-breakpoints")
dap-utils-extension-path (concat doom-etc-dir "dap-extension/"))
+ (after! lsp-mode (require 'dap-mode))
:config
(pcase-dolist (`((,category . ,modules) :after ,after :require ,libs)
+debugger--dap-alist)
diff --git a/.emacs.d/modules/tools/debugger/packages.el b/.emacs.d/modules/tools/debugger/packages.el
index 24342a8..3a09b12 100644
--- a/.emacs.d/modules/tools/debugger/packages.el
+++ b/.emacs.d/modules/tools/debugger/packages.el
@@ -1,10 +1,10 @@
;; -*- no-byte-compile: t; -*-
;;; tools/debugger/packages.el
-(when (package! realgud :pin "332d13673074bee252ae7819b0898ee7c7895d2e")
+(when (package! realgud :pin "ff660011c82c6af504915833e2d981a547b7ad58")
(when (featurep! :lang javascript)
(package! realgud-trepan-ni :pin "6e38cf838c7b47b5f1353d00901b939ffa36d707")))
(when (featurep! +lsp)
- (package! dap-mode :pin "4b185431b2b0cdec86ecfbc679f45d21fbf9fe59")
- (package! posframe :pin "7b92a54e588889a74d36d51167e067676db7be8a"))
+ (package! dap-mode :pin "400ec52d32adc7dc0d736dc42ed1bacb8fd7ae14")
+ (package! posframe :pin "a99da9f40fa864910fd0234bb9e1b6fa52e699c3"))
diff --git a/.emacs.d/modules/tools/direnv/README.org b/.emacs.d/modules/tools/direnv/README.org
index 53b1a79..b968354 100644
--- a/.emacs.d/modules/tools/direnv/README.org
+++ b/.emacs.d/modules/tools/direnv/README.org
@@ -53,8 +53,10 @@ brew install direnv
#+END_SRC
** Arch Linux
+~direnv~ is available on the AUR
+
#+BEGIN_SRC bash
-sudo pacman -S direnv
+yay -S direnv
#+END_SRC
** NixOS
diff --git a/.emacs.d/modules/tools/direnv/packages.el b/.emacs.d/modules/tools/direnv/packages.el
index ea30e39..50c00b1 100644
--- a/.emacs.d/modules/tools/direnv/packages.el
+++ b/.emacs.d/modules/tools/direnv/packages.el
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; tools/direnv/packages.el
-(package! envrc :pin "1dc5aad14d2c27211c7c288d2d9dffeb2e27cb2d")
+(package! envrc :pin "da8e306b0a562af05c5e990aced968d7fda06296")
diff --git a/.emacs.d/modules/tools/editorconfig/packages.el b/.emacs.d/modules/tools/editorconfig/packages.el
index 1f83b1d..bcf03c0 100644
--- a/.emacs.d/modules/tools/editorconfig/packages.el
+++ b/.emacs.d/modules/tools/editorconfig/packages.el
@@ -3,4 +3,4 @@
(package! editorconfig
:recipe (:nonrecursive t)
- :pin "9bc1343ce8bd2cc84bf04b58a053b7ec700244c0")
+ :pin "a6c70da2cf3a3a2aac2b204828f1acd243cd7529")
diff --git a/.emacs.d/modules/tools/ein/packages.el b/.emacs.d/modules/tools/ein/packages.el
index 2d92983..8067cb1 100644
--- a/.emacs.d/modules/tools/ein/packages.el
+++ b/.emacs.d/modules/tools/ein/packages.el
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; tools/ein/packages.el
-(package! ein :pin "99a4718f50538a439a2a3f2011d1aa97246e259b")
+(package! ein :pin "1bfb80c8bbe4ace10c4b430c493149efa4aabbbd")
diff --git a/.emacs.d/modules/tools/eval/packages.el b/.emacs.d/modules/tools/eval/packages.el
index 51094f2..a7a6b66 100644
--- a/.emacs.d/modules/tools/eval/packages.el
+++ b/.emacs.d/modules/tools/eval/packages.el
@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; tools/eval/packages.el
-(package! quickrun :pin "ce7383c53215077f7e1d258d389cf8731309fbe9")
+(package! quickrun :pin "005d269ce5080a127b44e0d29efe2f2e9852d0cc")
(when (featurep! +overlay)
(package! eros :pin "dd8910279226259e100dab798b073a52f9b4233a"))
diff --git a/.emacs.d/modules/tools/lookup/autoload/lookup.el b/.emacs.d/modules/tools/lookup/autoload/lookup.el
index 5d953bf..dc5b948 100644
--- a/.emacs.d/modules/tools/lookup/autoload/lookup.el
+++ b/.emacs.d/modules/tools/lookup/autoload/lookup.el
@@ -180,6 +180,7 @@ This can be passed nil as its second argument to unset handlers for MODES. e.g.
;;
;;; Lookup backends
+(autoload 'xref--show-defs "xref")
(defun +lookup--xref-show (fn identifier &optional show-fn)
(let ((xrefs (funcall fn
(xref-find-backend)
@@ -239,14 +240,39 @@ neither is available. These require ripgrep to be installed."
(defun +lookup-evil-goto-definition-backend-fn (_identifier)
"Uses `evil-goto-definition' to conduct a text search for IDENTIFIER in the
current buffer."
- (and (fboundp 'evil-goto-definition)
- (ignore-errors
- (cl-destructuring-bind (beg . end)
- (bounds-of-thing-at-point 'symbol)
- (evil-goto-definition)
- (let ((pt (point)))
- (not (and (>= pt beg)
- (< pt end))))))))
+ (when (fboundp 'evil-goto-definition)
+ (ignore-errors
+ (cl-destructuring-bind (beg . end)
+ (bounds-of-thing-at-point 'symbol)
+ (evil-goto-definition)
+ (let ((pt (point)))
+ (not (and (>= pt beg)
+ (< pt end))))))))
+
+(defun +lookup-ffap-backend-fn (_identifier)
+ "Uses `find-file-at-point' to read file at point."
+ (require 'ffap)
+ (when (ffap-guesser)
+ (find-file-at-point)))
+
+(defun +lookup-bug-reference-backend-fn (_identifier)
+ "Searches for a bug reference in user/repo#123 or #123 format and opens it in
+the browser."
+ (require 'bug-reference)
+ (let ((bug-reference-url-format bug-reference-url-format)
+ (bug-reference-bug-regexp bug-reference-bug-regexp)
+ (bug-reference-mode (derived-mode-p 'text-mode 'conf-mode))
+ (bug-reference-prog-mode (derived-mode-p 'prog-mode)))
+ (bug-reference--run-auto-setup)
+ (unwind-protect
+ (catch 'found
+ (bug-reference-fontify (line-beginning-position) (line-end-position))
+ (dolist (o (overlays-at (point)))
+ ;; It should only be possible to have one URL overlay.
+ (when-let (url (overlay-get o 'bug-reference-url))
+ (browse-url url)
+ (throw 'found t))))
+ (bug-reference-unfontify (line-beginning-position) (line-end-position)))))
;;
@@ -317,22 +343,14 @@ for the current mode/buffer (if any), then falls back to the backends in
(defvar ffap-file-finder)
;;;###autoload
-(defun +lookup/file (path)
+(defun +lookup/file (&optional path)
"Figure out PATH from whatever is at point and open it.
Each function in `+lookup-file-functions' is tried until one changes the point
or the current buffer.
Otherwise, falls back on `find-file-at-point'."
- (interactive
- (progn
- (require 'ffap)
- (list
- (or (ffap-guesser)
- (ffap-read-file-or-url
- (if ffap-url-regexp "Find file or URL: " "Find file: ")
- (doom-thing-at-point-or-region))))))
- (require 'ffap)
+ (interactive)
(cond ((and path
buffer-file-name
(file-equal-p path buffer-file-name)
diff --git a/.emacs.d/modules/tools/lookup/config.el b/.emacs.d/modules/tools/lookup/config.el
index 5bdfbf5..5dc20b3 100644
--- a/.emacs.d/modules/tools/lookup/config.el
+++ b/.emacs.d/modules/tools/lookup/config.el
@@ -97,7 +97,9 @@ If the argument is interactive (satisfies `commandp'), it is called with
argument: the identifier at point. See `set-lookup-handlers!' about adding to
this list.")
-(defvar +lookup-file-functions ()
+(defvar +lookup-file-functions
+ '(+lookup-ffap-backend-fn
+ +lookup-bug-reference-backend-fn)
"Function for `+lookup/file' to try, before restoring to `find-file-at-point'.
Stops at the first function to return non-nil or change the current
window/point.
@@ -153,8 +155,10 @@ Dictionary.app behind the scenes to get definitions.")
(let ((xref-backend-functions '(etags--xref-backend t)))
(funcall orig-fn)))
- ;; Use `better-jumper' instead of xref's marker stack
- (advice-add #'xref-push-marker-stack :around #'doom-set-jump-a)
+ ;; This integration is already built into evil
+ (unless (featurep! :editor evil)
+ ;; Use `better-jumper' instead of xref's marker stack
+ (advice-add #'xref-push-marker-stack :around #'doom-set-jump-a))
(use-package! ivy-xref
:when (featurep! :completion ivy)
diff --git a/.emacs.d/modules/tools/lookup/packages.el b/.emacs.d/modules/tools/lookup/packages.el
index 90b4686..314a7b5 100644
--- a/.emacs.d/modules/tools/lookup/packages.el
+++ b/.emacs.d/modules/tools/lookup/packages.el
@@ -8,11 +8,11 @@
(package! helm))
;;
-(package! dumb-jump :pin "0d74b2f2aa834b602e91d99e9cb23197a389f042")
+(package! dumb-jump :pin "fbbe6b0c3010bea8a6eaac2297080137319160e2")
(when (featurep! :completion ivy)
(package! ivy-xref :pin "3d4c35fe2b243d948d8fe02a1f0d76a249d63de9"))
(when (featurep! :completion helm)
- (package! helm-xref :pin "6b4a8bd91f5eaf82f51bd31b03f6587387fe6983"))
+ (package! helm-xref :pin "23f1174cfca7667d95828dcd388c655a4a9c877d"))
;; For dictionary and online lookup
(package! request :pin "d02d1347ffdf138cffd380cbeac62ac8732036ef")
@@ -27,7 +27,7 @@
(when (featurep! +dictionary)
(if IS-MAC
(package! osx-dictionary :pin "1b79ff64c72485cb078db9ab7ee3256b11a99f4b")
- (package! define-word :pin "08c71b1ff4fd07bf0c78d1fcf77efeaafc8f7443")
+ (package! define-word :pin "3af6825c5f3bf4f6176a3f5b2e499616c65e2fe0")
(package! powerthesaurus :pin "93036d3b111925ebc34f747ff846cb0b8669b92e")
(when (featurep! +offline)
(package! wordnut :pin "feac531404041855312c1a046bde7ea18c674915")
diff --git a/.emacs.d/modules/tools/lsp/README.org b/.emacs.d/modules/tools/lsp/README.org
index 3fcd9ea..c6c92af 100644
--- a/.emacs.d/modules/tools/lsp/README.org
+++ b/.emacs.d/modules/tools/lsp/README.org
@@ -7,7 +7,6 @@
- [[#description][Description]]
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- - [[#hacks][Hacks]]
- [[#prerequisites][Prerequisites]]
- [[#features][Features]]
- [[#lsp-powered-project-search][LSP-powered project search]]
@@ -43,7 +42,7 @@ As of this writing, this is the state of LSP support in Doom Emacs:
| [[../../lang/elixir/README.org][:lang elixir]] | elixir-mode | elixir-ls |
| [[../../lang/fsharp/README.org][:lang fsharp]] | fsharp-mode | Mono, .NET core |
| [[../../lang/go/README.org][:lang go]] | go-mode | go-langserver |
-| [[../../lang/haskell/README.org][:lang haskell]] | haskell-mode | haskell-ide-engine |
+| [[../../lang/haskell/README.org][:lang haskell]] | haskell-mode | haskell-language-server |
| [[../../lang/java/README.org][:lang java]] | java-mode | lsp-java |
| [[../../lang/javascript/README.org][:lang javascript]] | js2-mode, rjsx-mode, typescript-mode | typescript-language-server |
| [[../../lang/ocaml/README.org][:lang ocaml]] | tuareg-mode | ocaml-language-server |
@@ -70,23 +69,17 @@ As of this writing, this is the state of LSP support in Doom Emacs:
+ [[https://github.com/emacs-lsp/helm-lsp][helm-lsp]]
+ [[https://github.com/joaotavora/eglot][eglot]]
-** Hacks
-+ ~lsp-mode~ has been modified not to automatically install missing LSP servers.
- This is done to adhere to our "Your system, your rules" mantra, which insist
- that it is better etiquette to let the user decide when their development
- environment is modified. Use ~M-x lsp-install-server~ to install LSP servers
- manually.
-
* Prerequisites
-This module has no direct prerequisites, but major-modes require you to install
-language servers.
+This module has no direct prerequisites, but different languages will need
+different language servers, which =lsp-mode= will prompt you to auto-install.
+=eglot= will not.
-You'll find a table that lists available language servers and how to install
-them [[https://github.com/emacs-lsp/lsp-mode#supported-languages][in the lsp-mode project README]]. The documentation of the module for your
+A table that lists available language servers and how to install them can be
+found [[https://emacs-lsp.github.io/lsp-mode/page/languages/][on the lsp-mode project README]]. The documentation of the module for your
targeted language will contain brief instructions as well.
-For eglot users, you can see the list of [[https://github.com/joaotavora/eglot/blob/master/README.md#connecting-to-a-server][default servers supported in the README]].
-There is also instructions to add another server easily.
+For eglot users, a list of [[https://github.com/joaotavora/eglot/blob/master/README.md#connecting-to-a-server][default servers supported is on Eglot's README]],
+including instructions to register your own.
* TODO Features
** LSP-powered project search
diff --git a/.emacs.d/modules/tools/lsp/config.el b/.emacs.d/modules/tools/lsp/config.el
index 0750b39..c105ef3 100644
--- a/.emacs.d/modules/tools/lsp/config.el
+++ b/.emacs.d/modules/tools/lsp/config.el
@@ -12,19 +12,39 @@ killing and opening many LSP/eglot-powered buffers.")
;;
;;; Common
-(defun +lsp-init-optimizations-h ()
- "Deploys universal optimizations for `lsp-mode' and `eglot'."
- (when (or (bound-and-true-p eglot--managed-mode)
- (bound-and-true-p lsp-mode))
- ;; `read-process-output-max' is only available on recent development
- ;; builds of Emacs 27 and above.
- (setq-local read-process-output-max (* 1024 1024))
- ;; REVIEW LSP causes a lot of allocations, with or without Emacs 27+'s
- ;; native JSON library, so we up the GC threshold to stave off
- ;; GC-induced slowdowns/freezes. Doom uses `gcmh' to enforce its GC
- ;; strategy, so we modify its variables rather than
- ;; `gc-cons-threshold' directly.
- (setq-local gcmh-high-cons-threshold (* 2 (default-value 'gcmh-high-cons-threshold)))))
+(defvar +lsp--default-read-process-output-max nil)
+(defvar +lsp--default-gcmh-high-cons-threshold nil)
+(defvar +lsp--optimization-init-p nil)
+
+(define-minor-mode +lsp-optimization-mode
+ "Deploys universal GC and IPC optimizations for `lsp-mode' and `eglot'."
+ :global t
+ :init-value nil
+ (if (not +lsp-optimization-mode)
+ (setq-default read-process-output-max +lsp--default-read-process-output-max
+ gcmh-high-cons-threshold +lsp--default-gcmh-high-cons-threshold
+ +lsp--optimization-init-p nil)
+ ;; Only apply these settings once!
+ (unless +lsp--optimization-init-p
+ (setq +lsp--default-read-process-output-max
+ ;; DEPRECATED Remove check when 26 support is dropped
+ (if (boundp 'read-process-output-max)
+ (default-value 'read-process-output-max))
+ +lsp--default-gcmh-high-cons-threshold
+ (default-value 'gcmh-high-cons-threshold))
+ ;; `read-process-output-max' is only available on recent development
+ ;; builds of Emacs 27 and above.
+ (setq-default read-process-output-max (* 1024 1024))
+ ;; REVIEW LSP causes a lot of allocations, with or without Emacs 27+'s
+ ;; native JSON library, so we up the GC threshold to stave off
+ ;; GC-induced slowdowns/freezes. Doom uses `gcmh' to enforce its
+ ;; GC strategy, so we modify its variables rather than
+ ;; `gc-cons-threshold' directly.
+ (setq-default gcmh-high-cons-threshold (* 2 +lsp--default-gcmh-high-cons-threshold))
+ (unless (bound-and-true-p gcmh-mode)
+ (gcmh-mode +1))
+ (gcmh-set-high-threshold)
+ (setq +lsp--optimization-init-p t))))
;;
diff --git a/.emacs.d/modules/tools/lsp/packages.el b/.emacs.d/modules/tools/lsp/packages.el
index c7274c2..09d3777 100644
--- a/.emacs.d/modules/tools/lsp/packages.el
+++ b/.emacs.d/modules/tools/lsp/packages.el
@@ -3,11 +3,11 @@
(if (featurep! +eglot)
(progn
- (package! eglot :pin "5f873d288e1c5434c1640bef03555ed056cb0d35")
+ (package! eglot :pin "61b71ea769fa14887465517f70832861f7052816")
(package! project :pin "da0333a697b18f0a863c1b1523d2fc7991b31174"))
- (package! lsp-mode :pin "4145a70ce1d4bfb2463606ba34c5965080b080d9")
- (package! lsp-ui :pin "c39ae3713f95a2d86e11fd1f77e89a671d08d18a")
+ (package! lsp-mode :pin "fb4c35c6978415c4cf52f85230b527d311989063")
+ (package! lsp-ui :pin "25552041f5af110c282fe8a2c714dec0f7a2320e")
(when (featurep! :completion ivy)
- (package! lsp-ivy :pin "4cdb739fc2bc47f7d4dcad824f9240c70c4cb37d"))
+ (package! lsp-ivy :pin "20cac6296e5038b7131ee6f34a96635f1d30fe3c"))
(when (featurep! :completion helm)
- (package! helm-lsp :pin "4263c967267b0579956b3b12ef32878a9ea80d97")))
+ (package! helm-lsp :pin "fc09aa0903ee6abe4955e9a6062dcea667ebff5a")))
diff --git a/.emacs.d/modules/tools/magit/autoload.el b/.emacs.d/modules/tools/magit/autoload.el
index 85c8d7e..881a58d 100644
--- a/.emacs.d/modules/tools/magit/autoload.el
+++ b/.emacs.d/modules/tools/magit/autoload.el
@@ -66,7 +66,8 @@ window that already exists in that direction. It will split otherwise."
+magit-open-windows-in-direction))
(origin-window (selected-window)))
(if-let (window (window-in-direction direction))
- (select-window window)
+ (unless magit-display-buffer-noselect
+ (select-window window))
(if-let (window (and (not (one-window-p))
(window-in-direction
(pcase direction
@@ -74,16 +75,19 @@ window that already exists in that direction. It will split otherwise."
(`left 'right)
((or `up `above) 'down)
((or `down `below) 'up)))))
- (select-window window)
+ (unless magit-display-buffer-noselect
+ (select-window window))
(let ((window (split-window nil nil direction)))
- (when (memq direction '(right down below))
+ (when (and (not magit-display-buffer-noselect)
+ (memq direction '(right down below)))
(select-window window))
(display-buffer-record-window 'reuse window buffer)
(set-window-buffer window buffer)
(set-window-parameter window 'quit-restore (list 'window 'window origin-window buffer))
(set-window-prev-buffers window nil))))
- (switch-to-buffer buffer t t)
- (selected-window)))
+ (unless magit-display-buffer-noselect
+ (switch-to-buffer buffer t t)
+ (selected-window))))
;;
diff --git a/.emacs.d/modules/tools/magit/config.el b/.emacs.d/modules/tools/magit/config.el
index fac4acf..65b7edc 100644
--- a/.emacs.d/modules/tools/magit/config.el
+++ b/.emacs.d/modules/tools/magit/config.el
@@ -112,7 +112,7 @@ For example, diffs and log buffers. Accepts `left', `right', `up', and `down'.")
;; git executable isn't in the exact same location.
(add-hook! 'magit-status-mode-hook
(defun +magit-optimize-process-calls-h ()
- (when-let (path (executable-find magit-git-executable))
+ (when-let (path (executable-find magit-git-executable t))
(setq-local magit-git-executable path)))))
diff --git a/.emacs.d/modules/tools/magit/packages.el b/.emacs.d/modules/tools/magit/packages.el
index 8c66daf..37e434b 100644
--- a/.emacs.d/modules/tools/magit/packages.el
+++ b/.emacs.d/modules/tools/magit/packages.el
@@ -1,11 +1,11 @@
;; -*- no-byte-compile: t; -*-
;;; tools/magit/packages.el
-(when (package! magit :pin "321214c3a2dd10fdf672ba96bd00703a51094bbe")
+(when (package! magit :pin "2fb3bf782ccf5652b98f8de989f014749473eacf")
(when (featurep! +forge)
- (package! forge :pin "feee7e2fce3f87f7aa113c5edcb1896127ee9d12"))
+ (package! forge :pin "031e4f06b2bff66375e53ea96f8eb3dfbdf391d9"))
(package! magit-gitflow :pin "cc41b561ec6eea947fe9a176349fb4f771ed865b")
(package! magit-todos :pin "a0e5d1f3c7dfcb4f18c1b0d57f1746a4872df5c6")
- (package! github-review :pin "fab440aeae4fbf6a8192fd11795052e9eb5d27d1")
+ (package! github-review :pin "e2123cce391bfd9d947ba2934b5d655ab1e90b6d")
(when (featurep! :editor evil +everywhere)
(package! evil-magit :pin "88dc26ce59dbf4acb4e2891c79c4bd329553ba56")))
diff --git a/.emacs.d/modules/tools/upload/packages.el b/.emacs.d/modules/tools/upload/packages.el
index d26bd93..fa1e28a 100644
--- a/.emacs.d/modules/tools/upload/packages.el
+++ b/.emacs.d/modules/tools/upload/packages.el
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; tools/upload/packages.el
-(package! ssh-deploy :pin "1bb2f821d4a78d483c147759348a29531486cdc4")
+(package! ssh-deploy :pin "cc91b56a7f07ae63fcf78a040001491d040ec9ba")
diff --git a/.emacs.d/modules/ui/doom-quit/config.el b/.emacs.d/modules/ui/doom-quit/config.el
index 8c4d86a..c3e4e75 100644
--- a/.emacs.d/modules/ui/doom-quit/config.el
+++ b/.emacs.d/modules/ui/doom-quit/config.el
@@ -14,7 +14,7 @@
"Emacs will remember that."
"Emacs, Emacs never changes."
"Hey! Hey, M-x listen!"
- "I'm the man who's going to burn your house down! With lemons!"
+ "I'm the man who's going to burn your house down! With the lemons!"
"It's not like I'll miss you or anything, b-baka!"
"Okay, look. We've both said a lot of things you're going to regret..."
"Wake up, Mr. Stallman. Wake up and smell the ashes."
diff --git a/.emacs.d/modules/ui/doom/config.el b/.emacs.d/modules/ui/doom/config.el
index 9805743..61c5958 100644
--- a/.emacs.d/modules/ui/doom/config.el
+++ b/.emacs.d/modules/ui/doom/config.el
@@ -62,7 +62,7 @@
;; HACK The fringe cannot have a buffer-local remapping on Emacs <= 26, so
;; we jump through hoops to reset it (globally) whenever it is likely
;; that the fringe will have lost its background color.
- (add-hook! '(doom-load-theme-hook doom-reload-hook) :append
+ (add-hook! '(doom-load-theme-hook doom-after-reload-hook) :append
#'solaire-mode-reset)
;; fringe can become unstyled when deleting or focusing frames
diff --git a/.emacs.d/modules/ui/doom/packages.el b/.emacs.d/modules/ui/doom/packages.el
index 7d74eb6..7dfd901 100644
--- a/.emacs.d/modules/ui/doom/packages.el
+++ b/.emacs.d/modules/ui/doom/packages.el
@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; ui/doom/packages.el
-(package! doom-themes :pin "24023de3c80c9f3afc3d012762d1ef0f8dbd326e")
-(package! solaire-mode :pin "cd63b675140232f399e7733d7ce95a0b931b1058")
+(package! doom-themes :pin "5c12834e724869993e1fa62cb3be29fda994a0d6")
+(package! solaire-mode :pin "c697925f7e03819a4046a233f6ab31664aca9d6a")
diff --git a/.emacs.d/modules/ui/fill-column/autoload.el b/.emacs.d/modules/ui/fill-column/autoload.el
index 2aede46..a5cc288 100644
--- a/.emacs.d/modules/ui/fill-column/autoload.el
+++ b/.emacs.d/modules/ui/fill-column/autoload.el
@@ -1,9 +1,15 @@
;;; ui/fill-column/autoload.el -*- lexical-binding: t; -*-
-;; DEPRECATED Replaced by `display-fill-column-indicator-mode' in Emacs 27+
+;;;###autoload
+(defalias '+fill-column/toggle
+ (if (fboundp 'display-fill-column-indicator-mode)
+ #'display-fill-column-indicator-mode ; Emacs 27 only
+ (autoload 'hl-fill-column-mode "hl-fill-column" nil t)
+ #'hl-fill-column-mode))
-;;;###autoload (autoload 'hl-fill-column-mode "hl-fill-column" nil t)
+;;;###autoload
+(defalias '+fill-column-enable-h #'+fill-column/toggle)
;;;###autoload
(add-hook! '(text-mode-hook prog-mode-hook conf-mode-hook)
- #'hl-fill-column-mode)
+ #'+fill-column-enable-h)
diff --git a/.emacs.d/modules/ui/fill-column/packages.el b/.emacs.d/modules/ui/fill-column/packages.el
index 83e03b7..12420f9 100644
--- a/.emacs.d/modules/ui/fill-column/packages.el
+++ b/.emacs.d/modules/ui/fill-column/packages.el
@@ -1,4 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; ui/fill-column/packages.el
-(package! hl-fill-column :pin "5782a91ba0182c4e562fa0db6379ff9dd472856b")
+;; `hl-fill-column' is only used on Emacs versions before 27
+(unless (fboundp 'display-fill-column-indicator-mode)
+ (package! hl-fill-column :pin "5782a91ba0182c4e562fa0db6379ff9dd472856b"))
diff --git a/.emacs.d/modules/ui/hl-todo/README.org b/.emacs.d/modules/ui/hl-todo/README.org
index 1898ce0..8f8d5e0 100644
--- a/.emacs.d/modules/ui/hl-todo/README.org
+++ b/.emacs.d/modules/ui/hl-todo/README.org
@@ -23,7 +23,7 @@ major-modes.
This module provides no flags
** Plugins
-+ [[https://github.com/tarius/hl-todo][hl-todo]]
++ [[https://github.com/tarsius/hl-todo][hl-todo]]
* Prerequisites
This module has no prerequisites
diff --git a/.emacs.d/modules/ui/indent-guides/config.el b/.emacs.d/modules/ui/indent-guides/config.el
index 3beed50..e6b1cdf 100644
--- a/.emacs.d/modules/ui/indent-guides/config.el
+++ b/.emacs.d/modules/ui/indent-guides/config.el
@@ -5,7 +5,7 @@
:init
(setq highlight-indent-guides-method 'character)
:config
- (defun +indent-guides-init-faces-h ()
+ (defun +indent-guides-init-faces-h (&rest _)
(when (display-graphic-p)
(highlight-indent-guides-auto-set-faces)))
@@ -13,10 +13,9 @@
;; but is unable to do so properly in terminal Emacs, where it only has
;; access to 256 colors. So if the user uses a daemon we must wait for
;; the first graphical frame to be available to do.
- (add-hook (if (daemonp)
- 'server-after-make-frame-hook
- 'doom-load-theme-hook)
- #'+indent-guides-init-faces-h)
+ (add-hook 'doom-load-theme-hook #'+indent-guides-init-faces-h)
+ (when doom-init-theme-p
+ (+indent-guides-init-faces-h))
;; `highlight-indent-guides' breaks when `org-indent-mode' is active
(add-hook! 'org-mode-local-vars-hook
diff --git a/.emacs.d/modules/ui/indent-guides/packages.el b/.emacs.d/modules/ui/indent-guides/packages.el
index 0810515..b305d6e 100644
--- a/.emacs.d/modules/ui/indent-guides/packages.el
+++ b/.emacs.d/modules/ui/indent-guides/packages.el
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; ui/indent-guides/packages.el
-(package! highlight-indent-guides :pin "a4f771418e4eed1f3f7879a43af28cf97747d41c")
+(package! highlight-indent-guides :pin "cf352c85cd15dd18aa096ba9d9ab9b7ab493e8f6")
diff --git a/.emacs.d/modules/ui/modeline/config.el b/.emacs.d/modules/ui/modeline/config.el
index 8ef94a3..9183364 100644
--- a/.emacs.d/modules/ui/modeline/config.el
+++ b/.emacs.d/modules/ui/modeline/config.el
@@ -32,6 +32,13 @@
(when (daemonp)
(setq doom-modeline-icon t))
:config
+ ;; HACK Fix #4102 due to empty all-the-icons return value (caused by
+ ;; `doom--disable-all-the-icons-in-tty-a' advice) in tty daemon frames.
+ (defadvice! +modeline-disable-icon-in-daemon-a (orig-fn &rest args)
+ :around #'doom-modeline-propertize-icon
+ (when (display-graphic-p)
+ (apply orig-fn args)))
+
;; Fix an issue where these two variables aren't defined in TTY Emacs on MacOS
(defvar mouse-wheel-down-event nil)
(defvar mouse-wheel-up-event nil)
diff --git a/.emacs.d/modules/ui/modeline/packages.el b/.emacs.d/modules/ui/modeline/packages.el
index fb6cc0d..536b8c4 100644
--- a/.emacs.d/modules/ui/modeline/packages.el
+++ b/.emacs.d/modules/ui/modeline/packages.el
@@ -2,7 +2,7 @@
;;; ui/modeline/packages.el
(unless (featurep! +light)
- (package! doom-modeline :pin "ffbaaee832f1c97ff608bc4959b408997d959b7d"))
+ (package! doom-modeline :pin "538017a399cb7b499853bdaf50928ca8b270693d"))
(package! anzu :pin "7b8688c84d6032300d0c415182c7c1ad6cb7f819")
(when (featurep! :editor evil)
(package! evil-anzu :pin "d3f6ed4773b48767bd5f4708c7f083336a8a8a86"))
diff --git a/.emacs.d/modules/ui/popup/config.el b/.emacs.d/modules/ui/popup/config.el
index 47efdba..e2b183f 100644
--- a/.emacs.d/modules/ui/popup/config.el
+++ b/.emacs.d/modules/ui/popup/config.el
@@ -161,7 +161,8 @@ prevent the popup(s) from messing up the UI (or vice versa)."
("^\\*Backtrace" :vslot 99 :size 0.4 :quit nil)
("^\\*CPU-Profiler-Report " :side bottom :vslot 100 :slot 1 :height 0.4 :width 0.5 :quit nil)
("^\\*Memory-Profiler-Report " :side bottom :vslot 100 :slot 2 :height 0.4 :width 0.5 :quit nil)
- ("^\\*\\(?:Proced\\|timer-list\\|Process List\\|Abbrevs\\|Output\\|Occur\\|unsent mail\\)\\*" :ignore t)))
+ ("^\\*Process List\\*" :side bottom :vslot 101 :size 0.25 :select t :quit t)
+ ("^\\*\\(?:Proced\\|timer-list\\|Abbrevs\\|Output\\|Occur\\|unsent mail\\)\\*" :ignore t)))
(add-hook 'doom-init-ui-hook #'+popup-mode 'append)
diff --git a/.emacs.d/modules/ui/tabs/packages.el b/.emacs.d/modules/ui/tabs/packages.el
index 1f4d617..aafa0e5 100644
--- a/.emacs.d/modules/ui/tabs/packages.el
+++ b/.emacs.d/modules/ui/tabs/packages.el
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; ui/tabs/packages.el
-(package! centaur-tabs :pin "7e0332b138f836b9d0b6d2134310f53369598cfd")
+(package! centaur-tabs :pin "5453317b6b9f68bfbd934eee3b883207bfa331e0")
diff --git a/.emacs.d/modules/ui/treemacs/packages.el b/.emacs.d/modules/ui/treemacs/packages.el
index c1f7afb..bb2ce85 100644
--- a/.emacs.d/modules/ui/treemacs/packages.el
+++ b/.emacs.d/modules/ui/treemacs/packages.el
@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; ui/treemacs/packages.el
-(package! treemacs :pin "027e03b6fac5c0a870440d27c35d53bbe0215d81")
+(package! treemacs :pin "6c00fe74079a057ad4efc772eab9d73e4f09fa10")
;; These packages have no :pin because they're in the same repo
(when (featurep! :editor evil +everywhere)
(package! treemacs-evil))
diff --git a/.emacs.d/modules/ui/window-select/packages.el b/.emacs.d/modules/ui/window-select/packages.el
index 42a5e24..c2a65ca 100644
--- a/.emacs.d/modules/ui/window-select/packages.el
+++ b/.emacs.d/modules/ui/window-select/packages.el
@@ -2,7 +2,7 @@
;;; ui/window-select/packages.el
(if (featurep! +switch-window)
- (package! switch-window :pin "8710f6304d843365fb59b6efe7e1f729d14e557c")
+ (package! switch-window :pin "277706b863c05b3931925ee9dae8970d605bf061")
(package! ace-window :pin "c7cb315c14e36fded5ac4096e158497ae974bec9"))
(when (featurep! +numbers)
diff --git a/.emacs.d/modules/ui/workspaces/autoload/workspaces.el b/.emacs.d/modules/ui/workspaces/autoload/workspaces.el
index 681bf43..e986390 100644
--- a/.emacs.d/modules/ui/workspaces/autoload/workspaces.el
+++ b/.emacs.d/modules/ui/workspaces/autoload/workspaces.el
@@ -294,7 +294,7 @@ workspace to delete."
(defun +workspace/new (&optional name clone-p)
"Create a new workspace named NAME. If CLONE-P is non-nil, clone the current
workspace, otherwise the new workspace is blank."
- (interactive "iP")
+ (interactive (list nil current-prefix-arg))
(unless name
(setq name (format "#%s" (+workspace--generate-id))))
(condition-case e
diff --git a/.emacs.d/modules/ui/workspaces/config.el b/.emacs.d/modules/ui/workspaces/config.el
index 9847788..a8f5fef 100644
--- a/.emacs.d/modules/ui/workspaces/config.el
+++ b/.emacs.d/modules/ui/workspaces/config.el
@@ -45,9 +45,7 @@ stored in `persp-save-dir'.")
;; Remove default buffer predicate so persp-mode can put in its own
(delq! 'buffer-predicate default-frame-alist 'assq)
(require 'persp-mode)
- (if (daemonp)
- (add-hook 'after-make-frame-functions #'persp-mode-start-and-remove-from-make-frame-hook)
- (persp-mode +1)))))
+ (persp-mode +1))))
:config
(setq persp-autokill-buffer-on-remove 'kill-weak
persp-reset-windows-on-nil-window-conf nil
@@ -144,6 +142,16 @@ stored in `persp-save-dir'.")
(cadr prev-buffers)
head)))
+ ;; HACK Fixes #4196, #1525: selecting deleted buffer error when quitting Emacs
+ ;; or on some buffer listing ops.
+ (defadvice! +workspaces-remove-dead-buffers-a (persp)
+ :before #'persp-buffers-to-savelist
+ (when (perspective-p persp)
+ ;; HACK Can't use `persp-buffers' because of a race condition with its gv
+ ;; getter/setter not being defined in time.
+ (setf (aref persp 2)
+ (cl-delete-if-not #'persp-get-buffer-or-null (persp-buffers persp)))))
+
;; Delete the current workspace if closing the last open window
(define-key! persp-mode-map
[remap delete-window] #'+workspace/close-window-or-workspace
@@ -238,8 +246,9 @@ stored in `persp-save-dir'.")
(defun +workspaces-reload-indirect-buffers-h (&rest _)
(dolist (ibc +workspaces--indirect-buffers-to-restore)
(cl-destructuring-bind (buffer-name . base-buffer-name) ibc
- (when (buffer-live-p (get-buffer base-buffer-name))
- (when (get-buffer buffer-name)
- (setq buffer-name (generate-new-buffer-name buffer-name)))
- (make-indirect-buffer bb buffer-name t))))
+ (let ((base-buffer (get-buffer base-buffer-name)))
+ (when (buffer-live-p base-buffer)
+ (when (get-buffer buffer-name)
+ (setq buffer-name (generate-new-buffer-name buffer-name)))
+ (make-indirect-buffer base-buffer buffer-name t)))))
(setq +workspaces--indirect-buffers-to-restore nil))))
diff --git a/.emacs.d/modules/ui/workspaces/packages.el b/.emacs.d/modules/ui/workspaces/packages.el
index 0e0afda..b5f0257 100644
--- a/.emacs.d/modules/ui/workspaces/packages.el
+++ b/.emacs.d/modules/ui/workspaces/packages.el
@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; ui/workspaces/packages.el
-(package! persp-mode :pin "14325c11f7a347717d7c3780f29b24a38c68fbfc")
+(package! persp-mode :pin "c132efe3094ce1368f54195028b29b82c65a64dc")