mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-05-06 03:34:25 -07:00
nit: revise TODO/FIXME/HACK/REVIEW/etc in comments
Some were outdated, some were incorrectly labeled, others were already completed, some were missing... Gotta fix them all. Also, in :ui hl-todo, there are comments that describe how Doom uses each of these annotations; those have been updated.
This commit is contained in:
parent
680d135062
commit
6c0881c684
116 changed files with 351 additions and 357 deletions
|
|
@ -56,7 +56,7 @@ Each element of this list can be one of:
|
|||
'(docs \"faq\" \"install\" check-docs)")
|
||||
|
||||
(defvar doom-ci-commit-rules
|
||||
;; TODO Extract into named functions
|
||||
;; TODO: Extract into named functions
|
||||
(list (lambda! (&key subject)
|
||||
"If a fixup/squash commit, don't lint this commit"
|
||||
(when (string-match "^\\(\\(?:fixup\\|squash\\)!\\|FIXUP\\|WIP\\) " subject)
|
||||
|
|
@ -169,7 +169,7 @@ Each element of this list can be one of:
|
|||
(fail! "%d commit hash(s) not 12 characters long: %s"
|
||||
(length refs) (string-join (nreverse refs) ", "))))))
|
||||
|
||||
;; TODO Add bump validations for revert: type.
|
||||
;; TODO: Add bump validations for revert: type.
|
||||
(lambda! (&key body trailers)
|
||||
"Validate commit trailers."
|
||||
(let* ((keys (mapcar #'car doom-ci-commit-trailer-keys))
|
||||
|
|
@ -206,10 +206,10 @@ Each element of this list can be one of:
|
|||
(fail! "%S expects one of %s, but got %S"
|
||||
key allowed-types value)))))))
|
||||
|
||||
;; TODO Check that bump/revert SUBJECT list: 1) valid modules and 2)
|
||||
;; modules whose files are actually being touched.
|
||||
;; TODO: Check that bump/revert SUBJECT list: 1) valid modules and 2)
|
||||
;; modules whose files are actually being touched.
|
||||
|
||||
;; TODO Ensure your diff corraborates your SCOPE
|
||||
;; TODO: Ensure your diff corraborates your SCOPE
|
||||
|
||||
)
|
||||
"A list of validator functions to run against a commit.
|
||||
|
|
@ -252,7 +252,7 @@ Note: warnings are not considered failures.")
|
|||
"Commands that automate development processes."
|
||||
:partial t)
|
||||
|
||||
;; TODO Move to 'doom install --git-hooks'
|
||||
;; TODO: Move to 'doom install --git-hooks'
|
||||
(defcli! (ci deploy-hooks) ((force ("--force")))
|
||||
"TODO"
|
||||
(let* ((repo-path (sh! "git" "rev-parse" "--show-toplevel"))
|
||||
|
|
@ -284,7 +284,7 @@ Note: warnings are not considered failures.")
|
|||
(if overwrite-p "Overwrote" "Created")
|
||||
(path hook))))))
|
||||
|
||||
;; TODO Move to 'doom lint commits'
|
||||
;; TODO: Move to 'doom lint commits'
|
||||
(defcli! (ci lint-commits) (from &optional to)
|
||||
"TODO"
|
||||
(with-temp-buffer
|
||||
|
|
@ -307,7 +307,7 @@ Note: warnings are not considered failures.")
|
|||
commits))
|
||||
commits))))
|
||||
|
||||
;; TODO Move to 'doom lint hook:commit-msg'
|
||||
;; TODO: Move to 'doom lint hook:commit-msg'
|
||||
(defcli! (ci hook commit-msg) (file)
|
||||
"Run git commit-msg hook.
|
||||
|
||||
|
|
@ -323,7 +323,7 @@ Lints the current commit message."
|
|||
(point-max)))))
|
||||
t)))
|
||||
|
||||
;; TODO Move to 'doom lint hook:pre-push'
|
||||
;; TODO: Move to 'doom lint hook:pre-push'
|
||||
(defcli! (ci hook pre-push) (remote url)
|
||||
"Run git pre-push hook.
|
||||
|
||||
|
|
@ -335,7 +335,7 @@ Prevents pushing if there are unrebased or WIP commits."
|
|||
(catch 'continue
|
||||
(seq-let (local-ref local-sha remote-ref remote-sha)
|
||||
(split-string line " ")
|
||||
;; TODO Extract this branch detection to a variable
|
||||
;; TODO: Extract this branch detection to a variable
|
||||
(unless (or (string-match-p "^refs/heads/\\(master\\|main\\)$" remote-ref)
|
||||
(equal local-sha z40))
|
||||
(throw 'continue t))
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
;;; Commands
|
||||
|
||||
(defcli! emacs
|
||||
(;; TODO Implement sandbox functionality post-3.0
|
||||
(;; TODO: Implement sandbox functionality post-3.0
|
||||
;; (daemon? ("--daemon"))
|
||||
;; (window-type ("--gui" "--tty"))
|
||||
;; (version ("--with-emacs" version))
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ variable names to omit from `doom-env-file'.")
|
|||
((allow-only ("--allow-all"))
|
||||
(deny-only ("--deny-all"))
|
||||
(output-file ("-o" path) "Write envvar file to non-standard PATH.")
|
||||
;; TODO (refresh? ("-r" "--refresh"))
|
||||
;; TODO: (refresh? ("-r" "--refresh"))
|
||||
&multiple
|
||||
(rules ("-a" "--allow" "-d" "--deny" regexp) "Allow/deny envvars that match REGEXP"))
|
||||
"(Re)generates envvars file from your shell environment.
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
(unless dryrun?
|
||||
(write-region (buffer-string) nil outfile)))))))))
|
||||
|
||||
;; TODO Finish me
|
||||
;; TODO: Finish me
|
||||
(defcli-stub! (make changelog))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,13 +15,13 @@
|
|||
|
||||
(defcli! (make completions)
|
||||
((shell ("--zsh" "--bash") "Generate a particular flavor of completion files (defaults to $SHELL)")
|
||||
;; TODO (outfile ("-o" "--outfile" file))
|
||||
;; TODO: (outfile ("-o" "--outfile" file))
|
||||
&context context &args args)
|
||||
"Generate completion scripts for a Doom-CLI script."
|
||||
;; (unless outfile
|
||||
;; (user-error "No destination file specified"))
|
||||
(let ((shell (or shell (file-name-base (getenv "SHELL"))))
|
||||
;; TODO Allow this command to read other Doom binscripts, which will
|
||||
;; TODO: Allow this command to read other Doom binscripts, which will
|
||||
;; dump their `doom-cli--table' if __DOOMDUMP is set.
|
||||
;; (table (read (letenv! (("__DOOMDUMP" "1")) (apply #'sh! script-file args))))
|
||||
)
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
;;
|
||||
;;; ZSH Helpers
|
||||
|
||||
;; TODO Write to OUTFILE when specified
|
||||
;; TODO: Write to OUTFILE when specified
|
||||
(defun doom-make-completions-zsh (context _outfile)
|
||||
(let* ((cli (doom-cli-get context))
|
||||
(prefix (doom-cli-context-prefix context))
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
))
|
||||
|
||||
(defun doom-make-completions--zsh-insert-options (options &optional cr)
|
||||
;; FIXME Refactor, generalize, and parameterize this mess
|
||||
;; FIXME: Refactor, generalize, and parameterize this mess
|
||||
(dolist (option options)
|
||||
(let* ((switches (cl-loop for (sw . args) in (car option)
|
||||
if (string-prefix-p "--[no-]" sw)
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@
|
|||
;;
|
||||
;;; Variables
|
||||
|
||||
;; TODO Implement me
|
||||
;; TODO: Implement me
|
||||
(defvar doom-test-backend 'ert
|
||||
"One of `ert' or `buttercup'.")
|
||||
|
||||
;; TODO Implement me
|
||||
;; TODO: Implement me
|
||||
(defvar doom-test-isolation-level nil
|
||||
"Determines the testing strategy for tests.
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ Should be one of:
|
|||
;;
|
||||
;;; Commands
|
||||
|
||||
;; FIXME Will be fixed in v3.1
|
||||
;; FIXME: Will be fixed in v3.1
|
||||
(defcli-stub! test
|
||||
((backend ("--ert" "--buttercup"))
|
||||
(jobs ("-j" "--jobs" int))
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ libraries. It is the equivalent of the following shell commands:
|
|||
(let ((force? (doom-cli-context-suppress-prompts-p context)))
|
||||
(cond
|
||||
(packages?
|
||||
;; HACK It's messy to use straight to upgrade straight, due to the
|
||||
;; HACK: It's messy to use straight to upgrade straight, due to the
|
||||
;; potential for backwards incompatibility, so we staticly check if
|
||||
;; Doom's `package!' declaration for straight has changed. If it has,
|
||||
;; delete straight so 'doom sync' will install the new version for us.
|
||||
|
|
|
|||
|
|
@ -570,7 +570,7 @@ Throws `doom-cli-invalid-option-error' for illegal values."
|
|||
errors)
|
||||
(catch 'done
|
||||
(dolist (type types)
|
||||
;; REVIEW Use pcase-let + map.el when 27.x support is dropped
|
||||
;; REVIEW: Use pcase-let + map.el when 27.x support is dropped
|
||||
(cl-destructuring-bind (&key test read error &allow-other-keys)
|
||||
(if (or (symbolp type)
|
||||
(and (stringp type)
|
||||
|
|
@ -956,7 +956,7 @@ considered as well."
|
|||
|
||||
(defun doom-cli-debugger (type data &optional context)
|
||||
"Print a more presentable backtrace to terminal and write it to file."
|
||||
;; HACK Works around a heuristic in eval.c for detecting errors in the
|
||||
;; HACK: Works around a heuristic in eval.c for detecting errors in the
|
||||
;; debugger, which executes this handler again on subsequent calls. Taken
|
||||
;; from `ert--run-test-debugger'.
|
||||
(cl-incf num-nonmacro-input-events)
|
||||
|
|
@ -1351,9 +1351,9 @@ ARGS are options passed to less. If DOOMPAGER is set, ARGS are ignored."
|
|||
0)))
|
||||
context))
|
||||
|
||||
;; (defun doom-cli--exit-editor (args context)) ; TODO Launch $EDITOR
|
||||
;; (defun doom-cli--exit-editor (args context)) ; TODO: Launch $EDITOR
|
||||
|
||||
;; (defun doom-cli--exit-emacs (args context)) ; TODO Launch Emacs subsession
|
||||
;; (defun doom-cli--exit-emacs (args context)) ; TODO: Launch Emacs subsession
|
||||
|
||||
|
||||
|
||||
|
|
@ -1990,7 +1990,7 @@ errors to `doom-cli-error-file')."
|
|||
|
||||
(defalias 'sh!! #'doom-exec-process)
|
||||
|
||||
;; TODO Make `git!' into a more sophisticated wrapper around git
|
||||
;; TODO: Make `git!' into a more sophisticated wrapper around git
|
||||
(defalias 'git! (doom-partial #'straight--process-run "git"))
|
||||
|
||||
(defun get! (key) (doom-cli-context-get doom-cli--context key))
|
||||
|
|
@ -2108,7 +2108,7 @@ substring is edited more than once."
|
|||
current))))
|
||||
|
||||
;;; Help: printers
|
||||
;; TODO Parameterize optional args with `cl-defun'
|
||||
;; TODO: Parameterize optional args with `cl-defun'
|
||||
(defun doom-cli-help--print (cli context &optional manpage? noglobal?)
|
||||
"Write CLI's documentation in a manpage-esque format to stdout."
|
||||
(let-alist (doom-cli-help cli)
|
||||
|
|
@ -2118,7 +2118,7 @@ substring is edited more than once."
|
|||
(width (floor (/ (- (doom-cli-context-width context)
|
||||
(length title))
|
||||
2.0))))
|
||||
;; FIXME Who am I fooling?
|
||||
;; FIXME: Who am I fooling?
|
||||
(format (format "%%-%ds%%s%%%ds" width width)
|
||||
"DOOM(1)" title "DOOM(1)")))
|
||||
("NAME" . ,(concat .command " - " .summary))
|
||||
|
|
|
|||
|
|
@ -546,11 +546,11 @@ on."
|
|||
(defun doom-buffer-has-long-lines-p ()
|
||||
(unless (bound-and-true-p visual-line-mode)
|
||||
(let ((so-long-skip-leading-comments
|
||||
;; HACK Fix #2183: `so-long-detected-long-line-p' calls
|
||||
;; HACK: Fix #2183: `so-long-detected-long-line-p' calls
|
||||
;; `comment-forward' which tries to use comment syntax, which
|
||||
;; throws an error if comment state isn't initialized, leading
|
||||
;; to a wrong-type-argument: stringp error.
|
||||
;; DEPRECATED Fixed in Emacs 28.
|
||||
;; DEPRECATED: Fixed in Emacs 28.
|
||||
(bound-and-true-p comment-use-syntax)))
|
||||
(so-long-detected-long-line-p))))
|
||||
(setq so-long-predicate #'doom-buffer-has-long-lines-p))
|
||||
|
|
|
|||
|
|
@ -1543,7 +1543,7 @@ in these blocks dictates their load order (unless given an explicit :depth)."
|
|||
modules)))
|
||||
t))
|
||||
|
||||
;; DEPRECATED Remove in 3.0
|
||||
;; DEPRECATED: Remove in v3
|
||||
(define-obsolete-function-alias 'featurep! 'modulep! "3.0.0")
|
||||
|
||||
(defmacro modulep! (group &optional module &rest flags)
|
||||
|
|
@ -1696,7 +1696,7 @@ elsewhere."
|
|||
(with-no-warnings
|
||||
(cons name plist)))))
|
||||
|
||||
;; DEPRECATED: Will be replaced with new `packages!' macro in v3.0
|
||||
;; DEPRECATED: Will be replaced in v3
|
||||
(defmacro disable-packages! (&rest packages)
|
||||
"A convenience macro for disabling packages in bulk.
|
||||
Only use this macro in a module's (or your private) packages.el file."
|
||||
|
|
@ -1704,7 +1704,7 @@ Only use this macro in a module's (or your private) packages.el file."
|
|||
(mapcar (lambda (p) `(package! ,p :disable t))
|
||||
packages)))
|
||||
|
||||
;; DEPRECATED: Will be replaced with new `packages!' macro in v3.0
|
||||
;; DEPRECATED: Will be replaced in v3
|
||||
(defmacro unpin! (&rest targets)
|
||||
"Unpin packages in TARGETS.
|
||||
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ And if it's a function, evaluate it."
|
|||
((when-let*
|
||||
((doom-fd-executable)
|
||||
(projectile-git-use-fd)
|
||||
;; REVIEW Temporary fix for #6618. Improve me later.
|
||||
;; REVIEW: Temporary fix for #6618. Improve me later.
|
||||
(version (with-memoization (get 'doom-fd-executable 'version)
|
||||
(cadr (split-string (cdr (doom-call-process doom-fd-executable "--version"))
|
||||
" " t))))
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ If RETURN-P, return the message as a string instead of displaying it."
|
|||
;; and ~/_emacs) -- and spare us the IO of searching for them, and allows
|
||||
;; savvy hackers to use $EMACSDIR as their $DOOMDIR, if they wanted.
|
||||
;; 3. Cut down on unnecessary logic in Emacs' bootstrapper.
|
||||
;; 4. TODO Offer a more user-friendly error state/screen, especially for
|
||||
;; 4. TODO: Offer a more user-friendly error state/screen, especially for
|
||||
;; errors emitted from Doom's core or the user's config.
|
||||
(define-advice startup--load-user-init-file (:override (&rest _) init-doom 100)
|
||||
(let ((debug-on-error-from-init-file nil)
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@ It may not be obvious to users what they should do for some straight prompts,
|
|||
so Doom will recommend the one that reverts a package back to its (or target)
|
||||
original state.")
|
||||
|
||||
;; HACK Remove dired & magit options from prompt, since they're inaccessible in
|
||||
;; noninteractive sessions.
|
||||
;; HACK: Remove dired & magit options from prompt, since they're inaccessible in
|
||||
;; noninteractive sessions.
|
||||
(advice-add #'straight-vc-git--popup-raw :override #'straight--popup-raw)
|
||||
|
||||
;; HACK: `native-comp' only respects `native-comp-jit-compilation-deny-list'
|
||||
|
|
@ -152,8 +152,8 @@ original state.")
|
|||
file-list)
|
||||
recursively load selector)))
|
||||
|
||||
;; HACK Replace GUI popup prompts (which hang indefinitely in tty Emacs) with
|
||||
;; simple prompts.
|
||||
;; HACK: Replace GUI popup prompts (which hang indefinitely in tty Emacs) with
|
||||
;; simple prompts.
|
||||
(defadvice! doom-straight--fallback-to-y-or-n-prompt-a (fn &optional prompt noprompt?)
|
||||
:around #'straight-are-you-sure
|
||||
(or noprompt?
|
||||
|
|
|
|||
|
|
@ -559,8 +559,8 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
|
|||
#'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
|
||||
;; REVIEW: Reported upstream https://debbugs.gnu.org/cgi/bugreport.cgi?bug=43811
|
||||
;; DEPRECATED: Fixed in Emacs 28; remove when we drop 27 support
|
||||
(unless (> emacs-major-version 27)
|
||||
(add-hook 'artist-mode-hook #'doom-disable-line-numbers-h))
|
||||
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@
|
|||
(cons (match-string 1 profile)
|
||||
(match-string 2 profile))
|
||||
(cons profile "0")))
|
||||
;; TODO Restore this in 3.0
|
||||
;; TODO: Restore this in v3
|
||||
;; (cons "_" "0")
|
||||
)
|
||||
"The active profile as a cons cell (NAME . VERSION).")
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ FILL-COLUMN determines the column at which lines will be broken."
|
|||
(let ((doom-print-backend (unless nocolor doom-print-backend))
|
||||
(doom-print-indent 0))
|
||||
(dolist (spec (cl-remove-if-not #'cdr (doom-info)) (buffer-string))
|
||||
;; FIXME Refactor this horrible cludge, either here or in `format!'
|
||||
;; REVIEW: Refactor this horrible cludge, either here or in `format!'
|
||||
(insert! ((bold "%-10s ") (symbol-name (car spec)))
|
||||
("%s\n"
|
||||
(string-trim-left
|
||||
|
|
@ -406,7 +406,7 @@ FILL-COLUMN determines the column at which lines will be broken."
|
|||
"git" "-C" (expand-file-name doom-emacs-dir)
|
||||
"log" "-1" "--format=%D %h %ci"))
|
||||
"n/a"))
|
||||
;; NOTE This is a placeholder. Our modules will be moved to its own
|
||||
;; NOTE: This is a placeholder. Our modules will be moved to its own
|
||||
;; repo eventually, and Doom core will later be capable of managing
|
||||
;; them like package sources.
|
||||
(format "%-13s v%-15s %s"
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
(set-buffer-modified-p nil)
|
||||
(org-link-open (org-element-context)))))
|
||||
|
||||
;; DEPRECATED Will be renamed once docs "framework" is generalized
|
||||
;; DEPRECATED: Will be renamed once docs "framework" is generalized
|
||||
(defvar doom-docs-link-alist
|
||||
'(("doom-tag" . "https://github.com/hlissner/doom-emacs/releases/tag/%s")
|
||||
("doom-contrib-core" . "id:9ac0c15c-29e7-43f8-8926-5f0edb1098f0")
|
||||
|
|
@ -177,7 +177,7 @@
|
|||
("doom-suggest-faq" . "id:aa28b732-0512-49ed-a47b-f20586c0f051")
|
||||
("github" . "https://github.com/%s")
|
||||
|
||||
;; TODO Implement later, once docs are generalized
|
||||
;; TODO: Implement later, once docs are generalized
|
||||
;; ("github-release" . (lambda (link)
|
||||
;; (format "%s/releases/tag/%s"
|
||||
;; doom-docs-this-repo
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ single file or nested compound statement of `and' and `or' statements."
|
|||
(if (executable-find "du")
|
||||
(/ (string-to-number (cdr (doom-call-process "du" "-sb" dir)))
|
||||
1024.0)
|
||||
;; REVIEW This is slow and terribly inaccurate, but it's something
|
||||
;; REVIEW: This is slow and terribly inaccurate, but it's something
|
||||
(let ((w32-get-true-file-attributes t)
|
||||
(file-name-handler-alist dir)
|
||||
(max-lisp-eval-depth 5000)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
(doom-call-process "git" "rev-parse" "--show-toplevel")
|
||||
(if (zerop code)
|
||||
(apply #'file-name-concat output segments)
|
||||
;; TODO throw stderr as error
|
||||
;; TODO: throw stderr as error
|
||||
(user-error "Not in a git repo: %s" default-directory))))
|
||||
|
||||
(provide 'doom-lib '(git))
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ without needing to check if they are available."
|
|||
(autodef
|
||||
(completing-read
|
||||
"Describe setter: "
|
||||
;; TODO Could be cleaner (refactor me!)
|
||||
;; REVIEW: Could be cleaner (refactor me!)
|
||||
(cl-loop with maxwidth = (apply #'max (mapcar #'length (mapcar #'symbol-name settings)))
|
||||
for def in (sort settings #'string-lessp)
|
||||
if (get def 'doom-module)
|
||||
|
|
@ -379,7 +379,7 @@ without needing to check if they are available."
|
|||
(unless (eq (char-after) ?\()
|
||||
(backward-char))
|
||||
(let ((sexp (sexp-at-point)))
|
||||
;; DEPRECATED `featurep!'
|
||||
;; DEPRECATED: `featurep!' is deprecated
|
||||
(when (memq (car-safe sexp) '(featurep! modulep! require!))
|
||||
(format "%s %s" (nth 1 sexp) (nth 2 sexp)))))))
|
||||
((when buffer-file-name
|
||||
|
|
@ -551,7 +551,7 @@ If prefix arg is present, refresh the cache."
|
|||
(format "total %d" (length packages))))
|
||||
packages nil t nil nil
|
||||
(when guess (symbol-name guess))))))))
|
||||
;; TODO Refactor me.
|
||||
;; REVIEW: Refactor me.
|
||||
(doom-initialize-packages)
|
||||
(help-setup-xref (list #'doom/help-packages package)
|
||||
(called-interactively-p 'interactive))
|
||||
|
|
@ -729,7 +729,6 @@ config blocks in your private config."
|
|||
|
||||
(defvar counsel-rg-base-command)
|
||||
(defun doom--help-search (dirs query prompt)
|
||||
;; REVIEW Replace with deadgrep
|
||||
(unless doom-ripgrep-executable
|
||||
(user-error "Can't find ripgrep on your system"))
|
||||
(cond ((fboundp 'consult--grep)
|
||||
|
|
@ -741,7 +740,7 @@ config blocks in your private config."
|
|||
(concat "%s " (mapconcat #'shell-quote-argument dirs " ")))
|
||||
(append counsel-rg-base-command dirs))))
|
||||
(counsel-rg query nil "-Lz" (concat prompt ": "))))
|
||||
;; () TODO Helm support?
|
||||
;; TODO: Helm support?
|
||||
((grep-find
|
||||
(string-join
|
||||
(append (list doom-ripgrep-executable
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ also be a list of module keys."
|
|||
(defun doom/reload-packages ()
|
||||
"Reload `doom-packages', `package' and `quelpa'."
|
||||
(interactive)
|
||||
;; HACK straight.el must be loaded for this to work
|
||||
;; HACK: straight.el must be loaded for this to work
|
||||
(message "Reloading packages")
|
||||
(doom-initialize-packages t)
|
||||
(message "Reloading packages...DONE"))
|
||||
|
|
@ -850,8 +850,8 @@ Must be run from a magit diff buffer."
|
|||
(defun doom-packages--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.
|
||||
;; Ignore missing elc files, they could be missing due to `no-byte-compile'.
|
||||
;; Rebuilding unnecessarily is expensive.
|
||||
(when (and (file-exists-p elc-file)
|
||||
(file-newer-than-file-p file elc-file))
|
||||
(doom-log "packages:elc: %s is newer than %s" file elc-file)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
;;
|
||||
;;; Macros
|
||||
|
||||
;;; DEPRECATED In favor of `cl-callf'
|
||||
;;; DEPRECATED: In favor of `cl-callf'
|
||||
;;;###autoload
|
||||
(defmacro plist-put! (plist &rest rest)
|
||||
"Set each PROP VALUE pair in REST to PLIST in-place."
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ based on the print level of the message. For example:
|
|||
```"
|
||||
(if (not text) ""
|
||||
(let ((case-fold-search nil))
|
||||
;; TODO Syntax highlighting?
|
||||
;; TODO: Syntax highlighting?
|
||||
(replace-regexp-in-string
|
||||
" *```\n\\(.+?\\)\n *```" (doom-print--style 'blue "%s" "\\1")
|
||||
(replace-regexp-in-string
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ simulate 'exec' in the shell, so batch scripts could run external programs
|
|||
synchronously without sacrificing their output.
|
||||
|
||||
Warning: freezes indefinitely on any stdin prompt."
|
||||
;; FIXME Is there any way to handle prompts?
|
||||
;; FIXME: Is there any way to handle prompts?
|
||||
(with-temp-buffer
|
||||
(cons (let ((process
|
||||
(make-process :name "doom-sh"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
;;; lisp/lib/projects.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; HACK We forward declare these variables because they are let-bound in a
|
||||
;; number of places with no guarantee that they've been defined yet (i.e.
|
||||
;; that `projectile' is loaded). If a variable is defined with `defvar'
|
||||
;; while it is lexically bound, you get "Defining as dynamic an already
|
||||
;; lexical var" errors in Emacs 28+).
|
||||
;; HACK: We forward declare these variables because they are let-bound in a
|
||||
;; number of places with no guarantee that they've been defined yet (i.e.
|
||||
;; that `projectile' is loaded). If a variable is defined with `defvar' while
|
||||
;; it is lexically bound, you get "Defining as dynamic an already lexical var"
|
||||
;; errors in Emacs 28+).
|
||||
;;;###autoload (defvar projectile-project-root nil)
|
||||
;;;###autoload (defvar projectile-enable-caching (not noninteractive))
|
||||
;;;###autoload (defvar projectile-require-project-root 'prompt)
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@
|
|||
(add-to-list 'treesit-extra-load-path
|
||||
,(file-name-concat doom-profile-data-dir "tree-sitter")))
|
||||
(with-eval-after-load 'undo-tree
|
||||
;; HACK `undo-tree' sometimes throws errors because
|
||||
;; `buffer-undo-tree' isn't correctly initialized.
|
||||
;; HACK: `undo-tree' sometimes throws errors because
|
||||
;; `buffer-undo-tree' isn't correctly initialized.
|
||||
(setq-default buffer-undo-tree (make-undo-tree)))
|
||||
;; Then launch as much about Emacs as we can
|
||||
(defun --run-- () ,forms)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ all themes. It will apply to all themes once they are loaded."
|
|||
(when (or (get 'doom-theme 'history)
|
||||
(null doom-theme))
|
||||
(doom--run-customize-theme-hook #',fn))
|
||||
;; FIXME Prevent clobbering this on-the-fly
|
||||
;; FIXME: Prevent clobbering this on-the-fly
|
||||
(add-hook 'doom-customize-theme-hook #',fn 100))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
|||
|
|
@ -82,5 +82,5 @@ or session. Otherwise, the addition is permanent."
|
|||
(call-interactively
|
||||
(if (featurep 'evil)
|
||||
#'evil-prev-flyspell-error
|
||||
;; TODO Implement this
|
||||
;; TODO: Implement this
|
||||
(user-error "Not supported"))))
|
||||
|
|
|
|||
|
|
@ -144,9 +144,9 @@
|
|||
(when-let (excluded (cdr (cl-find-if #'derived-mode-p +spell-excluded-faces-alist :key #'car)))
|
||||
(setq-local spell-fu-faces-exclude excluded))))
|
||||
|
||||
;; TODO custom `spell-fu-check-range' function to reduce false positives
|
||||
;; more intelligently, or modify `spell-fu-word-regexp' to include
|
||||
;; non-latin charactersets.
|
||||
;; TODO: custom `spell-fu-check-range' function to reduce false positives
|
||||
;; more intelligently, or modify `spell-fu-word-regexp' to include
|
||||
;; non-latin charactersets.
|
||||
)
|
||||
|
||||
(use-package! flyspell ; built-in
|
||||
|
|
|
|||
|
|
@ -52,10 +52,10 @@
|
|||
(add-hook 'company-mode-hook #'evil-normalize-keymaps)
|
||||
(add-hook! 'evil-normal-state-entry-hook
|
||||
(defun +company-abort-h ()
|
||||
;; HACK `company-abort' doesn't no-op if company isn't active; causing
|
||||
;; unwanted side-effects, like the suppression of messages in the
|
||||
;; echo-area.
|
||||
;; REVIEW Revisit this to refactor; shouldn't be necessary!
|
||||
;; HACK: `company-abort' doesn't no-op if company isn't active; causing
|
||||
;; unwanted side-effects, like the suppression of messages in the
|
||||
;; echo-area.
|
||||
;; REVIEW: Revisit this to refactor; shouldn't be necessary!
|
||||
(when company-candidates
|
||||
(company-abort))))
|
||||
;; Allow users to switch between backends on the fly. E.g. C-x C-s followed
|
||||
|
|
@ -67,13 +67,13 @@
|
|||
|
||||
(add-hook 'company-mode-hook #'+company-init-backends-h 'append)
|
||||
|
||||
;; 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)).
|
||||
;; 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)))
|
||||
|
|
@ -141,13 +141,13 @@
|
|||
(ElispFeature . ,(nerd-icons-codicon "nf-cod-globe" :face 'font-lock-builtin-face))
|
||||
(ElispFace . ,(nerd-icons-codicon "nf-cod-symbol_color" :face 'success))))
|
||||
|
||||
;; HACK Fix oversized scrollbar in some odd cases
|
||||
;; REVIEW `resize-mode' is deprecated and may stop working in the future.
|
||||
;; TODO PR me upstream?
|
||||
;; HACK: Fix oversized scrollbar in some odd cases
|
||||
;; REVIEW: `resize-mode' is deprecated and may stop working in the future.
|
||||
;; TODO: PR me upstream?
|
||||
(setq x-gtk-resize-child-frames 'resize-mode)
|
||||
|
||||
;; Disable tab-bar in company-box child frames
|
||||
;; TODO PR me upstream!
|
||||
;; REVIEW: PR me upstream!
|
||||
(add-to-list 'company-box-frame-parameters '(tab-bar-lines . 0))
|
||||
|
||||
;; Don't show documentation in echo area, because company-box displays its own
|
||||
|
|
@ -164,7 +164,7 @@
|
|||
|
||||
;; `company-box' performs insufficient frame-live-p checks. Any command that
|
||||
;; "cleans up the session" will break company-box.
|
||||
;; TODO Fix this upstream.
|
||||
;; REVIEW: Fix this upstream.
|
||||
(defadvice! +company-box-detect-deleted-frame-a (frame)
|
||||
:filter-return #'company-box--get-frame
|
||||
(if (frame-live-p frame) frame))
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
:hook (doom-first-input . ido-mode)
|
||||
:hook (ido-mode . ido-ubiquitous-mode)
|
||||
:preface
|
||||
;; HACK `ido' is a really old package. It defines `ido-mode' manually and
|
||||
;; doesn't define a hook, so we define one for it, so we can use it!
|
||||
;; HACK: `ido' is a really old package. It defines `ido-mode' manually and
|
||||
;; doesn't define a hook, so we define one for it, so we can use it!
|
||||
(defadvice! +ido-run-hooks-a (&rest _)
|
||||
:after #'ido-mode
|
||||
(run-hooks 'ido-mode-hook))
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ In the GUI, this is the same as `ivy-format-function-line'."
|
|||
:preselect (buffer-name (other-buffer (current-buffer)))
|
||||
:matcher #'ivy--switch-buffer-matcher
|
||||
:keymap ivy-switch-buffer-map
|
||||
;; NOTE A clever disguise, needed for virtual buffers.
|
||||
;; A clever disguise, needed for virtual buffers.
|
||||
:caller #'ivy-switch-buffer)))
|
||||
|
||||
;;;###autoload
|
||||
|
|
@ -322,7 +322,6 @@ If ARG (universal argument), include all files, even hidden or compressed ones."
|
|||
(defun +ivy/jump-list ()
|
||||
"Go to an entry in evil's (or better-jumper's) jumplist."
|
||||
(interactive)
|
||||
;; REVIEW Refactor me
|
||||
(let (buffers)
|
||||
(unwind-protect
|
||||
(ivy-read "jumplist: "
|
||||
|
|
|
|||
|
|
@ -185,9 +185,9 @@ results buffer.")
|
|||
:config
|
||||
(set-popup-rule! "^\\*ivy-occur" :size 0.35 :ttl 0 :quit nil)
|
||||
|
||||
;; HACK Fix an issue where `counsel-projectile-find-file-action' would try to
|
||||
;; open a candidate in an occur buffer relative to the wrong buffer,
|
||||
;; causing it to fail to find the file we want.
|
||||
;; HACK: Fix an issue where `counsel-projectile-find-file-action' would try to
|
||||
;; open a candidate in an occur buffer relative to the wrong buffer, causing
|
||||
;; it to fail to find the file we want.
|
||||
(defadvice! +ivy--run-from-ivy-directory-a (fn &rest args)
|
||||
:around #'counsel-projectile-find-file-action
|
||||
(let ((default-directory (ivy-state-directory ivy-last)))
|
||||
|
|
@ -197,9 +197,9 @@ results buffer.")
|
|||
;; of its own, on top of the defaults.
|
||||
(setq ivy-initial-inputs-alist nil)
|
||||
|
||||
;; REVIEW Counsel allows `counsel-rg-base-command' to be a string or list.
|
||||
;; This backwards compatibility complicates things for Doom. Simpler to
|
||||
;; just force it to always be a list.
|
||||
;; REVIEW: Counsel allows `counsel-rg-base-command' to be a string or list.
|
||||
;; This backwards compatibility complicates things for Doom. Simpler to just
|
||||
;; force it to always be a list.
|
||||
(when (stringp counsel-rg-base-command)
|
||||
(setq counsel-rg-base-command (split-string counsel-rg-base-command)))
|
||||
|
||||
|
|
@ -267,8 +267,8 @@ workable results ripgrep produces, despite the error."
|
|||
(setf (nth 1 (alist-get 'ddg counsel-search-engines-alist))
|
||||
"https://duckduckgo.com/?q=")
|
||||
|
||||
;; REVIEW Move this somewhere else and perhaps generalize this so both
|
||||
;; ivy/helm users can enjoy it.
|
||||
;; REVIEW: Move this somewhere else and perhaps generalize this so both
|
||||
;; ivy/helm users can enjoy it.
|
||||
(defadvice! +ivy--counsel-file-jump-use-fd-rg-a (args)
|
||||
"Change `counsel-file-jump' to use fd or ripgrep, if they are available."
|
||||
:override #'counsel--find-return-list
|
||||
|
|
@ -383,7 +383,7 @@ workable results ripgrep produces, despite the error."
|
|||
'(literal regexp initialism fuzzy)
|
||||
'(literal regexp initialism)))
|
||||
:config
|
||||
;; REVIEW Remove when radian-software/prescient.el#102 is resolved
|
||||
;; REVIEW: Remove when radian-software/prescient.el#102 is resolved
|
||||
(add-to-list 'ivy-sort-functions-alist '(ivy-resume))
|
||||
(setq ivy-prescient-sort-commands
|
||||
'(:not swiper swiper-isearch ivy-switch-buffer lsp-ivy-workspace-symbol
|
||||
|
|
@ -396,7 +396,7 @@ workable results ripgrep produces, despite the error."
|
|||
(let ((prescient-filter-method '(literal regexp)))
|
||||
(ivy-prescient-re-builder str)))
|
||||
|
||||
;; NOTE prescient config duplicated with `company'
|
||||
;; Prescient config duplicated with `company':
|
||||
(setq prescient-save-file (file-name-concat doom-profile-cache-dir "prescient-save.el")))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ Supports exporting consult-grep to wgrep, file to wdeired, and consult-location
|
|||
(unwind-protect
|
||||
(list
|
||||
(consult--read
|
||||
;; REVIEW Refactor me
|
||||
;; REVIEW: Refactor me
|
||||
(nreverse
|
||||
(delete-dups
|
||||
(delq
|
||||
|
|
@ -217,7 +217,8 @@ targets."
|
|||
"Runs consult-fd if fd version > 8.6.0 exists, consult-find otherwise.
|
||||
See minad/consult#770."
|
||||
(interactive "P")
|
||||
;; TODO this condition was adapted from a similar one in lisp/doom-projects.el, to be replaced with a more robust check post v3
|
||||
;; REVIEW: This condition was adapted from a similar one in
|
||||
;; lisp/doom-projects.el, to be replaced with a more robust check post v3
|
||||
(if (when-let*
|
||||
((bin (if (ignore-errors (file-remote-p default-directory nil t))
|
||||
(cl-find-if (doom-rpartial #'executable-find t)
|
||||
|
|
@ -227,7 +228,7 @@ See minad/consult#770."
|
|||
(cadr (split-string (cdr (doom-call-process bin "--version"))
|
||||
" " t))))
|
||||
((ignore-errors (version-to-list version))))
|
||||
;; TODO remove once fd 8.6.0 is widespread enough to be the minimum version for doom
|
||||
;; REVIEW: Remove once fd 8.6.0 is widespread enough.
|
||||
(version< "8.6.0" version))
|
||||
(consult-fd dir initial)
|
||||
(consult-find dir initial)))
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
;;; config/default/+bindings.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
;; NOTE SPC u replaces C-u as the universal argument.
|
||||
;; NOTE: SPC u replaces C-u as the universal argument.
|
||||
|
||||
;; Minibuffer
|
||||
(map! :map (evil-ex-completion-map evil-ex-search-keymap)
|
||||
|
|
@ -593,10 +593,6 @@
|
|||
:desc "From clipboard" "y" #'+default/yank-pop)
|
||||
|
||||
;;; <leader> l --- live share/collab
|
||||
;;; TODO Do you like this location for this map? This was the best idea we
|
||||
;;; could come up with, but we're happy to move it if there's a better
|
||||
;;; place! Also not sure if we're allowed to say "live share" since that's
|
||||
;;; a blatant ripoff of VS Code's name for this feature
|
||||
(:when (modulep! :tools collab)
|
||||
(:prefix-map ("l" . "live share/collab")
|
||||
:desc "Switch to a shared buffer" "b" #'crdt-switch-to-buffer
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; config/default/autoload/deferred.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; TODO generalize this
|
||||
;; REVIEW: Generalize this
|
||||
;;;###autoload
|
||||
(defun +default/lsp-command-map ()
|
||||
"Lazily invoke `lsp-command-map'."
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"Browse files from the current project's root."
|
||||
(interactive)
|
||||
(doom-project-browse (or (doom-project-root) default-directory)))
|
||||
;; NOTE No need for find-in-project, use `projectile-find-file'
|
||||
;; NOTE: No need for find-in-project, use `projectile-find-file'
|
||||
|
||||
;;;###autoload
|
||||
(defun +default/browse-templates ()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
"Interactively select what text to insert from the kill ring."
|
||||
(interactive)
|
||||
(call-interactively
|
||||
(cond ((fboundp 'consult-yank-pop) #'consult-yank-pop) ;HACK see @ymarco's comment on #5013 and TODO.org in the selecturm module.
|
||||
(cond ((fboundp 'consult-yank-pop) #'consult-yank-pop) ; HACK: see @ymarco's comment on #5013
|
||||
((fboundp 'counsel-yank-pop) #'counsel-yank-pop)
|
||||
((fboundp 'helm-show-kill-ring) #'helm-show-kill-ring)
|
||||
((error "No kill-ring search backend available. Enable ivy, helm or vertico!")))))
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@
|
|||
python-mode-map)
|
||||
(kbd "DEL") nil))
|
||||
;; Interferes with the def snippet in doom-snippets
|
||||
;; TODO Fix this upstream, in doom-snippets, instead
|
||||
;; TODO: Fix this upstream, in doom-snippets, instead
|
||||
(setq sp-python-insert-colon-in-function-definitions nil))))
|
||||
|
||||
|
||||
|
|
@ -273,16 +273,15 @@
|
|||
;; e) do none of this when inside a string
|
||||
(advice-add #'delete-backward-char :override #'+default--delete-backward-char-a)
|
||||
|
||||
;; HACK Makes `newline-and-indent' continue comments (and more reliably).
|
||||
;; Consults `doom-point-in-comment-p' to detect a commented region and uses
|
||||
;; that mode's `comment-line-break-function' to continue comments. If
|
||||
;; neither exists, it will fall back to the normal behavior of
|
||||
;; `newline-and-indent'.
|
||||
;; HACK: Makes `newline-and-indent' continue comments (and more reliably).
|
||||
;; Consults `doom-point-in-comment-p' to detect a commented region and uses
|
||||
;; that mode's `comment-line-break-function' to continue comments. If neither
|
||||
;; exists, it will fall back to the normal behavior of `newline-and-indent'.
|
||||
;;
|
||||
;; We use an advice here instead of a remapping because many modes define
|
||||
;; and remap to their own newline-and-indent commands, and tackling all
|
||||
;; those cases was judged to be more work than dealing with the edge cases
|
||||
;; on a case by case basis.
|
||||
;; We use an advice here instead of a remapping because many modes define and
|
||||
;; remap to their own newline-and-indent commands, and tackling all those
|
||||
;; cases was judged to be more work than dealing with the edge cases on a case
|
||||
;; by case basis.
|
||||
(defadvice! +default--newline-indent-and-continue-comments-a (&rest _)
|
||||
"A replacement for `newline-and-indent'.
|
||||
Continues comments if executed from a commented line."
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@
|
|||
(defun use-package-handler/:magic-minor (name _ arg rest state)
|
||||
(use-package-handle-mode name 'auto-minor-mode-magic-alist arg rest state))
|
||||
|
||||
;; HACK Fix `:load-path' so it resolves relative paths to the containing file,
|
||||
;; rather than `user-emacs-directory'. This is a done as a convenience
|
||||
;; for users, wanting to specify a local directory.
|
||||
;; HACK: Fix `:load-path' so it resolves relative paths to the containing
|
||||
;; file, rather than `user-emacs-directory'. This is a done as a convenience
|
||||
;; for users, wanting to specify a local directory.
|
||||
(defadvice! doom--resolve-load-path-from-containg-file-a (fn label arg &optional recursed)
|
||||
"Resolve :load-path from the current directory."
|
||||
:around #'use-package-normalize-paths
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
;;
|
||||
;;; Custom commands
|
||||
;; Editing
|
||||
(evil-ex-define-cmd "@" #'+evil:macro-on-all-lines) ; TODO Test me
|
||||
(evil-ex-define-cmd "@" #'+evil:macro-on-all-lines)
|
||||
(evil-ex-define-cmd "R[ead]" #'+evil:read)
|
||||
(evil-ex-define-cmd "al[ign]" #'+evil:align)
|
||||
(evil-ex-define-cmd "ral[ign]" #'+evil:align-right)
|
||||
|
|
@ -17,16 +17,16 @@
|
|||
(evil-ex-define-cmd "l[ine]diff" #'evil-quick-diff)
|
||||
|
||||
;;; External resources
|
||||
;; TODO (evil-ex-define-cmd "db" #'doom:db)
|
||||
;; TODO (evil-ex-define-cmd "dbu[se]" #'doom:db-select)
|
||||
;; TODO (evil-ex-define-cmd "go[ogle]" #'doom:google-search)
|
||||
;; TODO: (evil-ex-define-cmd "db" #'doom:db)
|
||||
;; TODO: (evil-ex-define-cmd "dbu[se]" #'doom:db-select)
|
||||
;; TODO: (evil-ex-define-cmd "go[ogle]" #'doom:google-search)
|
||||
(evil-ex-define-cmd "lo[okup]" #'+lookup:online)
|
||||
(evil-ex-define-cmd "dash" #'+lookup:dash)
|
||||
(evil-ex-define-cmd "http" #'httpd-start) ; start http server
|
||||
(evil-ex-define-cmd "repl" #'+eval:repl) ; invoke or send to repl
|
||||
(evil-ex-define-cmd "h[elp]" #'+evil:help)
|
||||
|
||||
;; TODO (evil-ex-define-cmd "rx" 'doom:regex) ; open re-builder
|
||||
;; TODO: (evil-ex-define-cmd "rx" 'doom:regex) ; open re-builder
|
||||
(evil-ex-define-cmd "sh[ell]" #'+eshell:run)
|
||||
(evil-ex-define-cmd "pad" #'+evil:open-scratch-buffer)
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ more information on modifiers."
|
|||
(setq evil-auto-indent nil)
|
||||
(goto-char pos)
|
||||
(let ((ws (abs (skip-chars-backward " \t"))))
|
||||
;; FIXME oh god why
|
||||
;; REVIEW: There must be a better way...
|
||||
(save-excursion
|
||||
(if comment-line-break-function
|
||||
(funcall comment-line-break-function nil)
|
||||
|
|
@ -107,7 +107,7 @@ more information on modifiers."
|
|||
(if comment-line-break-function
|
||||
(funcall comment-line-break-function nil)
|
||||
(comment-indent-new-line)))
|
||||
;; TODO Find a better way to do this
|
||||
;; TODO: Find a better way to do this
|
||||
((and (eq major-mode 'haskell-mode)
|
||||
(fboundp 'haskell-indentation-newline-and-indent))
|
||||
(setq evil-auto-indent nil)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
By default, this only recognizes C preproc directives. To change this see
|
||||
`+evil-preprocessor-regexp'."
|
||||
(interactive "p")
|
||||
;; TODO More generalized search, to support directives in other languages?
|
||||
;; TODO: More generalized search, to support directives in other languages?
|
||||
(if (re-search-forward +evil-preprocessor-regexp nil t count)
|
||||
(goto-char (match-beginning 0))
|
||||
(user-error "No preprocessor directives %s point"
|
||||
|
|
@ -140,7 +140,7 @@ See `+evil/next-preproc-directive' for details."
|
|||
;;
|
||||
;;; Encoding/Decoding
|
||||
|
||||
;; NOTE For ]x / [x see :lang web
|
||||
;; NOTE: For ]x / [x see :lang web
|
||||
;; - `+web:encode-html-entities'
|
||||
;; - `+web:decode-html-entities'
|
||||
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ don't have a :trigger property in `+file-templates-alist'.")
|
|||
("\\.class\\.php$" :trigger "__.class.php" :mode php-mode)
|
||||
(php-mode)
|
||||
;; Python
|
||||
;; TODO ("tests?/test_.+\\.py$" :trigger "__" :mode nose-mode)
|
||||
;; TODO ("/setup\\.py$" :trigger "__setup.py" :mode python-mode)
|
||||
;; TODO: ("tests?/test_.+\\.py$" :trigger "__" :mode nose-mode)
|
||||
;; TODO: ("/setup\\.py$" :trigger "__setup.py" :mode python-mode)
|
||||
(python-mode)
|
||||
;; Ruby
|
||||
("/lib/.+\\.rb$" :trigger "__module" :mode ruby-mode :project t)
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
(defvar evil-mc-key-map (make-sparse-keymap))
|
||||
|
||||
:config
|
||||
;; HACK evil-mc's design is bizarre. Its variables and hooks are lazy loaded
|
||||
;; HACK: evil-mc's design is bizarre. Its variables and hooks are lazy loaded
|
||||
;; rather than declared at top-level, some hooks aren't defined or
|
||||
;; documented, it's a bit initializer-function drunk, and its minor modes
|
||||
;; are intended to be perpetually active -- even when no cursors are active
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
(letf! ((#'evil-mc-initialize-vars #'ignore))
|
||||
(apply fn args)))
|
||||
|
||||
;; REVIEW This is tremendously slow on macos and windows for some reason.
|
||||
;; REVIEW: This is tremendously slow on macos and windows for some reason.
|
||||
(setq evil-mc-enable-bar-cursor (featurep :system 'linux))
|
||||
|
||||
(after! smartparens
|
||||
|
|
@ -112,8 +112,8 @@
|
|||
(or (cdr fn)
|
||||
#'evil-mc-execute-default-call-with-count))))))
|
||||
|
||||
;; HACK Allow these commands to be repeated by prefixing them with a numerical
|
||||
;; argument. See gabesoft/evil-mc#110
|
||||
;; HACK: Allow these commands to be repeated by prefixing them with a
|
||||
;; numerical argument. See gabesoft/evil-mc#110
|
||||
(defadvice! +multiple-cursors--make-repeatable-a (fn)
|
||||
:around '(evil-mc-make-and-goto-first-cursor
|
||||
evil-mc-make-and-goto-last-cursor
|
||||
|
|
@ -165,7 +165,7 @@
|
|||
;; Can't use `mc/cmds-to-run-once' because mc-lists.el overwrites it
|
||||
(add-to-list 'mc--default-cmds-to-run-once 'swiper-mc)
|
||||
|
||||
;; TODO multiple-cursors config for Emacs users?
|
||||
;; TODO: multiple-cursors config for Emacs users?
|
||||
|
||||
;; mc doesn't play well with evil, this attempts to assuage some of its
|
||||
;; problems so that any plugins that depend on multiple-cursors (which I have
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@
|
|||
(add-to-list 'load-path +snippets-dir)
|
||||
(require 'doom-snippets nil t)
|
||||
|
||||
;; HACK In case `+snippets-dir' and `doom-snippets-dir' are the same, or
|
||||
;; duplicates exist in `yas-snippet-dirs'.
|
||||
;; HACK: In case `+snippets-dir' and `doom-snippets-dir' are the same, or
|
||||
;; duplicates exist in `yas-snippet-dirs'.
|
||||
(advice-add #'yas-snippet-dirs :filter-return #'delete-dups)
|
||||
|
||||
;; Remove GUI dropdown prompt (prefer ivy/helm)
|
||||
|
|
@ -85,14 +85,14 @@
|
|||
(:map snippet-mode-map
|
||||
"C-c C-k" #'+snippet--abort))
|
||||
|
||||
;; REVIEW Fix #2639: For some reason `yas--all-templates' returns duplicates
|
||||
;; of some templates. Until I figure out the real cause this fixes it.
|
||||
;; REVIEW: Fix #2639: For some reason `yas--all-templates' returns duplicates
|
||||
;; of some templates. Until I figure out the real cause this fixes it.
|
||||
(defadvice! +snippets--remove-duplicates-a (templates)
|
||||
:filter-return #'yas--all-templates
|
||||
(cl-delete-duplicates templates :test #'equal))
|
||||
|
||||
;; HACK Smartparens will interfere with snippets expanded by `hippie-expand`,
|
||||
;; so temporarily disable smartparens during snippet expansion.
|
||||
;; HACK: Smartparens will interfere with snippets expanded by `hippie-expand`,
|
||||
;; so temporarily disable smartparens during snippet expansion.
|
||||
(after! hippie-exp
|
||||
(defvar +snippets--smartparens-enabled-p t)
|
||||
(defvar +snippets--expanding-p nil)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ too, so strings take the form: \"POSITION ~ LABEL @ URL\"."
|
|||
(url (when (stringp raw-url)
|
||||
(propertize raw-url 'face 'link)))
|
||||
(label (replace-regexp-in-string
|
||||
"\n" " " ; NOTE 2021-07-25: newlines break completion
|
||||
"\n" " " ; 2021-07-25: newlines break completion
|
||||
(buffer-substring-no-properties
|
||||
start-point-prop end-point-prop)))
|
||||
(point start-point-prop)
|
||||
|
|
@ -47,7 +47,7 @@ too, so strings take the form: \"POSITION ~ LABEL @ URL\"."
|
|||
(start-point-prop (prop-match-beginning match))
|
||||
(end-point-prop (prop-match-end match))
|
||||
(text (replace-regexp-in-string
|
||||
"\n" " " ; NOTE 2021-07-25: newlines break completion
|
||||
"\n" " " ; 2021-07-25: newlines break completion
|
||||
(buffer-substring-no-properties
|
||||
start-point-prop end-point-prop))))
|
||||
(cond
|
||||
|
|
|
|||
|
|
@ -36,11 +36,11 @@
|
|||
;; is our priority within Emacs
|
||||
(setq undo-fu-session-compression 'zst))
|
||||
|
||||
;; HACK Fix #4993: we've advised `make-backup-file-name-1' to produced SHA1'ed
|
||||
;; filenames to prevent file paths that are too long, so we force
|
||||
;; `undo-fu-session--make-file-name' to use it instead of its own
|
||||
;; home-grown overly-long-filename generator.
|
||||
;; TODO PR this upstream; should be a universal issue
|
||||
;; HACK: Fix #4993: we've advised `make-backup-file-name-1' to produced
|
||||
;; SHA1'ed filenames to prevent file paths that are too long, so we force
|
||||
;; `undo-fu-session--make-file-name' to use it instead of its own home-grown
|
||||
;; overly-long-filename generator.
|
||||
;; TODO: PR this upstream; should be a universal issue
|
||||
(defadvice! +undo-fu-make-hashed-session-file-name-a (file)
|
||||
:override #'undo-fu-session--make-file-name
|
||||
(concat (let ((backup-directory-alist `(("." . ,undo-fu-session-directory))))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; emacs/vc/autoload/bug-reference-backport.el -*- lexical-binding: t; -*-
|
||||
;;;###if (< emacs-major-version 28)
|
||||
;; DEPRECATED Remove when Emacs 27.x support is dropped
|
||||
;; DEPRECATED: Remove when Emacs 27.x support is dropped
|
||||
|
||||
;; In Emacs 28, the built-in bug-reference package started consulting vc for
|
||||
;; repo information (to inform its bug reference URLs). This incredibly useful
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
;; `header-line-format', which has better visibility.
|
||||
(setq git-timemachine-show-minibuffer-details t)
|
||||
|
||||
;; TODO PR this to `git-timemachine'
|
||||
;; REVIEW: PR this to `git-timemachine'
|
||||
(defadvice! +vc-support-git-timemachine-a (fn)
|
||||
"Allow `browse-at-remote' commands in git-timemachine buffers to open that
|
||||
file in your browser at the visited revision."
|
||||
|
|
@ -159,17 +159,15 @@ info in the `header-line-format' is a more visible indicator."
|
|||
;; using commit hashes rather than branch names.
|
||||
(setq browse-at-remote-prefer-symbolic nil)
|
||||
|
||||
;; Add codeberg.org support
|
||||
;; TODO: PR this upstream?
|
||||
;; Expand recognition for more forges (like self-hosted gitlab.* subdomains
|
||||
;; and codeberg).
|
||||
;; REVIEW: PR these upstream?
|
||||
(add-to-list 'browse-at-remote-remote-type-regexps '(:host "^codeberg\\.org$" :type "codeberg"))
|
||||
;; Expand recognition for gitlab hosts besides gitlab.org or gitlab.gnome.org
|
||||
;; which are presumably hosted in a gitlab.* subdomain.
|
||||
;; TODO: PR this upstream?
|
||||
(add-to-list 'browse-at-remote-remote-type-regexps '(:host "^gitlab\\." :type "gitlab") 'append)
|
||||
|
||||
;; HACK `browse-at-remote' produces urls with `nil' in them, when the repo is
|
||||
;; detached. This creates broken links. I think it is more sensible to
|
||||
;; fall back to master in those cases.
|
||||
;; HACK: `browse-at-remote' produces urls with `nil' in them, when the repo is
|
||||
;; detached. This creates broken links. I think it is more sensible to fall
|
||||
;; back to master in those cases.
|
||||
(defadvice! +vc--fallback-to-master-branch-a ()
|
||||
"Return 'master' in detached state."
|
||||
:after-until #'browse-at-remote--get-local-branch
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ default/fallback account."
|
|||
(defun +mu4e/compose ()
|
||||
"Compose a new email."
|
||||
(interactive)
|
||||
;; TODO Interactively select email account
|
||||
;; TODO: Interactively select email account
|
||||
(call-interactively #'mu4e-compose-new))
|
||||
|
||||
(defun +mu4e--get-string-width (str)
|
||||
|
|
@ -279,7 +279,7 @@ attach a file, or select a folder to open dired in and select file attachments
|
|||
(using `dired-mu4e-attach-ctrl-c-ctrl-c').
|
||||
|
||||
When otherwise called, open a dired buffer and enable `dired-mu4e-attach-ctrl-c-ctrl-c'."
|
||||
;; TODO add ability to attach files (+dirs) as a single (named) archive
|
||||
;; TODO: add ability to attach files (+dirs) as a single (named) archive
|
||||
(interactive "p")
|
||||
(pcase major-mode
|
||||
((or 'mu4e-compose-mode 'org-msg-edit-mode)
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ is non-nil."
|
|||
(add-to-list 'mu4e-bookmarks
|
||||
'("flag:flagged" "Flagged messages" ?f) t)
|
||||
|
||||
;; TODO avoid assuming that nerd-icons is present
|
||||
;; TODO: avoid assuming that nerd-icons is present
|
||||
(defvar +mu4e-header-colorized-faces
|
||||
'(nerd-icons-green
|
||||
nerd-icons-lblue
|
||||
|
|
@ -598,7 +598,7 @@ See `+mu4e-msg-gmail-p' and `mu4e-sent-messages-behavior'.")
|
|||
|
||||
;; don't save message to Sent Messages, Gmail/IMAP takes care of this
|
||||
(setq mu4e-sent-messages-behavior
|
||||
(lambda () ;; TODO make use +mu4e-msg-gmail-p
|
||||
(lambda () ;; TODO: make use +mu4e-msg-gmail-p
|
||||
(if (or (string-match-p "@gmail.com\\'" (message-sendmail-envelope-from))
|
||||
(member (message-sendmail-envelope-from)
|
||||
(mapcar #'car +mu4e-gmail-accounts)))
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
(`gmi
|
||||
(concat "cd " +notmuch-mail-folder " && gmi sync && notmuch new"))
|
||||
((or `mbsync
|
||||
`mbsync-xdg) ; DEPRECATED `mbsync-xdg' is now just `mbsync'
|
||||
`mbsync-xdg) ; DEPRECATED: `mbsync-xdg' is now just `mbsync'
|
||||
(format "mbsync %s -a && notmuch new"
|
||||
(if-let* ((config-file
|
||||
(doom-glob (or (getenv "XDG_CONFIG_HOME")
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
;;; email/notmuch/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; FIXME This module is a WIP!
|
||||
|
||||
(defvar +notmuch-home-function #'notmuch
|
||||
"Function for customizing the landing page for doom-emacs =notmuch.")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; app/wanderlust/packages.el
|
||||
|
||||
;; 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.
|
||||
;; 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 (:host github :repo "wanderlust/apel" :branch "apel-wl")
|
||||
:pin "2383abfd3a27c094ae9095b05103167cf810379b")
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ If 'strict, the module does a normal swap and 'c' bindings go to 'h', 'r' bindin
|
|||
In all cases, 'h' functions go to 'c' and 'l' ones go to 'r' so the navigation keys still feel vim-like.")
|
||||
|
||||
;; Highlight non breaking spaces as error in prog modes only
|
||||
;; REVIEW `nobreak-char-display' is defined in xdisp.c; will that work in non-X
|
||||
;; builds? From early observations in sway+pgtk, it does not.
|
||||
;; REVIEW: `nobreak-char-display' is defined in xdisp.c; will that work in non-X
|
||||
;; builds? From early observations in sway+pgtk, it does not.
|
||||
(setq nobreak-char-display t)
|
||||
(set-face-attribute 'nobreak-space nil :underline t)
|
||||
|
||||
|
|
@ -20,8 +20,8 @@ In all cases, 'h' functions go to 'c' and 'l' ones go to 'r' so the navigation k
|
|||
;;
|
||||
;;; Initializers
|
||||
|
||||
;; TODO Separate each package into their own hook, so users can
|
||||
;; enable/disable/add their own per-package remappings.
|
||||
;; TODO: Separate each package into their own hook, so users can
|
||||
;; enable/disable/add their own per-package remappings.
|
||||
|
||||
(defun +layout-remap-keys-for-bepo-h ()
|
||||
(setq avy-keys '(?a ?u ?i ?e ?, ?c ?t ?s ?r ?n)
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ This is ignored by ccls.")
|
|||
(add-to-list 'find-sibling-rules '("/\\([^/]+\\)\\.c\\(c\\|pp\\)?\\'" "\\1.h\\(h\\|pp\\)?\\'"))
|
||||
(add-to-list 'find-sibling-rules '("/\\([^/]+\\)\\.h\\(h\\|pp\\)?\\'" "\\1.c\\(c\\|pp\\)?\\'"))
|
||||
|
||||
;; HACK Suppress 'Args out of range' error in when multiple modifications are
|
||||
;; performed at once in a `c++-mode' buffer, e.g. with `iedit' or
|
||||
;; multiple cursors.
|
||||
;; HACK: Suppress 'Args out of range' error in when multiple modifications are
|
||||
;; performed at once in a `c++-mode' buffer, e.g. with `iedit' or multiple
|
||||
;; cursors.
|
||||
(undefadvice! +cc--suppress-silly-errors-a (fn &rest args)
|
||||
:around #'c-after-change-mark-abnormal-strings
|
||||
(ignore-errors (apply fn args)))
|
||||
|
|
@ -205,7 +205,6 @@ This is ignored by ccls.")
|
|||
:map c++-mode-map
|
||||
:desc "Show type inheritance hierarchy" "ct" #'+cc/eglot-ccls-inheritance-hierarchy)
|
||||
|
||||
;; NOTE : This setting is untested yet
|
||||
(after! eglot
|
||||
(when (featurep :system 'macos)
|
||||
(add-to-list 'eglot-workspace-configuration
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ at point."
|
|||
(defun +clojure/open-repl (&optional arg type)
|
||||
"Open a Cider REPL for clojure and return the buffer."
|
||||
(interactive "P")
|
||||
;; TODO Better error handling
|
||||
;; TODO: Better error handling.
|
||||
;; type is `clj' for clojure and `cljs' for clojurescript
|
||||
;; ... with no type specified, assume `clj'.
|
||||
(let ((type (or type 'clj)))
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
;; library being loaded only when is absolutely needed, which is too late for
|
||||
;; reconfiguration in many cases.
|
||||
(use-package! cider-mode
|
||||
;; NOTE if `org-directory' doesn't exist, `cider-jack' in won't work
|
||||
;; NOTE: If `org-directory' doesn't exist, `cider-jack' in won't work
|
||||
:hook (clojure-mode-local-vars . cider-mode)
|
||||
:hook (clojurec-mode-local-vars . cider-mode)
|
||||
:hook (clojurescript-mode-local-vars . cider-mode)
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
clojurec-mode clojure-ts-clojurec-mode)
|
||||
#'cider-eval-region))
|
||||
|
||||
;; HACK Fix radian-software/radian#446: CIDER tries to calculate the frame's
|
||||
;; HACK: Fix radian-software/radian#446: CIDER tries to calculate the frame's
|
||||
;; background too early; sometimes before the initial frame has been
|
||||
;; initialized, causing errors.
|
||||
(defvar cider-docview-code-background-color nil)
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/clojure/packages.el
|
||||
|
||||
;; HACK Fix #5577. Paredit is a cider dependency. We install paredit ourselves
|
||||
;; to get it from emacsmirror, because the original upstream is a custom
|
||||
;; git server with shallow clones disabled.
|
||||
;; HACK: Fix #5577. Paredit is a cider dependency. We install paredit ourselves
|
||||
;; to get it from emacsmirror, because the original upstream is a custom git
|
||||
;; server with shallow clones disabled.
|
||||
(package! paredit
|
||||
:recipe (:host github :repo "emacsmirror/paredit")
|
||||
:pin "af075775af91f2dbc63b915d762b4aec092946c4")
|
||||
|
||||
;; HACK Forward declare these clj-refactor/cider deps so that their deps are
|
||||
;; byte-compiled first.
|
||||
;; HACK: Forward declare these clj-refactor/cider deps so that their deps are
|
||||
;; byte-compiled first.
|
||||
(package! parseclj :pin "6af22372e0fe14df882dd300b22b12ba2d7e00b0")
|
||||
(package! parseedn :pin "3407e4530a367b6c2b857dae261cdbb67a440aaa")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
;;; lang/common-lisp/autoload/common-lisp.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; HACK Fix #1772: void-variable sly-contribs errors due to sly packages (like
|
||||
;; `sly-macrostep') trying to add to `sly-contribs' before it is defined.
|
||||
;; HACK: Fix #1772: void-variable sly-contribs errors due to sly packages (like
|
||||
;; `sly-macrostep') trying to add to `sly-contribs' before it is defined.
|
||||
;;;###autoload (defvar sly-contribs '(sly-fancy))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@
|
|||
;; This needs to be appended so it fires later than `sly-editing-mode'
|
||||
(add-hook 'lisp-mode-local-vars-hook #'sly-lisp-indent-compatibility-mode 'append)
|
||||
|
||||
;; HACK Ensures that sly's contrib modules are loaded as soon as possible, but
|
||||
;; also as late as possible, so users have an opportunity to override
|
||||
;; `sly-contrib' in an `after!' block.
|
||||
;; HACK: Ensures that sly's contrib modules are loaded as soon as possible,
|
||||
;; but also as late as possible, so users have an opportunity to override
|
||||
;; `sly-contrib' in an `after!' block.
|
||||
(add-hook! 'after-init-hook (after! sly (sly-setup)))
|
||||
|
||||
:config
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
;; Doom syncs other indent variables with `tab-width'; we trust major modes to
|
||||
;; set it -- which most of them do -- but coq-mode doesn't, so...
|
||||
tab-width proof-indent
|
||||
;; HACK Fix #2081: Doom continues comments on RET, but coq-mode doesn't have a
|
||||
;; sane `comment-line-break-function', so...
|
||||
;; HACK: Fix #2081: Doom continues comments on RET, but coq-mode doesn't have
|
||||
;; a sane `comment-line-break-function', so...
|
||||
comment-line-break-function nil)
|
||||
|
||||
;; We've replaced coq-mode abbrevs with yasnippet snippets (in the snippets
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ if it's callable, `apropos' otherwise."
|
|||
#'helpful-at-point
|
||||
#'describe-symbol)))))
|
||||
|
||||
;; DEPRECATED Remove when 28 support is dropped.
|
||||
;; DEPRECATED: Remove when 28 support is dropped.
|
||||
(unless (fboundp 'lisp--local-defform-body-p)
|
||||
(fset 'lisp--local-defform-body-p #'ignore))
|
||||
|
||||
|
|
@ -534,7 +534,7 @@ Adapted from URL `https://www.reddit.com/r/emacs/comments/d7x7x8/finally_fixing_
|
|||
(ignore-errors
|
||||
(or (save-excursion
|
||||
(goto-char first)
|
||||
;; FIXME Can we avoid `syntax-ppss'?
|
||||
;; FIXME: Can we avoid `syntax-ppss'?
|
||||
(when-let* ((parse-sexp-ignore-comments t)
|
||||
(end (scan-lists (point) 1 0))
|
||||
(depth (ppss-depth (syntax-ppss))))
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@
|
|||
'(company-R-args company-R-objects company-dabbrev-code :separate))
|
||||
|
||||
(setq-hook! 'ess-r-mode-hook
|
||||
;; HACK Fix #2233: Doom continues comments on RET, but ess-r-mode doesn't
|
||||
;; have a sane `comment-line-break-function', so...
|
||||
;; HACK: Fix #2233: Doom continues comments on RET, but ess-r-mode doesn't
|
||||
;; have a sane `comment-line-break-function', so...
|
||||
comment-line-break-function nil)
|
||||
|
||||
;; HACK: make the REPL buffer more responsive.
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
:config
|
||||
(set-company-backend! '(faust-mode faustine-mode) '(company-dabbrev-code +faust-company-backend company-yasnippet))
|
||||
|
||||
;; HACK Both `faust-mode' and `faustine-mode' are hardcoded to use
|
||||
;; auto-complete. This silences the obnoxious 'You really should install and
|
||||
;; use auto-complete' warnings when starting them.
|
||||
;; HACK: Both `faust-mode' and `faustine-mode' are hardcoded to use
|
||||
;; auto-complete. This silences the obnoxious 'You really should install and
|
||||
;; use auto-complete' warnings when starting them.
|
||||
(defvar ac-modes nil)
|
||||
(defvar ac-sources nil)
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@
|
|||
(after! julia-mode
|
||||
(set-repl-handler! 'julia-mode #'+julia/open-snail-repl
|
||||
:persist t
|
||||
;; FIXME These aren't working as expected
|
||||
;; FIXME: These aren't working as expected
|
||||
:send-region #'julia-snail-send-region
|
||||
:send-buffer #'julia-snail-send-buffer-file))
|
||||
|
||||
|
|
|
|||
|
|
@ -22,4 +22,4 @@
|
|||
(unless (zerop (car (apply #'doom-call-process args)))
|
||||
(warn! "Couldn't find LanguageServer.jl and/or SymbolServer.jl"))))
|
||||
|
||||
;; TODO Check for snail
|
||||
;; TODO: Check for snail
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ nimsuggest isn't installed."
|
|||
(set-formatter! 'nmfmt '("nimpretty" filepath) :modes '(nim-mode))
|
||||
|
||||
(when (featurep :system 'windows)
|
||||
;; TODO File PR/report upstream (https://github.com/nim-lang/nim-mode)
|
||||
;; TODO: File PR/report upstream (https://github.com/nim-lang/nim-mode)
|
||||
(defadvice! +nim--suggest-get-temp-file-name-a (path)
|
||||
"Removes invalid characters from the temp file path, including the unicode
|
||||
character that colon is replaced with, which is known to cause issues on
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
"Look up documentation on a nix option."
|
||||
(interactive
|
||||
(list
|
||||
;; REVIEW Must be a better way to do this
|
||||
;; REVIEW: Must be a better way to do this
|
||||
(when (and (looking-at-p "[a-zA-Z0-9-_\\.]")
|
||||
(not (doom-point-in-string-or-comment-p)))
|
||||
(buffer-substring-no-properties
|
||||
|
|
@ -30,8 +30,8 @@
|
|||
(require 'nixos-options)
|
||||
(cond ((modulep! :completion helm)
|
||||
(require 'helm-nixos-options)
|
||||
;; REVIEW We reimplment `helm-nixos-options' so we can supply
|
||||
;; `initial-input'. Maybe use `helm-attrset' instead?
|
||||
;; REVIEW: We reimplment `helm-nixos-options' so we can supply
|
||||
;; `initial-input'. Maybe use `helm-attrset' instead?
|
||||
(helm :sources `(,(helm-source-nixos-options-search))
|
||||
:buffer "*helm-nixos-options*"
|
||||
:input initial-input))
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
(prog1 (set-auto-mode-0 mode)
|
||||
(when (eq major-mode 'sh-mode)
|
||||
(sh-set-shell interp))
|
||||
;; HACK Without this, quickrun tries to evaluate code directly
|
||||
;; with (cached)?nix-shell.
|
||||
;; TODO Use the nix-shell/cached-nix-shell-given interpreter
|
||||
;; HACK: Without this, quickrun tries to evaluate code directly
|
||||
;; with (cached)?nix-shell.
|
||||
;; TODO: Use the nix-shell/cached-nix-shell-given interpreter
|
||||
(setq-local quickrun-option-shebang nil))))))))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
;;; lang/org/autoload/org-refile.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; REVIEW These are all proof-of-concept. Refactor me!
|
||||
;; REVIEW: These are all proof-of-concept. Refactor me!
|
||||
|
||||
;;;###autoload
|
||||
(defun +org/refile-to-current-file (arg &optional file)
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ Otherwise, falls back to `org-fill-paragraph' to reflow paragraphs."
|
|||
(interactive)
|
||||
(let ((element (org-element-at-point)))
|
||||
(cond ((doom-region-active-p)
|
||||
;; TODO Perform additional formatting?
|
||||
;; TODO: Perform additional formatting?
|
||||
;; (save-restriction
|
||||
;; (narrow-to-region beg end)
|
||||
;; (org-table-recalculate t)
|
||||
|
|
|
|||
|
|
@ -140,9 +140,12 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
|
|||
|
||||
(plist-put org-format-latex-options :scale 1.5) ; larger previews
|
||||
|
||||
;; HACK Face specs fed directly to `org-todo-keyword-faces' don't respect
|
||||
;; underlying faces like the `org-todo' face does, so we define our own
|
||||
;; intermediary faces that extend from org-todo.
|
||||
;; HACK: Face specs fed directly to `org-todo-keyword-faces' don't respect
|
||||
;; underlying faces like the `org-todo' face does, so we define our own
|
||||
;; intermediary faces that extend from org-todo.
|
||||
;; REVIEW: On one hand, this config is too opinionated, on the other, these
|
||||
;; are the most commonly reconfigured variables in Org so they don't step on
|
||||
;; many toes. Consider either removing or simplifying this!
|
||||
(with-no-warnings
|
||||
(custom-declare-face '+org-todo-active '((t (:inherit (bold font-lock-constant-face org-todo)))) "")
|
||||
(custom-declare-face '+org-todo-project '((t (:inherit (bold font-lock-doc-face org-todo)))) "")
|
||||
|
|
@ -407,8 +410,8 @@ I like:
|
|||
(when (bound-and-true-p org-capture-is-refiling)
|
||||
(save-buffer))))
|
||||
|
||||
;; HACK Doom doesn't support `customize'. Best not to advertise it as an
|
||||
;; option in `org-capture's menu.
|
||||
;; HACK: Doom doesn't support `customize'. Best not to advertise it as an
|
||||
;; option in `org-capture's menu.
|
||||
(defadvice! +org--remove-customize-option-a (fn table title &optional prompt specials)
|
||||
:around #'org-mks
|
||||
(funcall fn table title prompt
|
||||
|
|
@ -1066,9 +1069,9 @@ between the two."
|
|||
#'+org-link-doom--help-echo-from-textprop)
|
||||
(+org-link-doom--help-echo-from-textprop nil (current-buffer) (point)))))
|
||||
|
||||
;; HACK Fix #2972: infinite recursion when eldoc kicks in 'org' or 'python'
|
||||
;; HACK: Fix #2972: infinite recursion when eldoc kicks in 'org' or 'python'
|
||||
;; src blocks.
|
||||
;; TODO Should be reported upstream!
|
||||
;; REVIEW: Should be reported upstream!
|
||||
(puthash "org" #'ignore org-eldoc-local-functions-cache)
|
||||
(puthash "plantuml" #'ignore org-eldoc-local-functions-cache)
|
||||
(puthash "python" #'python-eldoc-function org-eldoc-local-functions-cache))
|
||||
|
|
@ -1300,16 +1303,16 @@ between the two."
|
|||
;; Other org properties are all-caps. Be consistent.
|
||||
(setq org-effort-property "EFFORT")
|
||||
|
||||
;; HACK `org-id' doesn't check if `org-id-locations-file' exists or is
|
||||
;; writeable before trying to read/write to it, potentially throwing a
|
||||
;; file-error if it doesn't, which can leave Org in a broken state.
|
||||
;; HACK: `org-id' doesn't check if `org-id-locations-file' exists or is
|
||||
;; writeable before trying to read/write to it, potentially throwing a
|
||||
;; file-error if it doesn't, which can leave Org in a broken state.
|
||||
(defadvice! +org--fail-gracefully-a (fn &rest args)
|
||||
:around '(org-id-locations-save org-id-locations-load)
|
||||
(with-demoted-errors "org-id-locations: %s"
|
||||
(apply fn args)))
|
||||
|
||||
(add-hook 'org-open-at-point-functions #'doom-set-jump-h)
|
||||
;; HACK For functions that dodge `org-open-at-point-functions', like
|
||||
;; HACK: For functions that dodge `org-open-at-point-functions', like
|
||||
;; `org-id-open', `org-goto', or roam: links.
|
||||
(advice-add #'org-mark-ring-push :around #'doom-set-jump-a)
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
org-download-clipboard
|
||||
org-download-dnd-base64
|
||||
:init
|
||||
;; HACK We add these manually so that org-download is truly lazy-loaded
|
||||
;; HACK: We add these manually so that org-download is truly lazy-loaded
|
||||
(add-to-list 'dnd-protocol-alist '("^data:" . org-download-dnd-base64))
|
||||
(add-to-list 'dnd-protocol-alist '("^\\(?:https?\\|ftp\\|file\\|nfs\\):" . org-download-dnd))
|
||||
(advice-add #'org-download-enable :override #'ignore)
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
(use-package! org-journal
|
||||
:defer t
|
||||
:init
|
||||
;; HACK `org-journal' adds a `magic-mode-alist' entry for detecting journal
|
||||
;; files, but this causes us lazy loaders a big problem: an unacceptable
|
||||
;; delay on the first file the user opens, because calling the autoloaded
|
||||
;; `org-journal-is-journal' pulls all of `org' with it. So, we replace it
|
||||
;; with our own, extra layer of heuristics.
|
||||
;; HACK: `org-journal' adds a `magic-mode-alist' entry for detecting journal
|
||||
;; files, but this causes us lazy loaders a big problem: an unacceptable
|
||||
;; delay on the first file the user opens, because calling the autoloaded
|
||||
;; `org-journal-is-journal' pulls all of `org' with it. So, we replace it
|
||||
;; with our own, extra layer of heuristics.
|
||||
(add-to-list 'magic-mode-alist '(+org-journal-p . org-journal-mode))
|
||||
|
||||
(defun +org-journal-p ()
|
||||
|
|
@ -27,8 +27,9 @@
|
|||
org-journal-cache-file (file-name-concat doom-profile-cache-dir "org-journal"))
|
||||
|
||||
:config
|
||||
;; Remove the orginal journal file detector and rely on `+org-journal-p'
|
||||
;; instead, to avoid loading org-journal until the last possible moment.
|
||||
;; HACK: Remove the original journal file detector and rely on
|
||||
;; `+org-journal-p' instead, to avoid loading org-journal until the last
|
||||
;; possible moment.
|
||||
(setq magic-mode-alist (assq-delete-all 'org-journal-is-journal magic-mode-alist))
|
||||
|
||||
;; `org-journal' can't deal with symlinks, so resolve them here.
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ inserting the link."
|
|||
(add-to-list 'org-roam-node-template-prefixes '("doom-tags" . "#"))
|
||||
(add-to-list 'org-roam-node-template-prefixes '("doom-type" . "@"))
|
||||
|
||||
;; REVIEW Remove when addressed upstream. See org-roam/org-roam#2066.
|
||||
;; REVIEW: Remove when addressed upstream. See org-roam/org-roam#2066.
|
||||
(defadvice! +org--roam-fix-completion-width-for-vertico-a (fn &rest args)
|
||||
"Fixes completion candidate width for vertico users."
|
||||
:around #'org-roam-node-read--to-candidate
|
||||
|
|
@ -109,7 +109,7 @@ inserting the link."
|
|||
(add-hook 'org-roam-mode-hook #'turn-on-visual-line-mode)
|
||||
|
||||
;; Use a 'roam:X' link's description if X is empty.
|
||||
;; TODO PR this upstream?
|
||||
;; REVIEW: PR this upstream?
|
||||
(advice-add #'org-roam-link-follow-link :filter-args #'org-roam-link-follow-link-with-description-a)
|
||||
(advice-add #'org-roam-link-replace-at-point :override #'org-roam-link-replace-at-point-a)
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
(package! toc-org :pin "6d3ae0fc47ce79b1ea06cabe21a3c596395409cd")
|
||||
(package! org-cliplink :pin "13e0940b65d22bec34e2de4bc8cba1412a7abfbc")
|
||||
|
||||
;; TODO Adjust when this is added to GNU ELPA
|
||||
;; TODO: Adjust when this is added to GNU ELPA
|
||||
(when (modulep! +contacts)
|
||||
(package! org-contacts
|
||||
:recipe (:host github :repo "doomelpa/org-contacts")
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"Execute a block of plantuml code with org-babel.
|
||||
This function is called by `org-babel-execute-src-block'."
|
||||
(require 'plantuml-mode)
|
||||
;; REVIEW Refactor me
|
||||
;; REVIEW: Refactor me
|
||||
(let* ((body (replace-regexp-in-string
|
||||
"^[[:blank:]\n]*\\(@start\\)"
|
||||
"\\1"
|
||||
|
|
|
|||
|
|
@ -262,10 +262,10 @@
|
|||
(use-package! pip-requirements
|
||||
:defer t
|
||||
:config
|
||||
;; HACK `pip-requirements-mode' performs a sudden HTTP request to
|
||||
;; HACK: `pip-requirements-mode' performs a sudden HTTP request to
|
||||
;; https://pypi.org/simple, which causes unexpected hangs (see #5998). This
|
||||
;; advice defers this behavior until the first time completion is invoked.
|
||||
;; REVIEW More sensible behavior should be PRed upstream.
|
||||
;; REVIEW: More sensible behavior should be PRed upstream.
|
||||
(defadvice! +python--init-completion-a (&rest args)
|
||||
"Call `pip-requirements-fetch-packages' first time completion is invoked."
|
||||
:before #'pip-requirements-complete-at-point
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
:mode ("\\.rs\\'" . rustic-mode)
|
||||
:defer t
|
||||
:preface
|
||||
;; HACK `rustic' sets up some things too early. I'd rather disable it and let
|
||||
;; HACK: `rustic' sets up some things too early. I'd rather disable it and let
|
||||
;; our respective modules standardize how they're initialized.
|
||||
(setq rustic-lsp-client nil)
|
||||
(after! rustic-lsp
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
`((rust :url "https://github.com/tree-sitter/tree-sitter-rust"
|
||||
:rev ,(if (< (treesit-library-abi-version) 15) "v0.23.2" "v0.24.0")))))
|
||||
|
||||
;; HACK Certainly, `rustic-babel' does this, but the package (and many other
|
||||
;; HACK: Certainly, `rustic-babel' does this, but the package (and many other
|
||||
;; rustic packages) must be loaded in order for them to take effect. To lazy
|
||||
;; load it all, it must be done earlier:
|
||||
(after! org-src
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
(s-join " "))))
|
||||
(lsp--render-element (concat "```rust\n" sig cmt "\n```")))))))
|
||||
|
||||
;; HACK If lsp/eglot isn't available, it attempts to install lsp-mode via
|
||||
;; HACK: If lsp/eglot isn't available, it attempts to install lsp-mode via
|
||||
;; package.el. Doom manages its own dependencies through straight so disable
|
||||
;; this behavior to avoid package-not-initialized errors.
|
||||
(defadvice! +rust--dont-install-packages-a (&rest _)
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ property lists and names starting with 'default'."
|
|||
(goto-char (1+ (elt state 1)))
|
||||
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
|
||||
(if (and (elt state 2)
|
||||
;; NOTE looking-at -> looking-at-p
|
||||
;; XXX: looking-at -> looking-at-p
|
||||
(not (looking-at-p "\\sw\\|\\s_")))
|
||||
(progn
|
||||
;; NOTE (if (not ...) (progn ...)) -> (unless ... ...)
|
||||
;; XXX: (if (not ...) (progn ...)) -> (unless ... ...)
|
||||
(unless (> (save-excursion (forward-line 1) (point))
|
||||
calculate-lisp-indent-last-sexp)
|
||||
(goto-char calculate-lisp-indent-last-sexp)
|
||||
|
|
@ -23,7 +23,7 @@ property lists and names starting with 'default'."
|
|||
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t))
|
||||
(backward-prefix-chars)
|
||||
(current-column))
|
||||
;; NOTE let -> let* & moved `method' def into let bindings
|
||||
;; XXX: let -> let* & moved `method' def into let bindings
|
||||
(let* ((function (buffer-substring
|
||||
(point) (progn (forward-sexp 1) (point))))
|
||||
(method (or (get (intern-soft function) 'scheme-indent-function)
|
||||
|
|
@ -31,15 +31,15 @@ property lists and names starting with 'default'."
|
|||
(cond ((or (eq method 'defun)
|
||||
(and (null method)
|
||||
(> (length function) 3)
|
||||
;; NOTE string-match -> string-match-p
|
||||
;; NOTE The original regexp is "\\`def" but it will mess
|
||||
;; up indentation with such names as 'default-...'.
|
||||
;; XXX: string-match -> string-match-p
|
||||
;; XXX: The original regexp is "\\`def" but it will mess
|
||||
;; up indentation with such names as 'default-...'.
|
||||
(string-match-p "\\`def" function)))
|
||||
(lisp-indent-defform state indent-point))
|
||||
;; NOTE Added this clause to handle alignment of keyword symbols
|
||||
;; XXX: Added this clause to handle alignment of keyword symbols
|
||||
((and (null method)
|
||||
(> (length function) 1)
|
||||
;; NOTE string-match -> string-match-p
|
||||
;; XXX: string-match -> string-match-p
|
||||
(string-match-p "\\`:" function))
|
||||
(let ((lisp-body-indent 1))
|
||||
(lisp-indent-defform state indent-point)))
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
;;; lang/web/autoload/css.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; ;;;###autoload
|
||||
;; TODO (defun +css/scss-build ())
|
||||
;; TODO: (defun +css/scss-build ())
|
||||
|
||||
;; ;;;###autoload
|
||||
;; TODO (defun +css/sass-build ())
|
||||
;; TODO: (defun +css/sass-build ())
|
||||
|
||||
(defun +css--toggle-inline-or-block (beg end)
|
||||
(skip-chars-forward " \t")
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
;; Keep window title up-to-date. Should fail gracefully in non-xterm terminals.
|
||||
;; Only works in Emacs 27+.
|
||||
(setq xterm-set-window-title t)
|
||||
;; DEPRECATED Not needed on Emacs 28+. Remove when dropping 27 support.
|
||||
;; DEPRECATED: Not needed on Emacs 28+. Remove when dropping 27 support.
|
||||
(defadvice! +tty--only-set-window-title-in-tty-a (&optional terminal)
|
||||
"`xterm-set-window-title' fails in GUI Emacs. Stop that. Get some help."
|
||||
:before-while #'xterm-set-window-title
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
;; Despite its name, this works for macOS as well.
|
||||
(package! xclip :pin "9ab22517f3f2044e1c8c19be263da9803fbca26a"))
|
||||
|
||||
;; NOTE Despite the evil-* prefix, evil-terminal-cursor-changer does not depend
|
||||
;; on evil (anymore).
|
||||
;; Despite the evil-* prefix, evil-terminal-cursor-changer does not depend on
|
||||
;; evil (anymore).
|
||||
(package! evil-terminal-cursor-changer :pin "2358f3e27d89128361cf80fcfa092fdfe5b52fd8")
|
||||
|
||||
(package! kkp :pin "1a7b4f395aa4e1e04afc45fe2dbd6a045871803b")
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
;;; term/eshell/autoload/mode.el -*- lexical-binding: t; -*-
|
||||
;;;###if (< emacs-major-version 28)
|
||||
|
||||
;; DEPRECATED Remove this when we drop Emacs 27 support.
|
||||
;; DEPRECATED: Remove this when we drop Emacs 27 support.
|
||||
|
||||
;; HACK Eshell resets its keymap every time `eshell-mode' is enabled. This is
|
||||
;; HACK: Eshell resets its keymap every time `eshell-mode' is enabled. This is
|
||||
;; fixed in Emacs 28+, but this file backports that fix for 27 users. This
|
||||
;; way, keys can be safely bound to `eshell-mode-map' and `eshell-command-map'
|
||||
;; like any normal keymap, rather than a hook.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
;;; term/eshell/autoload/company.el -*- lexical-binding: t; -*-
|
||||
;;;###if (modulep! :completion company)
|
||||
|
||||
;; REVIEW Refactor me
|
||||
|
||||
(defvar company-pcomplete-available 'unknown)
|
||||
|
||||
(defun company-pcomplete--prefix ()
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
|
||||
(defun +eshell--current-git-branch ()
|
||||
;; TODO Refactor me
|
||||
;; REVIEW: Refactor me
|
||||
(cl-destructuring-bind (status . output)
|
||||
(doom-call-process "git" "symbolic-ref" "-q" "--short" "HEAD")
|
||||
(if (equal status 0)
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ You should use `set-eshell-alias!' to change this.")
|
|||
eshell-scroll-to-bottom-on-output 'all
|
||||
eshell-kill-processes-on-exit t
|
||||
eshell-hist-ignoredups t
|
||||
;; don't record command in history if prefixed with whitespace
|
||||
;; TODO Use `eshell-input-filter-initial-space' when Emacs 25 support is dropped
|
||||
;; Don't record command in history if prefixed with whitespace
|
||||
;; TODO: Use `eshell-input-filter-initial-space' when Emacs 25 support is dropped
|
||||
eshell-input-filter (lambda (input) (not (string-match-p "\\`\\s-+" input)))
|
||||
;; em-prompt
|
||||
eshell-prompt-regexp "^[^#$\n]* [#$λ] "
|
||||
|
|
|
|||
|
|
@ -101,5 +101,5 @@ If already in a shell buffer, clear it and cd into the current directory."
|
|||
buffer))
|
||||
|
||||
|
||||
;; TODO +shell/frame -- dedicate current frame to shell buffers
|
||||
;; TODO +shell/frame-quite -- revert frame to before +term/frame
|
||||
;; TODO: +shell/frame -- dedicate current frame to shell buffers
|
||||
;; TODO: +shell/frame-quite -- revert frame to before +term/frame
|
||||
|
|
|
|||
|
|
@ -43,5 +43,5 @@ If prefix ARG, recreate the term buffer."
|
|||
(defalias '+term/here #'multi-term)
|
||||
|
||||
|
||||
;; TODO +term/frame -- dedicate current frame to term buffers
|
||||
;; TODO +term/frame-quite -- revert frame to before +term/frame
|
||||
;; TODO: +term/frame -- dedicate current frame to term buffers
|
||||
;; TODO: +term/frame-quite -- revert frame to before +term/frame
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ Returns the vterm buffer."
|
|||
arg
|
||||
(lambda()
|
||||
(require 'vterm)
|
||||
;; HACK forces vterm to redraw, fixing strange artefacting in the tty.
|
||||
;; HACK: Force vterm to redraw to fix artefacting in tty.
|
||||
(save-window-excursion
|
||||
(pop-to-buffer "*scratch*"))
|
||||
(let (display-buffer-alist)
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
:commands vterm-mode
|
||||
:hook (vterm-mode . hide-mode-line-mode) ; modeline serves no purpose in vterm
|
||||
:preface
|
||||
;; HACK Because vterm clusmily forces vterm-module.so's compilation on us when
|
||||
;; the package is loaded, this is necessary to prevent it when
|
||||
;; byte-compiling this file (`use-package' blocks eagerly loads packages
|
||||
;; when compiled).
|
||||
;; HACK: Because vterm clusmily forces vterm-module.so's compilation on us
|
||||
;; when the package is loaded, this is necessary to prevent it when
|
||||
;; byte-compiling this file (`use-package' blocks eagerly loads packages
|
||||
;; when compiled).
|
||||
(when noninteractive
|
||||
(advice-add #'vterm-module-compile :override #'ignore)
|
||||
(provide 'vterm-module))
|
||||
|
|
|
|||
|
|
@ -91,8 +91,8 @@ buffer rather than an overlay on the line at point or the minibuffer.")
|
|||
(setq quickrun-option-outputter #'ignore)
|
||||
(funcall cb))))
|
||||
|
||||
;; HACK Without this, `+eval--inhibit-quickrun-popup-a' throws a
|
||||
;; window-live-p error because no window exists to be recentered!
|
||||
;; HACK: Without this, `+eval--inhibit-quickrun-popup-a' throws a
|
||||
;; window-live-p error because no window exists to be recentered!
|
||||
(advice-add #'quickrun--recenter :override #'ignore)))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ Otherwise, falls back on `find-file-at-point'."
|
|||
(defun +lookup/synonyms (identifier &optional _arg)
|
||||
"Look up and insert a synonym for the word at point (or selection)."
|
||||
(interactive
|
||||
(list (doom-thing-at-point-or-region 'word) ; TODO actually use this
|
||||
(list (doom-thing-at-point-or-region 'word) ; TODO: actually use this
|
||||
current-prefix-arg))
|
||||
(message "Looking up synonyms for %S" identifier)
|
||||
(cond ((and +lookup-dictionary-prefer-offline
|
||||
|
|
|
|||
|
|
@ -168,8 +168,9 @@ Dictionary.app behind the scenes to get definitions.")
|
|||
(setq xref-show-definitions-function #'ivy-xref-show-defs
|
||||
xref-show-xrefs-function #'ivy-xref-show-xrefs)
|
||||
|
||||
;; HACK Fix #4386: `ivy-xref-show-xrefs' calls `fetcher' twice, which has
|
||||
;; side effects that breaks in some cases (i.e. on `dired-do-find-regexp').
|
||||
;; HACK: Fix #4386: `ivy-xref-show-xrefs' calls `fetcher' twice, which has
|
||||
;; side effects that breaks in some cases (i.e. on
|
||||
;; `dired-do-find-regexp').
|
||||
(defadvice! +lookup--fix-ivy-xrefs (fn fetcher alist)
|
||||
:around #'ivy-xref-show-xrefs
|
||||
(when (functionp fetcher)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; tools/lookup/packages.el
|
||||
|
||||
;; HACK `dumb-jump' uses the `helm-build-sync-source' macro, but this requires
|
||||
;; helm be loaded before `dumb-jump' is byte-compiled during installation.
|
||||
;; To ensure this, we declare helm before dumb-jump.
|
||||
;; HACK: `dumb-jump' uses the `helm-build-sync-source' macro, but this requires
|
||||
;; helm be loaded before `dumb-jump' is byte-compiled during installation. To
|
||||
;; ensure this, we declare helm before dumb-jump.
|
||||
(when (modulep! :completion helm)
|
||||
(package! helm))
|
||||
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@ Can be a list of backends; accepts any value `company-backends' accepts.")
|
|||
;; will do it for you, after `+lsp-defer-shutdown' seconds.
|
||||
(setq lsp-keep-workspace-alive nil)
|
||||
|
||||
;; NOTE I tweak LSP's defaults in order to make its more expensive or imposing
|
||||
;; features opt-in. Some servers implement these poorly and, in most
|
||||
;; cases, it's safer to rely on Emacs' native mechanisms (eldoc vs
|
||||
;; lsp-ui-doc, open in popup vs sideline, etc).
|
||||
;; NOTE: I tweak LSP's defaults in order to make its more expensive or
|
||||
;; imposing features opt-in. Some servers implement these poorly and, in
|
||||
;; most cases, it's safer to rely on Emacs' native mechanisms (eldoc vs
|
||||
;; lsp-ui-doc, open in popup vs sideline, etc).
|
||||
|
||||
;; Disable features that have great potential to be slow.
|
||||
(setq lsp-enable-folding nil
|
||||
|
|
|
|||
|
|
@ -16,13 +16,13 @@ ALTERNATIVES specifies how to connect to a server in those modes."
|
|||
(eglot-alternatives alternatives)
|
||||
(car alternatives))))))
|
||||
|
||||
;; HACK Eglot removed `eglot-help-at-point' in joaotavora/eglot@a044dec for a
|
||||
;; more problematic approach of deferred to eldoc. Here, I've restored it.
|
||||
;; Doom's lookup handlers try to open documentation in a separate window
|
||||
;; (so they can be copied or kept open), but doing so with an eldoc buffer
|
||||
;; is difficult because a) its contents are generated asynchronously,
|
||||
;; making them tough to scrape, and b) their contents change frequently
|
||||
;; (every time you move your cursor).
|
||||
;; HACK: Eglot removed `eglot-help-at-point' in joaotavora/eglot@a044dec for a
|
||||
;; more problematic approach of deferred to eldoc. Here, I've restored it.
|
||||
;; Doom's lookup handlers try to open documentation in a separate window (so
|
||||
;; they can be copied or kept open), but doing so with an eldoc buffer is
|
||||
;; difficult because a) its contents are generated asynchronously, making them
|
||||
;; tough to scrape, and b) their contents change frequently (every time you
|
||||
;; move your cursor).
|
||||
(defvar +eglot--help-buffer nil)
|
||||
;;;###autoload
|
||||
(defun +eglot-lookup-documentation (_identifier)
|
||||
|
|
|
|||
|
|
@ -32,11 +32,10 @@ killing and opening many LSP/eglot-powered buffers.")
|
|||
(setq +lsp--default-read-process-output-max (default-value 'read-process-output-max)
|
||||
+lsp--default-gcmh-high-cons-threshold (default-value 'gcmh-high-cons-threshold))
|
||||
(setq-default read-process-output-max (* 1024 1024))
|
||||
;; REVIEW LSP causes a lot of allocations, with or without the native JSON
|
||||
;; library, so we up the GC threshold to stave off GC-induced
|
||||
;; slowdowns/freezes. Doom uses `gcmh' to enforce its GC strategy,
|
||||
;; so we modify its variables rather than `gc-cons-threshold'
|
||||
;; directly.
|
||||
;; REVIEW: LSP causes a lot of allocations, with or without the native
|
||||
;; JSON library, so we up the GC threshold to stave off GC-induced
|
||||
;; slowdowns/freezes. Doom uses `gcmh' to enforce its GC strategy, so we
|
||||
;; modify its variables rather than `gc-cons-threshold' directly.
|
||||
(setq-default gcmh-high-cons-threshold (* 2 +lsp--default-gcmh-high-cons-threshold))
|
||||
(when (bound-and-true-p gcmh-mode)
|
||||
(gcmh-set-high-threshold))
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
;;; tools/magit/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; HACK Magit complains loudly (but harmlessly) when it can't determine its own
|
||||
;; version in a sparse clone. Since I'd rather not compromise on shallow
|
||||
;; clones, I've gimped `magit-version' so it doesn't complain (unless
|
||||
;; called interactively).
|
||||
;; HACK: Magit complains loudly (but harmlessly) when it can't determine its own
|
||||
;; version in a sparse clone. Since I'd rather not compromise on shallow
|
||||
;; clones, I've gimped `magit-version' so it doesn't complain (unless called
|
||||
;; interactively).
|
||||
;;;###autoload
|
||||
(defadvice! +magit--ignore-version-a (fn &rest args)
|
||||
:around #'magit-version
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue