Merge branch 'hlissner:develop' into develop
This commit is contained in:
commit
85264fea5d
27 changed files with 85 additions and 420 deletions
|
@ -5,7 +5,7 @@
|
||||||
[Install](#install) • [Documentation] • [FAQ] • [Screenshots] • [Contribute](#contribute)
|
[Install](#install) • [Documentation] • [FAQ] • [Screenshots] • [Contribute](#contribute)
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
[][Discord]
|
[][Discord]
|
||||||
|
@ -99,7 +99,7 @@ Check out [the FAQ][FAQ] for answers to common questions about the project.
|
||||||
|
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
+ Git 2.23+
|
+ Git 2.23+
|
||||||
+ Emacs 26.3+ (*27.2 is recommended*, or [native-comp](https://www.emacswiki.org/emacs/GccEmacs)).
|
+ Emacs 27.1+ (*27.2 is recommended*, or [native-comp](https://www.emacswiki.org/emacs/GccEmacs)).
|
||||||
+ [ripgrep] 11.0+
|
+ [ripgrep] 11.0+
|
||||||
+ GNU `find`
|
+ GNU `find`
|
||||||
+ *OPTIONAL:* [fd] 7.3.0+ (improves file indexing performance for some commands)
|
+ *OPTIONAL:* [fd] 7.3.0+ (improves file indexing performance for some commands)
|
||||||
|
|
6
bin/doom
6
bin/doom
|
@ -27,11 +27,11 @@
|
||||||
;;
|
;;
|
||||||
;;; Sanity checks
|
;;; Sanity checks
|
||||||
|
|
||||||
(when (version< emacs-version "26.3")
|
(when (version< emacs-version "27.1")
|
||||||
(error
|
(error
|
||||||
(concat "Detected Emacs " emacs-version " (at " (car command-line-args) ").\n\n"
|
(concat "Detected Emacs " emacs-version " (at " (car command-line-args) ").\n\n"
|
||||||
"Doom only supports Emacs 26.3 and newer. 27.1 is highly recommended. A guide\n"
|
"Doom only supports Emacs 27.1 and newer. A guide to install a newer version\n"
|
||||||
"to install a newer version of Emacs can be found at:\n\n "
|
"of Emacs can be found at:\n\n "
|
||||||
(format "https://doomemacs.org/docs/getting_started.org#%s"
|
(format "https://doomemacs.org/docs/getting_started.org#%s"
|
||||||
(cond ((eq system-type 'darwin) "on-macos")
|
(cond ((eq system-type 'darwin) "on-macos")
|
||||||
((memq system-type '(cygwin windows-nt ms-dos)) "on-windows")
|
((memq system-type '(cygwin windows-nt ms-dos)) "on-windows")
|
||||||
|
|
|
@ -40,9 +40,7 @@ all themes. It will apply to all themes once they are loaded."
|
||||||
(when (or (get 'doom-theme 'previous-themes)
|
(when (or (get 'doom-theme 'previous-themes)
|
||||||
(null doom-theme))
|
(null doom-theme))
|
||||||
(funcall #',fn))
|
(funcall #',fn))
|
||||||
;; TODO Append to `doom-load-theme-hook' with DEPTH instead when Emacs
|
(add-hook 'doom-customize-theme-hook #',fn 100))))
|
||||||
;; 26.x support is dropped.
|
|
||||||
(add-hook 'doom-customize-theme-hook #',fn 'append))))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defmacro custom-set-faces! (&rest specs)
|
(defmacro custom-set-faces! (&rest specs)
|
||||||
|
|
|
@ -54,10 +54,8 @@ in."
|
||||||
(warn! "Emacs %s detected" emacs-version)
|
(warn! "Emacs %s detected" emacs-version)
|
||||||
(explain! "Doom supports this version, but you are living on the edge! "
|
(explain! "Doom supports this version, but you are living on the edge! "
|
||||||
"Be prepared for breakages in future versions of Emacs."))
|
"Be prepared for breakages in future versions of Emacs."))
|
||||||
((= emacs-major-version 26)
|
((< emacs-major-version 27)
|
||||||
(warn! "Emacs %s detected" emacs-version)
|
(error! "Emacs %s detected, Doom only supports 27.1 and newer"
|
||||||
(explain! "Doom is dropping Emacs 26.x support in June 2021. Consider "
|
|
||||||
"upgrading to Emacs 27.1 (or better: 27.2) soon!"
|
|
||||||
emacs-version))))
|
emacs-version))))
|
||||||
|
|
||||||
(print! (start "Checking for Doom's prerequisites..."))
|
(print! (start "Checking for Doom's prerequisites..."))
|
||||||
|
|
|
@ -625,72 +625,7 @@ testing advice (when combined with `rotate-text').
|
||||||
;;
|
;;
|
||||||
;;; Backports
|
;;; Backports
|
||||||
|
|
||||||
(eval-when! (version< emacs-version "27.0.90")
|
;; None at the moment!
|
||||||
;; DEPRECATED Backported from Emacs 27
|
|
||||||
(defmacro setq-local (&rest pairs)
|
|
||||||
"Make variables in PAIRS buffer-local and assign them the corresponding values.
|
|
||||||
|
|
||||||
PAIRS is a list of variable/value pairs. For each variable, make
|
|
||||||
it buffer-local and assign it the corresponding value. The
|
|
||||||
variables are literal symbols and should not be quoted.
|
|
||||||
|
|
||||||
The second VALUE is not computed until after the first VARIABLE
|
|
||||||
is set, and so on; each VALUE can use the new value of variables
|
|
||||||
set earlier in the ‘setq-local’. The return value of the
|
|
||||||
‘setq-local’ form is the value of the last VALUE.
|
|
||||||
|
|
||||||
\(fn [VARIABLE VALUE]...)"
|
|
||||||
(declare (debug setq))
|
|
||||||
(unless (zerop (mod (length pairs) 2))
|
|
||||||
(error "PAIRS must have an even number of variable/value members"))
|
|
||||||
(let ((expr nil))
|
|
||||||
(while pairs
|
|
||||||
(unless (symbolp (car pairs))
|
|
||||||
(error "Attempting to set a non-symbol: %s" (car pairs)))
|
|
||||||
;; Can't use backquote here, it's too early in the bootstrap.
|
|
||||||
(setq expr
|
|
||||||
(cons
|
|
||||||
(list 'set
|
|
||||||
(list 'make-local-variable (list 'quote (car pairs)))
|
|
||||||
(car (cdr pairs)))
|
|
||||||
expr))
|
|
||||||
(setq pairs (cdr (cdr pairs))))
|
|
||||||
(macroexp-progn (nreverse expr)))))
|
|
||||||
|
|
||||||
(eval-when! (version< emacs-version "27.1")
|
|
||||||
;; DEPRECATED Backported from Emacs 27. Remove when 26.x support is dropped.
|
|
||||||
(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)))))
|
|
||||||
|
|
||||||
(eval-when! (not (fboundp 'exec-path))
|
|
||||||
;; DEPRECATED Backported from Emacs 27.1. Remove when 26.x support is dropped.
|
|
||||||
(defun exec-path ()
|
|
||||||
"Return list of directories to search programs to run in remote subprocesses.
|
|
||||||
The remote host is identified by `default-directory'. For remote
|
|
||||||
hosts that do not support subprocesses, this returns `nil'.
|
|
||||||
If `default-directory' is a local directory, this function returns
|
|
||||||
the value of the variable `exec-path'."
|
|
||||||
(let ((handler (find-file-name-handler default-directory 'exec-path)))
|
|
||||||
(if handler
|
|
||||||
(funcall handler 'exec-path)
|
|
||||||
exec-path))))
|
|
||||||
|
|
||||||
(provide 'core-lib)
|
(provide 'core-lib)
|
||||||
;;; core-lib.el ends here
|
;;; core-lib.el ends here
|
||||||
|
|
|
@ -667,16 +667,17 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
|
||||||
(dolist (fn '(switch-to-buffer display-buffer))
|
(dolist (fn '(switch-to-buffer display-buffer))
|
||||||
(advice-add fn :around #'doom-run-switch-buffer-hooks-a)))
|
(advice-add fn :around #'doom-run-switch-buffer-hooks-a)))
|
||||||
|
|
||||||
|
;; Apply `doom-font' et co
|
||||||
|
(add-hook 'doom-after-init-modules-hook #'doom-init-fonts-h -100)
|
||||||
|
|
||||||
;; Apply `doom-theme'
|
;; Apply `doom-theme'
|
||||||
(add-hook (if (daemonp)
|
(add-hook (if (daemonp)
|
||||||
'after-make-frame-functions
|
'after-make-frame-functions
|
||||||
'doom-after-init-modules-hook)
|
'doom-after-init-modules-hook)
|
||||||
#'doom-init-theme-h)
|
#'doom-init-theme-h
|
||||||
|
-90)
|
||||||
|
|
||||||
;; Apply `doom-font' et co
|
(add-hook 'window-setup-hook #'doom-init-ui-h 100)
|
||||||
(add-hook 'doom-after-init-modules-hook #'doom-init-fonts-h)
|
|
||||||
|
|
||||||
(add-hook 'window-setup-hook #'doom-init-ui-h 'append)
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
@ -702,25 +703,11 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
|
||||||
(fset 'define-fringe-bitmap #'ignore))
|
(fset 'define-fringe-bitmap #'ignore))
|
||||||
|
|
||||||
(after! whitespace
|
(after! whitespace
|
||||||
(defun doom-disable-whitespace-mode-in-childframes-a (orig-fn)
|
(defun doom-is-childframes-p ()
|
||||||
"`whitespace-mode' inundates child frames with whitespace markers, so
|
"`whitespace-mode' inundates child frames with whitespace markers, so
|
||||||
disable it to fix all that visual noise."
|
disable it to fix all that visual noise."
|
||||||
(unless (frame-parameter nil 'parent-frame)
|
(frame-parameter nil 'parent-frame))
|
||||||
(funcall orig-fn)))
|
(add-function :before-while whitespace-enable-predicate #'doom-is-childframes-p))
|
||||||
(add-function :around whitespace-enable-predicate #'doom-disable-whitespace-mode-in-childframes-a))
|
|
||||||
|
|
||||||
;; Don't display messages in the minibuffer when using the minibuffer
|
|
||||||
;; DEPRECATED Remove when Emacs 26.x support is dropped.
|
|
||||||
(eval-when! (not EMACS27+)
|
|
||||||
(defmacro doom-silence-motion-key (command key)
|
|
||||||
(let ((key-command (intern (format "doom/silent-%s" command))))
|
|
||||||
`(progn
|
|
||||||
(defun ,key-command ()
|
|
||||||
(interactive)
|
|
||||||
(ignore-errors (call-interactively ',command)))
|
|
||||||
(define-key minibuffer-local-map (kbd ,key) #',key-command))))
|
|
||||||
(doom-silence-motion-key backward-delete-char "<backspace>")
|
|
||||||
(doom-silence-motion-key delete-char "<delete>"))
|
|
||||||
|
|
||||||
(provide 'core-ui)
|
(provide 'core-ui)
|
||||||
;;; core-ui.el ends here
|
;;; core-ui.el ends here
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
;;
|
;;
|
||||||
;;; Initialize internal state
|
;;; Initialize internal state
|
||||||
|
|
||||||
(defconst doom-version "2.0.9"
|
(defconst doom-version "3.0.0-alpha"
|
||||||
"Current version of Doom Emacs.")
|
"Current version of Doom Emacs.")
|
||||||
|
|
||||||
(defvar doom-init-p nil
|
(defvar doom-init-p nil
|
||||||
|
@ -355,7 +355,6 @@ config.el instead."
|
||||||
(when (boundp 'libgnutls-version)
|
(when (boundp 'libgnutls-version)
|
||||||
(concat "SECURE128:+SECURE192:-VERS-ALL"
|
(concat "SECURE128:+SECURE192:-VERS-ALL"
|
||||||
(if (and (not IS-WINDOWS)
|
(if (and (not IS-WINDOWS)
|
||||||
(not (version< emacs-version "26.3"))
|
|
||||||
(>= libgnutls-version 30605))
|
(>= libgnutls-version 30605))
|
||||||
":+VERS-TLS1.3")
|
":+VERS-TLS1.3")
|
||||||
":+VERS-TLS1.2"))
|
":+VERS-TLS1.2"))
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
:branch ,straight-repository-branch
|
:branch ,straight-repository-branch
|
||||||
:local-repo "straight.el"
|
:local-repo "straight.el"
|
||||||
:files ("straight*.el"))
|
:files ("straight*.el"))
|
||||||
:pin "915707ff5139cbfaf5f1aecd881ce0abaaddcecc")
|
:pin "b45dd00408ff8e922f2d7f75441fd5603e5222fa")
|
||||||
|
|
||||||
;; core-modules.el
|
;; core-modules.el
|
||||||
(package! use-package
|
(package! use-package
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
:pin "a7422fb8ab1baee19adb2717b5b47b9c3812a84c")
|
:pin "a7422fb8ab1baee19adb2717b5b47b9c3812a84c")
|
||||||
|
|
||||||
;; core-ui.el
|
;; core-ui.el
|
||||||
(package! all-the-icons :pin "facbde4a7be292bf9490932cbe403b443273f45d")
|
(package! all-the-icons :pin "9d97c074b08000eacefc03ebc5dadbdc33888cc2")
|
||||||
(package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea")
|
(package! hide-mode-line :pin "88888825b5b27b300683e662fa3be88d954b1cea")
|
||||||
(package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307")
|
(package! highlight-numbers :pin "8b4744c7f46c72b1d3d599d4fb75ef8183dee307")
|
||||||
(package! rainbow-delimiters :pin "d576e6694ad3a3e88b2bb1363305b38fa364c149")
|
(package! rainbow-delimiters :pin "d576e6694ad3a3e88b2bb1363305b38fa364c149")
|
||||||
|
@ -37,8 +37,6 @@
|
||||||
(package! helpful :pin "7e4b1f0d5572a4e2b8ee7a9b084ef863d0315a73")
|
(package! helpful :pin "7e4b1f0d5572a4e2b8ee7a9b084ef863d0315a73")
|
||||||
(package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d")
|
(package! pcre2el :pin "0b5b2a2c173aab3fd14aac6cf5e90ad3bf58fa7d")
|
||||||
(package! smartparens :pin "911cc896a0f2eb8b5fbdd6fc8331523ad9889a3a")
|
(package! smartparens :pin "911cc896a0f2eb8b5fbdd6fc8331523ad9889a3a")
|
||||||
;; DEPRECATED Built into Emacs 27+; remove when we drop 26 support
|
|
||||||
(package! so-long :built-in 'prefer :pin "1da43ed63b5f9a8188eb8107bbad842d10831537")
|
|
||||||
(package! ws-butler
|
(package! ws-butler
|
||||||
;; Use my fork of ws-butler, which has a few choice improvements and
|
;; Use my fork of ws-butler, which has a few choice improvements and
|
||||||
;; optimizations (the original has been abandoned).
|
;; optimizations (the original has been abandoned).
|
||||||
|
@ -46,9 +44,9 @@
|
||||||
:pin "2bb49d3ee7d2cba133bc7e9cdac416cd1c5e4fe0")
|
:pin "2bb49d3ee7d2cba133bc7e9cdac416cd1c5e4fe0")
|
||||||
|
|
||||||
;; core-projects.el
|
;; core-projects.el
|
||||||
(package! projectile :pin "5e6fdabd59ec5507c1d54f3b11ee16ddc05821d3")
|
(package! projectile :pin "da08a9103b5ba3b38ef031a9627a19436eb318b5")
|
||||||
(package! project :pin "4072f35d85bf0a1c669329d66633e4819f497c1c")
|
(package! project :pin "4072f35d85bf0a1c669329d66633e4819f497c1c")
|
||||||
|
|
||||||
;; core-keybinds.el
|
;; core-keybinds.el
|
||||||
(package! general :pin "a0b17d207badf462311b2eef7c065b884462cb7c")
|
(package! general :pin "a0b17d207badf462311b2eef7c065b884462cb7c")
|
||||||
(package! which-key :pin "fc29864395fdaf688e2ef5111831663bad89a020")
|
(package! which-key :pin "27d9fec33abb989b030f7677ccf5f799287d6472")
|
||||||
|
|
|
@ -1174,8 +1174,7 @@ If you still want to restore the old behavior, simply disable evil-snipe-mode:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
;; in ~/.doom.d/config.el
|
;; in ~/.doom.d/config.el
|
||||||
(after! evil-snipe
|
(remove-hook 'doom-first-input-hook #'evil-snipe-mode)
|
||||||
(evil-snipe-mode -1))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Changes to my config aren't taking effect
|
** Changes to my config aren't taking effect
|
||||||
|
|
|
@ -97,7 +97,7 @@ us know!
|
||||||
This is what you'll have installed by the end of this section:
|
This is what you'll have installed by the end of this section:
|
||||||
|
|
||||||
- Git 2.23+
|
- Git 2.23+
|
||||||
- Emacs 26.3+ *(27.2 is recommended, or [[https://www.emacswiki.org/emacs/GccEmacs][native-comp]])*
|
- Emacs 27.1+ *(27.2 is recommended, or [[https://www.emacswiki.org/emacs/GccEmacs][native-comp]])*
|
||||||
- [[https://github.com/BurntSushi/ripgrep][ripgrep]] 11.0+
|
- [[https://github.com/BurntSushi/ripgrep][ripgrep]] 11.0+
|
||||||
- GNU Find
|
- GNU Find
|
||||||
- (Optional) [[https://github.com/sharkdp/fd][fd]] 7.3.0+ (known as ~fd-find~ on Debian, Ubuntu & derivatives) --
|
- (Optional) [[https://github.com/sharkdp/fd][fd]] 7.3.0+ (known as ~fd-find~ on Debian, Ubuntu & derivatives) --
|
||||||
|
@ -107,20 +107,15 @@ These packages ought to be available through the package managers of your
|
||||||
operating system; i.e. homebrew & macports on macOS, scoop/chocolatey on
|
operating system; i.e. homebrew & macports on macOS, scoop/chocolatey on
|
||||||
Windows, or pacman/aptitude/etc on the various Linux distributions.
|
Windows, or pacman/aptitude/etc on the various Linux distributions.
|
||||||
|
|
||||||
#+begin_quote
|
|
||||||
While Doom does claim to support 26.x, 27.x is recommended because it is faster,
|
|
||||||
especially for LSP users. The installation guides below will touch on installing
|
|
||||||
27 if there is a simple way to do so on that particular operating system.
|
|
||||||
#+end_quote
|
|
||||||
|
|
||||||
** Emacs & dependencies
|
** Emacs & dependencies
|
||||||
*** On Linux
|
*** On Linux
|
||||||
In the unusual case that Emacs 26.x is unavailable through your package manager,
|
Installation instructions for Emacs 27.1+ are listed below for many popular
|
||||||
you'll have to [[https://www.gnu.org/software/emacs/manual/html_node/efaq/Installing-Emacs.html][build it from source]], but here are installation instructions for many popular Linux distributions:
|
Linux distributions. In the unusual case that 27.1 or newer is unavailable on
|
||||||
|
your system, you'll have to [[https://www.gnu.org/software/emacs/manual/html_node/efaq/Installing-Emacs.html][build it from source]] instead.
|
||||||
|
|
||||||
**** Ubuntu
|
**** Ubuntu
|
||||||
Emacs 27.x is not available through Ubuntu's package manager out-of-the-box. To
|
Emacs 27.x is not available through Ubuntu's package manager out-of-the-box, but
|
||||||
get around this you'll need to install Emacs through a PPA:
|
is available through a PPA:
|
||||||
|
|
||||||
#+BEGIN_SRC bash
|
#+BEGIN_SRC bash
|
||||||
add-apt-repository ppa:kelleyk/emacs
|
add-apt-repository ppa:kelleyk/emacs
|
||||||
|
@ -164,8 +159,9 @@ pacman -S fd
|
||||||
The above installs Emacs 27 (at the time of writing).
|
The above installs Emacs 27 (at the time of writing).
|
||||||
|
|
||||||
**** NixOS
|
**** NixOS
|
||||||
On NixOS Emacs 26.3 can be installed via ~nix-env -Ai nixos.emacs~, or
|
On NixOS Emacs 27.2 can be installed via ~nix-env -Ai nixos.emacs~, or
|
||||||
permanently with the following added to ~etc/nixos/configuration.nix~:
|
permanently with the following added to ~etc/nixos/configuration.nix~:
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# required dependencies
|
# required dependencies
|
||||||
|
@ -191,7 +187,7 @@ environment.systemPackages = [
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
**** openSUSE
|
**** openSUSE
|
||||||
***** Emacs 26.3
|
***** Emacs 27.1
|
||||||
Emacs can be installed from the [[https://software.opensuse.org/download.html?project=editors&package=emacs][package list]], or manually via zypper.
|
Emacs can be installed from the [[https://software.opensuse.org/download.html?project=editors&package=emacs][package list]], or manually via zypper.
|
||||||
|
|
||||||
For example, to install on openSUSE Leap 15.1 (requires root):
|
For example, to install on openSUSE Leap 15.1 (requires root):
|
||||||
|
@ -202,7 +198,7 @@ zypper install emacs
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
If you already have an older version of Emacs installed, you will be prompted to
|
If you already have an older version of Emacs installed, you will be prompted to
|
||||||
install the update candidate (Emacs 26.3).
|
install the update candidate (Emacs 27.1).
|
||||||
|
|
||||||
***** ripgrep
|
***** ripgrep
|
||||||
Download ripgrep 11.0.2 from [[https://software.opensuse.org/download/package?package=ripgrep&project=openSUSE%3AFactory][the package list]] or installed manually (requires
|
Download ripgrep 11.0.2 from [[https://software.opensuse.org/download/package?package=ripgrep&project=openSUSE%3AFactory][the package list]] or installed manually (requires
|
||||||
|
@ -305,16 +301,16 @@ Or by replacing ~/usr/local/bin/emacs~ with a shim script containing:
|
||||||
There are some suggestions on how to speed it up later in this section.
|
There are some suggestions on how to speed it up later in this section.
|
||||||
#+end_quote
|
#+end_quote
|
||||||
|
|
||||||
There are three methods for installing Emacs 26.x on Windows, each with their
|
There are three methods for installing Emacs 27.x on Windows, each with their
|
||||||
pros and cons:
|
pros and cons:
|
||||||
|
|
||||||
+ With chocolatey/scoop
|
+ With chocolatey/scoop
|
||||||
+ With a precompiled binary + Git Bash
|
+ With a precompiled binary + Git Bash
|
||||||
+ With WSL + Ubuntu
|
+ With WSL2 + Ubuntu
|
||||||
|
|
||||||
If you don't know which to choose, I recommend WSL; it produces the fastest and
|
If you don't know which to choose, I highly recommend WSL; it produces the
|
||||||
most stable environment of the three, but has the most complex installation
|
fastest and most stable environment of the three, but has the most complex
|
||||||
process.
|
installation process.
|
||||||
|
|
||||||
Before moving on to installing Emacs et co, a few steps to prepare Windows for
|
Before moving on to installing Emacs et co, a few steps to prepare Windows for
|
||||||
Emacs are necessary:
|
Emacs are necessary:
|
||||||
|
@ -405,7 +401,7 @@ bin/doom command.
|
||||||
#+BEGIN_SRC sh
|
#+BEGIN_SRC sh
|
||||||
sudo add-apt-repository ppa:kelleyk/emacs
|
sudo add-apt-repository ppa:kelleyk/emacs
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install emacs26
|
sudo apt install emacs27
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
7. Then Doom's dependencies:
|
7. Then Doom's dependencies:
|
||||||
#+BEGIN_SRC sh
|
#+BEGIN_SRC sh
|
||||||
|
|
|
@ -203,7 +203,6 @@ Aesthetic modules that affect the Emacs interface or user experience.
|
||||||
+ [[file:../modules/ui/doom-dashboard/README.org][doom-dashboard]] - TODO
|
+ [[file:../modules/ui/doom-dashboard/README.org][doom-dashboard]] - TODO
|
||||||
+ [[file:../modules/ui/doom-quit/README.org][doom-quit]] - TODO
|
+ [[file:../modules/ui/doom-quit/README.org][doom-quit]] - TODO
|
||||||
+ [[file:../modules/ui/emoji/README.org][emoji]] =+ascii +github +unicode= - Adds emoji support to Emacs
|
+ [[file:../modules/ui/emoji/README.org][emoji]] =+ascii +github +unicode= - Adds emoji support to Emacs
|
||||||
+ [[file:../modules/ui/fill-column/README.org][fill-column]] - TODO
|
|
||||||
+ [[file:../modules/ui/hl-todo/README.org][hl-todo]] - TODO
|
+ [[file:../modules/ui/hl-todo/README.org][hl-todo]] - TODO
|
||||||
+ [[file:../modules/ui/hydra/README.org][hydra]] - TODO
|
+ [[file:../modules/ui/hydra/README.org][hydra]] - TODO
|
||||||
+ indent-guides - TODO
|
+ indent-guides - TODO
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
doom-dashboard ; a nifty splash screen for Emacs
|
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) ; 🙂
|
;;(emoji +unicode) ; 🙂
|
||||||
;;fill-column ; a `fill-column' indicator
|
|
||||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||||
;;hydra
|
;;hydra
|
||||||
;;indent-guides ; highlighted indent columns
|
;;indent-guides ; highlighted indent columns
|
||||||
|
@ -93,7 +92,7 @@
|
||||||
(eval +overlay) ; run code, run (also, repls)
|
(eval +overlay) ; run code, run (also, repls)
|
||||||
;;gist ; interacting with github gists
|
;;gist ; interacting with github gists
|
||||||
lookup ; navigate your code and its documentation
|
lookup ; navigate your code and its documentation
|
||||||
;;lsp
|
;;lsp ; M-x vscode
|
||||||
magit ; a git porcelain for Emacs
|
magit ; a git porcelain for Emacs
|
||||||
;;make ; run make tasks from Emacs
|
;;make ; run make tasks from Emacs
|
||||||
;;pass ; password manager for nerds
|
;;pass ; password manager for nerds
|
||||||
|
|
|
@ -325,7 +325,7 @@
|
||||||
:desc "Magit blame" "B" #'magit-blame-addition
|
:desc "Magit blame" "B" #'magit-blame-addition
|
||||||
:desc "Magit clone" "C" #'magit-clone
|
:desc "Magit clone" "C" #'magit-clone
|
||||||
:desc "Magit fetch" "F" #'magit-fetch
|
:desc "Magit fetch" "F" #'magit-fetch
|
||||||
:desc "Magit buffer log" "L" #'magit-log
|
:desc "Magit buffer log" "L" #'magit-log-buffer-file
|
||||||
:desc "Git stage file" "S" #'magit-stage-file
|
:desc "Git stage file" "S" #'magit-stage-file
|
||||||
:desc "Git unstage file" "U" #'magit-unstage-file
|
:desc "Git unstage file" "U" #'magit-unstage-file
|
||||||
(:prefix ("f" . "find")
|
(:prefix ("f" . "find")
|
||||||
|
|
|
@ -445,7 +445,7 @@
|
||||||
:desc "Magit blame" "B" #'magit-blame-addition
|
:desc "Magit blame" "B" #'magit-blame-addition
|
||||||
:desc "Magit clone" "C" #'magit-clone
|
:desc "Magit clone" "C" #'magit-clone
|
||||||
:desc "Magit fetch" "F" #'magit-fetch
|
:desc "Magit fetch" "F" #'magit-fetch
|
||||||
:desc "Magit buffer log" "L" #'magit-log
|
:desc "Magit buffer log" "L" #'magit-log-buffer-file
|
||||||
:desc "Git stage file" "S" #'magit-stage-file
|
:desc "Git stage file" "S" #'magit-stage-file
|
||||||
:desc "Git unstage file" "U" #'magit-unstage-file
|
:desc "Git unstage file" "U" #'magit-unstage-file
|
||||||
(:prefix ("f" . "find")
|
(:prefix ("f" . "find")
|
||||||
|
|
|
@ -172,8 +172,8 @@ vim-seek/vim-sneak for 2-character versions of f/F/t/T).
|
||||||
|
|
||||||
To disable evil-snipe on s/S, you can either:
|
To disable evil-snipe on s/S, you can either:
|
||||||
|
|
||||||
1. Disable ~evil-snipe-mode~ by adding ~(after! evil-snipe (evil-snipe-mode
|
1. Disable ~evil-snipe-mode~ by adding ~(remove-hook 'doom-first-input-hook
|
||||||
-1))~ to =$DOOMDIR/config.el=,
|
#'evil-snipe-mode)~ to =$DOOMDIR/config.el=,
|
||||||
2. Or disable =evil-snipe= completely with ~(package! evil-snipe :disable t)~
|
2. Or disable =evil-snipe= completely with ~(package! evil-snipe :disable t)~
|
||||||
added to =$DOOMDIR/packages.el=, but this will also disable incremental
|
added to =$DOOMDIR/packages.el=, but this will also disable incremental
|
||||||
highlighting for the f/F/t/T motions keys.
|
highlighting for the f/F/t/T motions keys.
|
||||||
|
|
|
@ -16,6 +16,13 @@
|
||||||
(use-package! sly
|
(use-package! sly
|
||||||
:hook (lisp-mode-local-vars . sly-editing-mode)
|
:hook (lisp-mode-local-vars . sly-editing-mode)
|
||||||
:init
|
:init
|
||||||
|
;; I moved this hook to `lisp-mode-local-vars', so it only affects
|
||||||
|
;; `lisp-mode', and not every other derived lisp mode (like `fennel-mode').
|
||||||
|
;; We run it twice because the hook is both autoloaded and evaluated at
|
||||||
|
;; load-time, so it must be removed twice.
|
||||||
|
(after! (:or emacs sly)
|
||||||
|
(remove-hook 'lisp-mode-hook #'sly-editing-mode))
|
||||||
|
|
||||||
(after! lisp-mode
|
(after! lisp-mode
|
||||||
(set-repl-handler! 'lisp-mode #'sly-mrepl)
|
(set-repl-handler! 'lisp-mode #'sly-mrepl)
|
||||||
(set-eval-handler! 'lisp-mode #'sly-eval-region)
|
(set-eval-handler! 'lisp-mode #'sly-eval-region)
|
||||||
|
|
|
@ -274,16 +274,7 @@ Also adds support for a `:sync' parameter to override `:async'."
|
||||||
;; TODO Should be fixed upstream
|
;; TODO Should be fixed upstream
|
||||||
(let ((default-directory (org-find-library-dir "org-contribdir")))
|
(let ((default-directory (org-find-library-dir "org-contribdir")))
|
||||||
(setq org-ditaa-jar-path (expand-file-name "scripts/ditaa.jar")
|
(setq org-ditaa-jar-path (expand-file-name "scripts/ditaa.jar")
|
||||||
org-ditaa-eps-jar-path (expand-file-name "scripts/DitaaEps.jar"))))
|
org-ditaa-eps-jar-path (expand-file-name "scripts/DitaaEps.jar")))))
|
||||||
|
|
||||||
;; NOTE Backported from Emacs 27.1
|
|
||||||
;; DEPRECATED Remove when 26.x support is dropped
|
|
||||||
(unless EMACS27+
|
|
||||||
(defadvice! +org--dont-suppress-window-changes-a (orig-fn &rest args)
|
|
||||||
:around #'org-babel-execute:emacs-lisp
|
|
||||||
(letf! ((#'current-window-configuration #'ignore)
|
|
||||||
(#'set-window-configuration #'ignore))
|
|
||||||
(apply orig-fn args)))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun +org-init-babel-lazy-loader-h ()
|
(defun +org-init-babel-lazy-loader-h ()
|
||||||
|
|
|
@ -56,59 +56,11 @@ need:
|
||||||
|
|
||||||
* Configuration
|
* Configuration
|
||||||
** True-color and italic support
|
** True-color and italic support
|
||||||
#+begin_quote
|
Emacs 26.3 users should consult [[https://github.com/syl20bnr/spacemacs/wiki/Terminal][the spacemacs wiki]] for details on achieving true
|
||||||
This advice only applies to Emacs 26.x. True color support is [[https://github.com/emacs-mirror/emacs/commit/7f6153d9563cfe7753083996f59eacc9f4c694df][built into 27.1+
|
color support in terminal Emacs.
|
||||||
and newer]].
|
|
||||||
#+end_quote
|
|
||||||
|
|
||||||
(credit goes to [[https://github.com/syl20bnr/spacemacs/wiki/Terminal][the spacemacs wiki]] for this information)
|
Emacs 27.x users don't need todo anything, as true color support is [[https://github.com/emacs-mirror/emacs/commit/7f6153d9563cfe7753083996f59eacc9f4c694df][built into
|
||||||
|
27.1+ and newer]].
|
||||||
Create a =xterm-24bit.terminfo= file with the following contents:
|
|
||||||
|
|
||||||
#+BEGIN_SRC text
|
|
||||||
xterm-24bit|xterm with 24-bit direct color mode,
|
|
||||||
use=xterm-256color,
|
|
||||||
sitm=\E[3m,
|
|
||||||
ritm=\E[23m,
|
|
||||||
setb24=\E[48;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm,
|
|
||||||
setf24=\E[38;2;%p1%{65536}%/%d;%p1%{256}%/%{255}%&%d;%p1%{255}%&%dm,
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
#+begin_quote
|
|
||||||
WARNING: Make sure you have a newline at end of file otherwise you will get
|
|
||||||
errors!
|
|
||||||
#+end_quote
|
|
||||||
|
|
||||||
Execute the following command on the command line:
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
tic -x -o ~/.terminfo xterm-24bit.terminfo
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Now set your ~$TERM~ variable to ~xterm-24bit~:
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
export TERM=xterm-24bit
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
SSH might break if your remote machine does not have the same setup, you can
|
|
||||||
work around this with the following alias.
|
|
||||||
#+BEGIN_SRC sh
|
|
||||||
alias ssh="TERM=xterm-256color ssh"
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
If you use tmux, you need to make sure you installed a version with truecolor
|
|
||||||
support, then add the following lines to your `.tmux.conf`:
|
|
||||||
#+BEGIN_SRC conf
|
|
||||||
set -g default-terminal "xterm-24bit"
|
|
||||||
set -g terminal-overrides ',xterm-24bit:Tc'
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Also, make sure you have utf8 language variables if you want all characters to
|
|
||||||
display correctly. For example:
|
|
||||||
#+BEGIN_SRC bash
|
|
||||||
export LC_ALL=en_US.UTF-8
|
|
||||||
export LANG=en_US.UTF-8
|
|
||||||
export LANGUAGE=en_US.UTF-8
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
* Troubleshooting
|
* Troubleshooting
|
||||||
# Common issues and their solution, or places to look for help.
|
# Common issues and their solution, or places to look for help.
|
||||||
|
|
|
@ -26,7 +26,7 @@ buffer.")
|
||||||
(defvar +eshell-aliases
|
(defvar +eshell-aliases
|
||||||
'(("q" "exit") ; built-in
|
'(("q" "exit") ; built-in
|
||||||
("f" "find-file $1")
|
("f" "find-file $1")
|
||||||
("ff" "find-file $1")
|
("ff" "find-file-other-window $1")
|
||||||
("d" "dired $1")
|
("d" "dired $1")
|
||||||
("bd" "eshell-up $1")
|
("bd" "eshell-up $1")
|
||||||
("rg" "rg --color=always $*")
|
("rg" "rg --color=always $*")
|
||||||
|
|
|
@ -2,56 +2,36 @@
|
||||||
|
|
||||||
(use-package! envrc
|
(use-package! envrc
|
||||||
:when (executable-find "direnv")
|
:when (executable-find "direnv")
|
||||||
:after-call doom-first-file-hook
|
:hook (doom-first-file . envrc-global-mode)
|
||||||
:config
|
:config
|
||||||
(add-to-list 'doom-debug-variables 'envrc-debug)
|
(add-to-list 'doom-debug-variables 'envrc-debug)
|
||||||
|
|
||||||
(set-popup-rule! "^\\*envrc\\*" :quit t :ttl 0)
|
(set-popup-rule! "^\\*envrc\\*" :quit t :ttl 0)
|
||||||
|
|
||||||
;; I'm avoiding `global-envrc-mode' intentionally, because it has the
|
;; A globalized minor mode triggers on `after-change-major-mode-hook'
|
||||||
;; potential to run too late in the mode startup process (and after, say,
|
;; normally, which runs after a major mode's body and hooks. If those hooks do
|
||||||
;; server hooks that may rely on that local direnv environment).
|
;; any initialization work that's sensitive to environmental state set up by
|
||||||
(add-hook! 'change-major-mode-after-body-hook
|
;; direnv, then you're gonna have a bad time, so I move the trigger to
|
||||||
(defun +direnv-init-h ()
|
;; `change-major-mode-after-body-hook' instead. This runs before said hooks
|
||||||
(unless (or envrc-mode
|
;; (but not the body; fingers crossed that no major mode does important env
|
||||||
(minibufferp)
|
;; initialization there).
|
||||||
(file-remote-p default-directory))
|
(add-hook! 'envrc-global-mode-hook
|
||||||
(condition-case _
|
(defun +direnv-init-global-mode-earlier-h ()
|
||||||
(envrc-mode 1)
|
(let ((fn #'envrc-global-mode-enable-in-buffers))
|
||||||
(quit)))))
|
(if (not envrc-global-mode)
|
||||||
|
(remove-hook 'change-major-mode-after-body-hook fn)
|
||||||
;; Ensure these local variables survive major mode changes, so envrc-mode is
|
(remove-hook 'after-change-major-mode-hook fn)
|
||||||
;; only "activated" once per buffer.
|
(add-hook 'change-major-mode-after-body-hook fn 100)))))
|
||||||
(put 'envrc-mode 'permanent-local t)
|
|
||||||
(put 'envrc--status 'permanent-local t)
|
|
||||||
(put 'process-environment 'permanent-local t)
|
|
||||||
(put 'exec-path 'permanent-local t)
|
|
||||||
(put 'eshell-path-env 'permanent-local t)
|
|
||||||
|
|
||||||
(defadvice! +direnv--fail-gracefully-a (&rest _)
|
(defadvice! +direnv--fail-gracefully-a (&rest _)
|
||||||
"Don't try to use direnv if the executable isn't present."
|
"Don't try to use direnv if the executable isn't present."
|
||||||
:before-while #'envrc-mode
|
:before-while #'envrc-mode
|
||||||
(or (executable-find "direnv")
|
(or (get 'envrc-mode 'direnv-executable)
|
||||||
|
(put 'envrc-mode 'direnv-executable (executable-find "direnv" t))
|
||||||
(ignore (doom-log "Couldn't find direnv executable"))))
|
(ignore (doom-log "Couldn't find direnv executable"))))
|
||||||
|
|
||||||
;; HACK envrc-mode only affects the current buffer's environment, which is
|
;; Ensure babel's execution environment matches the host buffer's.
|
||||||
;; generally what we want, except when we're running babel blocks in
|
(advice-add #'org-babel-execute-src-block :around #'envrc-propagate-environment)
|
||||||
;; org-mode, because there may be state or envvars those blocks need to
|
|
||||||
;; read. In order to perpetuate the org buffer's environment into the
|
;; Make sure any envrc changes are propagated after a `doom/reload'
|
||||||
;; execution of the babel block we need to temporarily change the global
|
(add-hook 'doom-after-reload-hook #'envrc-reload-all))
|
||||||
;; environment. Let's hope it runs quickly enough that its effects aren't
|
|
||||||
;; felt in other buffers in the meantime!
|
|
||||||
(defvar +direnv--old-environment nil)
|
|
||||||
(defadvice! +direnv-persist-environment-a (orig-fn &rest args)
|
|
||||||
:around #'org-babel-execute-src-block
|
|
||||||
(if +direnv--old-environment
|
|
||||||
(apply orig-fn args)
|
|
||||||
(setq-default +direnv--old-environment
|
|
||||||
(cons (default-value 'process-environment)
|
|
||||||
(default-value 'exec-path))
|
|
||||||
exec-path exec-path
|
|
||||||
process-environment process-environment)
|
|
||||||
(unwind-protect (apply orig-fn args)
|
|
||||||
(setq-default process-environment (car +direnv--old-environment)
|
|
||||||
exec-path (cdr +direnv--old-environment)
|
|
||||||
+direnv--old-environment nil)))))
|
|
||||||
|
|
|
@ -183,9 +183,9 @@ instead is more sensible."
|
||||||
;; and there is a bug preventing Flycheck errors from being shown (the
|
;; and there is a bug preventing Flycheck errors from being shown (the
|
||||||
;; errors flash briefly and then disappear).
|
;; errors flash briefly and then disappear).
|
||||||
lsp-ui-sideline-show-hover nil
|
lsp-ui-sideline-show-hover nil
|
||||||
;; Some icons don't scale correctly on Emacs 26, so disable them there.
|
;; Re-enable icon scaling (it's disabled by default upstream for Emacs
|
||||||
lsp-ui-sideline-actions-icon ; DEPRECATED Remove later
|
;; 26.x compatibility; see emacs-lsp/lsp-ui#573)
|
||||||
(if EMACS27+ lsp-ui-sideline-actions-icon-default)
|
lsp-ui-sideline-actions-icon lsp-ui-sideline-actions-icon-default
|
||||||
;; REVIEW Temporarily disabled, due to immense slowness on every
|
;; REVIEW Temporarily disabled, due to immense slowness on every
|
||||||
;; keypress. See emacs-lsp/lsp-ui#613
|
;; keypress. See emacs-lsp/lsp-ui#613
|
||||||
lsp-ui-doc-enable nil)
|
lsp-ui-doc-enable nil)
|
||||||
|
|
|
@ -5,12 +5,6 @@
|
||||||
(package! password-store :pin "4e73cdc4c376ad61d2e4858bc87cf01eab0dd403")
|
(package! password-store :pin "4e73cdc4c376ad61d2e4858bc87cf01eab0dd403")
|
||||||
(package! password-store-otp :pin "04998c8578a060ab4a4e8f46f2ee0aafad4ab4d5")
|
(package! password-store-otp :pin "04998c8578a060ab4a4e8f46f2ee0aafad4ab4d5")
|
||||||
|
|
||||||
;; an older version of `auto-source-pass' is built into Emacs 26+, so we must
|
|
||||||
;; install the new version directly from the source and with a psuedonym.
|
|
||||||
(package! auth-source-pass
|
|
||||||
:recipe (:host github :repo "DamienCassou/auth-password-store")
|
|
||||||
:pin "fa8b964494c1ef42035fad340ff5f29fcdbed21c")
|
|
||||||
|
|
||||||
(when (featurep! :completion ivy)
|
(when (featurep! :completion ivy)
|
||||||
(package! ivy-pass :pin "5b523de1151f2109fdd6a8114d0af12eef83d3c5"))
|
(package! ivy-pass :pin "5b523de1151f2109fdd6a8114d0af12eef83d3c5"))
|
||||||
(when (featurep! :completion helm)
|
(when (featurep! :completion helm)
|
||||||
|
|
|
@ -72,56 +72,6 @@
|
||||||
(add-hook 'doom-switch-buffer-hook #'+pdf-reload-midnight-minor-mode-h
|
(add-hook 'doom-switch-buffer-hook #'+pdf-reload-midnight-minor-mode-h
|
||||||
nil 'local))))))
|
nil 'local))))))
|
||||||
|
|
||||||
;; Add retina support for MacOS users
|
|
||||||
(eval-when! IS-MAC
|
|
||||||
(defun +pdf-view-create-page-a (page &optional window)
|
|
||||||
"Create an image of PAGE for display on WINDOW."
|
|
||||||
:override #'pdf-view-create-page
|
|
||||||
(let* ((size (pdf-view-desired-image-size page window))
|
|
||||||
(width (if (not (pdf-view-use-scaling-p))
|
|
||||||
(car size)
|
|
||||||
(* 2 (car size))))
|
|
||||||
(data (pdf-cache-renderpage
|
|
||||||
page width width))
|
|
||||||
(hotspots (pdf-view-apply-hotspot-functions
|
|
||||||
window page size)))
|
|
||||||
(pdf-view-create-image data
|
|
||||||
:width width
|
|
||||||
:scale (if (pdf-view-use-scaling-p) 0.5 1)
|
|
||||||
:map hotspots
|
|
||||||
:pointer 'arrow)))
|
|
||||||
|
|
||||||
(defvar +pdf--scaled-p nil)
|
|
||||||
(defadvice! +pdf--scale-up-on-retina-display-a (orig-fn &rest args)
|
|
||||||
"Scale up the PDF on retina displays."
|
|
||||||
:around #'pdf-util-frame-scale-factor
|
|
||||||
(cond ((not pdf-view-use-scaling) 1)
|
|
||||||
((and (memq (pdf-view-image-type) '(imagemagick image-io))
|
|
||||||
(fboundp 'frame-monitor-attributes))
|
|
||||||
(funcall orig-fn))
|
|
||||||
;; Add special support for retina displays on MacOS
|
|
||||||
((and (eq (framep-on-display) 'ns)
|
|
||||||
(not +pdf--scaled-p)
|
|
||||||
EMACS27+)
|
|
||||||
(setq-local +pdf--scaled-p t)
|
|
||||||
2)
|
|
||||||
(1)))
|
|
||||||
|
|
||||||
(defadvice! +pdf--use-scaling-on-ns-a ()
|
|
||||||
:before-until #'pdf-view-use-scaling-p
|
|
||||||
(and (eq (framep-on-display) 'ns)
|
|
||||||
EMACS27+))
|
|
||||||
|
|
||||||
(defadvice! +pdf--supply-width-to-create-image-calls-a (orig-fn &rest args)
|
|
||||||
:around '(pdf-annot-show-annotation
|
|
||||||
pdf-isearch-hl-matches
|
|
||||||
pdf-view-display-region)
|
|
||||||
(letf! (defun create-image (file-or-data &optional type data-p &rest props)
|
|
||||||
(apply create-image file-or-data type data-p
|
|
||||||
:width (car (pdf-view-image-size))
|
|
||||||
props))
|
|
||||||
(apply orig-fn args))))
|
|
||||||
|
|
||||||
;; Silence "File *.pdf is large (X MiB), really open?" prompts for pdfs
|
;; Silence "File *.pdf is large (X MiB), really open?" prompts for pdfs
|
||||||
(defadvice! +pdf-suppress-large-file-prompts-a (orig-fn size op-type filename &optional offer-raw)
|
(defadvice! +pdf-suppress-large-file-prompts-a (orig-fn size op-type filename &optional offer-raw)
|
||||||
:around #'abort-if-file-too-large
|
:around #'abort-if-file-too-large
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
;; -*- no-byte-compile: t; -*-
|
;; -*- no-byte-compile: t; -*-
|
||||||
;;; tools/pdf/packages.el
|
;;; tools/pdf/packages.el
|
||||||
|
|
||||||
(package! pdf-tools
|
(package! pdf-tools :pin "5f77dae43eb8f71e52e10ba8cf994883f74c3fb7")
|
||||||
:recipe (:host github
|
|
||||||
:repo "vedang/pdf-tools")
|
|
||||||
:pin "d262cf9e19d57c6567e06e51d109150c20753839")
|
|
||||||
|
|
||||||
(package! saveplace-pdf-view :pin "54ed966b842501c3c092dbf57b372e37b033c578")
|
(package! saveplace-pdf-view :pin "54ed966b842501c3c092dbf57b372e37b033c578")
|
||||||
|
|
|
@ -1,92 +0,0 @@
|
||||||
#+TITLE: ui/fill-column
|
|
||||||
#+DATE: August 23, 2020
|
|
||||||
#+SINCE: 2.0.9
|
|
||||||
#+STARTUP: inlineimages nofold
|
|
||||||
|
|
||||||
* Table of Contents :TOC_3:noexport:
|
|
||||||
- [[#description][Description]]
|
|
||||||
- [[#maintainers][Maintainers]]
|
|
||||||
- [[#module-flags][Module Flags]]
|
|
||||||
- [[#plugins][Plugins]]
|
|
||||||
- [[#prerequisites][Prerequisites]]
|
|
||||||
- [[#features][Features]]
|
|
||||||
- [[#configuration][Configuration]]
|
|
||||||
- [[#setting-fill-column-globally][Setting fill-column globally]]
|
|
||||||
- [[#setting-fill-column-for-the-current-buffer-or-mode][Setting fill-column for the current buffer or mode]]
|
|
||||||
- [[#hl-fill-column-only-configuring-the-look-of-the-indicator][(hl-fill-column only) Configuring the look of the indicator]]
|
|
||||||
- [[#troubleshooting][Troubleshooting]]
|
|
||||||
|
|
||||||
* Description
|
|
||||||
This module provides a fill column indicator to make it obvious when a line
|
|
||||||
reaches or surpasses the 80th column. This serves as a reminder to keep lines
|
|
||||||
short for accessibility and/or convenience. [[https://www.emacswiki.org/emacs/EightyColumnRule][Read more about this on the Emacs
|
|
||||||
Wiki page]].
|
|
||||||
|
|
||||||
#+begin_quote
|
|
||||||
This module is deprecated and will be removed once Doom drops Emacs 26.x
|
|
||||||
support. This is because the built-in ~display-fill-column-indicator-mode~ (in
|
|
||||||
27 and newer) replaces it, and enabling it is a trivial one-liner, which doesn't
|
|
||||||
warrant a module: ~(global-display-fill-column-indicator-mode +1)~
|
|
||||||
#+end_quote
|
|
||||||
|
|
||||||
** Maintainers
|
|
||||||
This module has no dedicated maintainers.
|
|
||||||
|
|
||||||
** Module Flags
|
|
||||||
This module provides no flags.
|
|
||||||
|
|
||||||
** Plugins
|
|
||||||
+ [[https://github.com/laishulu/hl-fill-column][hl-fill-column]]* (unless Emacs >=27)
|
|
||||||
|
|
||||||
* Prerequisites
|
|
||||||
This module has no prerequisites.
|
|
||||||
|
|
||||||
* Features
|
|
||||||
The behavior of this module varies slightly depending on your version of Emacs:
|
|
||||||
|
|
||||||
+ In Emacs 26.x, text beyond ~fill-column~ will be highlighted.
|
|
||||||
+ In Emacs 27 and newer, a line is drawn down the right side at column 80.
|
|
||||||
|
|
||||||
* Configuration
|
|
||||||
** Setting fill-column globally
|
|
||||||
This column limit is controlled by the ~fill-column~ variable (default: ~80~).
|
|
||||||
|
|
||||||
This variable is buffer-local, therefore, to change this globally, you must use
|
|
||||||
~setq-default~:
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(setq-default fill-column 100)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
~hl-fill-column-mode~ (or ~display-fill-column-indicator-mode~ on Emacs 27+)
|
|
||||||
must be restarted to see the change.
|
|
||||||
|
|
||||||
** Setting fill-column for the current buffer or mode
|
|
||||||
The ~setq-hook!~ convenience macro makes settings ~fill-column~ for a particular
|
|
||||||
mode (or modes) easy:
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(setq-hook! 'org-mode-hook fill-column 100)
|
|
||||||
(setq-hook! 'python-mode-hook fill-column 72)
|
|
||||||
(setq-hook! js2-mode fill-column 72)
|
|
||||||
(setq-hook! '(ruby-mode rustic-mode python-mode-hook) fill-column 80)
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
Any open buffers in these modes must be restarted to see the change.
|
|
||||||
|
|
||||||
** (hl-fill-column only) Configuring the look of the indicator
|
|
||||||
To change the appears of hl-fill-column's highlight, change the
|
|
||||||
~hl-fill-column-face~ face. Doom provides the ~custom-set-faces!~ macro to help
|
|
||||||
you do this:
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(custom-set-faces!
|
|
||||||
'(hl-fill-column-face :background "red"
|
|
||||||
:foreground "blue"
|
|
||||||
:inverse-video t))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
See =M-x helpful-function RET custom-set-faces\!= for demos and documentation
|
|
||||||
for this macro.
|
|
||||||
|
|
||||||
* TODO Troubleshooting
|
|
|
@ -1,15 +0,0 @@
|
||||||
;;; ui/fill-column/autoload.el -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defalias '+fill-column/toggle
|
|
||||||
(if (fboundp 'display-fill-column-indicator-mode)
|
|
||||||
#'display-fill-column-indicator-mode ; Emacs 27 only
|
|
||||||
(autoload 'hl-fill-column-mode "hl-fill-column" nil t)
|
|
||||||
#'hl-fill-column-mode))
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defalias '+fill-column-enable-h #'+fill-column/toggle)
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(add-hook! '(text-mode-hook prog-mode-hook conf-mode-hook)
|
|
||||||
#'+fill-column-enable-h)
|
|
|
@ -1,6 +0,0 @@
|
||||||
;; -*- no-byte-compile: t; -*-
|
|
||||||
;;; ui/fill-column/packages.el
|
|
||||||
|
|
||||||
;; `hl-fill-column' is only used on Emacs versions before 27
|
|
||||||
(unless (fboundp 'display-fill-column-indicator-mode)
|
|
||||||
(package! hl-fill-column :pin "5782a91ba0182c4e562fa0db6379ff9dd472856b"))
|
|
Loading…
Add table
Add a link
Reference in a new issue