Minor edits.

This commit is contained in:
Derek Taylor 2020-11-05 13:27:52 -06:00
parent 8fbacc6392
commit 35112d3f8c
170 changed files with 1304 additions and 756 deletions

View File

@ -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}')

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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")))

View File

@ -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 "<details>\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</details>"))
(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

View File

@ -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

View File

@ -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: "))

View File

@ -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)))))

View File

@ -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

View File

@ -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)

View File

@ -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)))

View File

@ -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")

View File

@ -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!

View File

@ -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))

View File

@ -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?")))

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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)))))

View File

@ -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

View File

@ -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")

View File

@ -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

View File

@ -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.

View File

@ -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)

View File

@ -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))))))

View File

@ -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

View File

@ -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

View File

@ -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")

View File

@ -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")

View File

@ -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

View File

@ -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"))

View File

@ -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

View File

@ -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")

View File

@ -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")

View File

@ -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)
("<escape>" 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)
("<escape>" 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)))

View File

@ -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

View File

@ -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)

View File

@ -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"))

View File

@ -124,6 +124,7 @@
;;; <leader> 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 @@
;;; <leader> 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-<right>" #'sp-forward-slurp-sexp
"M-<right>" #'sp-forward-barf-sexp
"C-<left>" #'sp-backward-slurp-sexp
"M-<left>" #'sp-backward-barf-sexp)
"C-M-t" #'sp-transpose-sexp)
;;; treemacs
(:when (featurep! :ui treemacs)

View File

@ -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 @@
;;; <leader> 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)))
;;; <leader> o --- open
(:prefix-map ("o" . "open")
@ -647,6 +654,8 @@
;;; <leader> 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)

View File

@ -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)

View File

@ -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

View File

@ -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)))

View File

@ -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

View File

@ -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"))

View File

@ -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.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
${4:<one line to give the program's name and a brief idea of what it does.>}
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:
<program> Copyright (C) <year> <name of author>
${3:<program>} 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.

View File

@ -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)

View File

@ -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 ")

View File

@ -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)

View File

@ -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)

View File

@ -7,4 +7,4 @@
:recipe (:host github
:repo "hlissner/doom-snippets"
:files ("*.el" "*"))
:pin "60c57d66d2afd1798bff5023a54ab155f311746a")
:pin "e1cbbdf526224066f6bb67f95672d329323ecb1c")

View File

@ -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))))))

View File

@ -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"))

View File

@ -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")

View File

@ -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

View File

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; email/mu4e/packages.el
(package! org-msg :pin "2db6725c4a4f4342a9c61895b7c3c82795b01fee")
(package! org-msg :pin "557d490ecbd80522a42f7b1fb6aaacca504d4512")

View File

@ -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)

View File

@ -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"))

View File

@ -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")

View File

@ -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))
;;

View File

@ -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)))

View File

@ -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"))

View File

@ -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)))

View File

@ -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"))))))))

View File

@ -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)

View File

@ -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"))

View File

@ -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"))

View File

@ -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")

View File

@ -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"))

View File

@ -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)

View File

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

View File

@ -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)

View File

@ -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")

View File

@ -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)

View File

@ -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")

View File

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/factor/packages.el
(package! fuel :pin "3fdb0325ca2a6d80e4111af43b1b166808022020")
(package! fuel :pin "c6e15bd49e9d37dfe6dce167210fde22031d0d88")

View File

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/fsharp/packages.el
(package! fsharp-mode :pin "3e41fe1391b64eefa66a8a02fce27a12a04e1e01")
(package! fsharp-mode :pin "68dfc223561d85b5408348ab77bc98b19cbcc0ed")

View File

@ -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")

View File

@ -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))

View File

@ -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.

View File

@ -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"))

View File

@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/hy/packages.el
(package! hy-mode :pin "55e84cadbdb63427a8d531992df3990414a26688")
(package! hy-mode :pin "7256844f24a3b727e252a008d7a142fd3b3921da")

View File

@ -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.

View File

@ -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

View File

@ -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")))
;;

View File

@ -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.")))

View File

@ -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")))

View File

@ -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"))

View File

@ -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")

View File

@ -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"))

View File

@ -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

View File

@ -64,7 +64,7 @@ apt-get install texlive
** Arch Linux
#+BEGIN_SRC sh
pacman -S texlive
pacman -S texlive-core
#+END_SRC
** TODO macOS

View File

@ -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 _)

View File

@ -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

View File

@ -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:

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