mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-24 12:00:24 +10:00
Updating dotfiles.
This commit is contained in:
@@ -34,11 +34,12 @@ dashboard reloading is inhibited.")
|
||||
|
||||
Possible values:
|
||||
|
||||
'last-project the `doom-project-root' of the last open buffer
|
||||
'last the `default-directory' of the last open buffer
|
||||
a FUNCTION a function run with the `default-directory' of the last
|
||||
'last-project The `doom-project-root' of the last open buffer. Falls back
|
||||
to `default-directory' if not in a project.
|
||||
'last The `default-directory' of the last open buffer
|
||||
a FUNCTION A function run with the `default-directory' of the last
|
||||
open buffer, that returns a directory path
|
||||
a STRING a fixed path
|
||||
a STRING A fixed path
|
||||
nil `default-directory' will never change")
|
||||
|
||||
(defvar +doom-dashboard-menu-sections
|
||||
@@ -369,9 +370,8 @@ controlled by `+doom-dashboard-pwd-policy'."
|
||||
((null lastcwd)
|
||||
default-directory)
|
||||
((eq policy 'last-project)
|
||||
(let ((cwd default-directory))
|
||||
(or (doom-project-root lastcwd)
|
||||
cwd)))
|
||||
(or (doom-project-root lastcwd)
|
||||
lastcwd))
|
||||
((eq policy 'last)
|
||||
lastcwd)
|
||||
((warn "`+doom-dashboard-pwd-policy' has an invalid value of '%s'"
|
||||
|
||||
@@ -3,6 +3,37 @@
|
||||
#+SINCE: v2.0
|
||||
#+STARTUP: inlineimages
|
||||
|
||||
* Table of Contents :TOC_3:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#module-flags][Module Flags]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#features][Features]]
|
||||
- [[#configurations][Configurations]]
|
||||
- [[#troubleshooting][Troubleshooting]]
|
||||
|
||||
* Description
|
||||
A silly module that prompts you with messages when you try to quit, like DOOM
|
||||
did. Some quotes are from Doom's quit-message list. Others are random, nerdy
|
||||
references that no decent human being has any business recognizing.
|
||||
references that no decent human being has any business recognising.
|
||||
** Module Flags
|
||||
This module provides no flags
|
||||
** Plugins
|
||||
This module uses no Plugins
|
||||
* Prerequisites
|
||||
This module provides no prerequisite
|
||||
* Features
|
||||
This module only works when you run individual Emacs instances and not the
|
||||
daemon.
|
||||
* Configurations
|
||||
you can configure the messages by adding to the variable ~+doom-quit-messages~
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq +doom-quit-messages '(;;from doom 2
|
||||
"Don't go now, there's a dimensional shambler waiting at the dos prompt!"
|
||||
"Get outta here and go back to your boring programs."
|
||||
"If I were your boss, I'd deathmatch ya in a minute!"
|
||||
"Look, bud. You leave now and you forfeit your body count!"
|
||||
"You're lucky I don't smack you for thinking about leaving."))
|
||||
#+END_SRC
|
||||
* Troubleshooting
|
||||
If you have any issues with this module do let me know
|
||||
|
||||
@@ -35,13 +35,6 @@
|
||||
(when solaire-global-mode
|
||||
(solaire-global-mode -1))))))
|
||||
|
||||
(add-hook! 'solaire-global-mode-hook :append
|
||||
(defun +doom-solaire-swap-bg-faces-maybe-h ()
|
||||
(and (bound-and-true-p solaire-global-mode)
|
||||
(symbolp doom-theme)
|
||||
(string-prefix-p "doom-" (symbol-name doom-theme))
|
||||
(solaire-mode-swap-bg))))
|
||||
|
||||
;; DEPRECATED No longer needed in Emacs 27+
|
||||
(unless EMACS27+
|
||||
;; HACK On Emacs <=26, when point is on the last (or second to last) line
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/doom/packages.el
|
||||
|
||||
(package! doom-themes :pin "2c71a9fe4edcdcd8844e60c6cddc5faf954dfc72")
|
||||
(package! solaire-mode :pin "d3e8f9e1e3109a93a39602deac6a21be497f7f16")
|
||||
(package! doom-themes :pin "24023de3c80c9f3afc3d012762d1ef0f8dbd326e")
|
||||
(package! solaire-mode :pin "cd63b675140232f399e7733d7ce95a0b931b1058")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/fill-column/packages.el
|
||||
|
||||
(package! hl-fill-column :pin "43cb3c35a92c912b7205b8a36f1ad0ec0a5b4a22")
|
||||
(package! hl-fill-column :pin "5782a91ba0182c4e562fa0db6379ff9dd472856b")
|
||||
|
||||
@@ -1,13 +1,83 @@
|
||||
#+TITLE: :ui hl-todo
|
||||
#+DATE: February 19, 2017
|
||||
#+SINCE: v1.3
|
||||
#+STARTUP: inlineimages
|
||||
|
||||
This module adds syntax highlighting for TODO/FIXME/NOTE tags in programming major-modes.
|
||||
* Table of Contents :TOC_3:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#module-flags][Module Flags]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#features][Features]]
|
||||
- [[#making-items][Making Items]]
|
||||
- [[#keybindings][Keybindings]]
|
||||
- [[#adding-items][Adding items.]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#troubleshooting][Troubleshooting]]
|
||||
|
||||
What keywords are highlighted (and their color) can be customized through ~hl-todo-keyword-faces~.
|
||||
* Description
|
||||
This module adds syntax highlighting for TODO/FIXME/NOTE tags in programming
|
||||
major-modes.
|
||||
|
||||
** Module Flags
|
||||
This module provides no flags
|
||||
|
||||
** Plugins
|
||||
+ [[https://github.com/tarius/hl-todo][hl-todo]]
|
||||
|
||||
* Prerequisites
|
||||
This module has no prerequisites
|
||||
|
||||
* Features
|
||||
|
||||
** Making Items
|
||||
You can make a TODO item by simply writing
|
||||
+ =TODO=
|
||||
For things that need to be done, just not today.
|
||||
+ =HACK=
|
||||
For tidbits that are unconventional and not intended uses of the
|
||||
constituent parts, and may break in a future update.
|
||||
+ =FIXME=
|
||||
For problems that will become bigger problems later if not fixed ASAP.
|
||||
+ =REVIEW=
|
||||
for things that were done hastily and/or hasn't been thoroughly
|
||||
tested. it may not even be necessary!
|
||||
+ =NOTE=
|
||||
For especially important gotchas with a given implementation,
|
||||
directed at another user other than the author.
|
||||
+ =DEPRECATED=
|
||||
For things that just gotta go and will soon be gone.
|
||||
+ =BUG=
|
||||
For a known bug that needs a workaround
|
||||
+ =XXX=
|
||||
For warning about a problematic or misguiding code
|
||||
|
||||
** Keybindings
|
||||
| keybind | description |
|
||||
|-----------+----------------------------------|
|
||||
| =]t= | go to next TODO item |
|
||||
| =[t= | go to previous TODO item |
|
||||
| =SPC p t= | show all TODO items in a project |
|
||||
| =SPC s p= | search project for a string |
|
||||
| =SPC s b= | search buffer for string |
|
||||
|
||||
** TODO Adding items.
|
||||
The way you would add a TODO item is to use a snippet but these have not been
|
||||
made. you can make them yourself by adding the snippet to
|
||||
=$DOOMDIR/snippets/MAJOR-MODE/name-of-snippet=. you will find more info on how
|
||||
to make them [[https://github.com/hlissner/doom-snippets][here]]
|
||||
|
||||
* Configuration
|
||||
To add your own ITEMS you would need to configure them using
|
||||
~hl-todo-keyword-faces~
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; the default
|
||||
(setq hl-todo-keyword-faces
|
||||
`(("TODO" . ,(face-foreground 'warning))
|
||||
("FIXME" . ,(face-foreground 'error))
|
||||
("NOTE" . ,(face-foreground 'success))))
|
||||
(after! hl-todo
|
||||
(setq hl-todo-keyword-faces
|
||||
`(
|
||||
("FOO" . ,(face-foreground "MY COLOUR HEX CODE"))
|
||||
("BAR" . ,(face-foreground 'my-colour-var)))))
|
||||
#+END_SRC
|
||||
|
||||
* TODO Troubleshooting
|
||||
If you have any problems with this module do get in touch!
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/hl-todo/packages.el
|
||||
|
||||
(package! hl-todo :pin "3bba4591c54951d2abab113ec5e58a6319808ca9")
|
||||
(package! hl-todo :pin "0598b98f63b623c1778cbd2e2f60b774b7a311b9")
|
||||
|
||||
@@ -24,7 +24,7 @@ This module provides no flags.
|
||||
+ [[https://github.com/abo-abo/hydra][hydra]]
|
||||
|
||||
* Prerequisites
|
||||
This module has no prereqisites.
|
||||
This module has no prerequisites.
|
||||
|
||||
* Configuration
|
||||
Configuring this module is only setting bindings to the provided hydra, or
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/hydra/packages.el
|
||||
|
||||
(package! hydra :pin "87873d788891029d9e44fa5458321d6a05849b94")
|
||||
(package! hydra :pin "112e689f75b59398d8eca79ac6562dca12b8a959")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/indent-guides/packages.el
|
||||
|
||||
(package! highlight-indent-guides :pin "1b12c7b440ff988c7237936187c1375ac4ddc7f4")
|
||||
(package! highlight-indent-guides :pin "a4f771418e4eed1f3f7879a43af28cf97747d41c")
|
||||
|
||||
@@ -152,13 +152,13 @@ LHS and RHS will accept."
|
||||
(lambda (&rest _) (set-modeline! name))))
|
||||
|
||||
(defmacro def-modeline-var! (name body &optional docstring &rest plist)
|
||||
"TODO"
|
||||
"Define a modeline segment variable."
|
||||
(unless (stringp docstring)
|
||||
(push docstring plist)
|
||||
(setq docstring nil))
|
||||
`(progn
|
||||
(,(if (plist-get plist :local) 'defvar-local 'defvar)
|
||||
,name ,body ,docstring)
|
||||
(defconst ,name ,body ,docstring)
|
||||
,@(if (plist-get plist :local) `((make-variable-buffer-local ',name)))
|
||||
(put ',name 'risky-local-variable t)))
|
||||
|
||||
|
||||
@@ -352,20 +352,40 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
|
||||
|
||||
|
||||
;;; `+modeline-buffer-identification'
|
||||
(defvar-local +modeline--buffer-id-cache nil)
|
||||
|
||||
;; REVIEW Generating the buffer's file name can be relatively expensive.
|
||||
;; Compounded with how often the modeline updates this can add up, so
|
||||
;; we cache it ahead of time.
|
||||
(add-hook! '(change-major-mode-after-body-hook
|
||||
;; In case the user saves the file to a new location
|
||||
after-save-hook
|
||||
;; ...or makes external changes then returns to Emacs
|
||||
focus-in-hook
|
||||
;; ...or when we change the current project!
|
||||
projectile-after-switch-project-hook
|
||||
;; ...when the visited file changes (e.g. it's renamed)
|
||||
after-set-visited-file-name-hook
|
||||
;; ...when the underlying file changes
|
||||
after-revert-hook)
|
||||
(defun +modeline--generate-buffer-id-cache-h ()
|
||||
(when after-init-time
|
||||
(setq +modeline--buffer-id-cache
|
||||
(let ((file-name (buffer-file-name (buffer-base-buffer))))
|
||||
(unless (or (null default-directory)
|
||||
(null file-name)
|
||||
(file-remote-p file-name))
|
||||
(when-let (project-root (doom-project-root))
|
||||
(file-relative-name (or buffer-file-truename (file-truename file-name))
|
||||
(concat project-root "..")))))))))
|
||||
|
||||
(def-modeline-var! +modeline-buffer-identification ; slightly more informative buffer id
|
||||
'((:eval
|
||||
(propertize
|
||||
(let ((buffer-file-name (buffer-file-name (buffer-base-buffer))))
|
||||
(or (when (and (not (file-remote-p buffer-file-name)) buffer-file-name)
|
||||
(if-let (project (doom-project-root buffer-file-name))
|
||||
(let ((filename (or buffer-file-truename (file-truename buffer-file-name))))
|
||||
(file-relative-name filename (concat project "..")))))
|
||||
"%b"))
|
||||
'face (cond ((buffer-modified-p)
|
||||
'(error bold mode-line-buffer-id))
|
||||
((+modeline-active)
|
||||
'mode-line-buffer-id))
|
||||
'help-echo buffer-file-name))
|
||||
(or +modeline--buffer-id-cache "%b")
|
||||
'face (cond ((buffer-modified-p) '(error bold mode-line-buffer-id))
|
||||
((+modeline-active) 'mode-line-buffer-id))
|
||||
'help-echo (or +modeline--buffer-id-cache (buffer-name))))
|
||||
(buffer-read-only (:propertize " RO" face warning))))
|
||||
|
||||
|
||||
@@ -400,9 +420,9 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
|
||||
warning
|
||||
info))))
|
||||
(+modeline-format-icon "check" "" 'success)))
|
||||
(`running (+modeline-format-icon "access_time" "*" 'font-lock-comment-face "Running..."))
|
||||
(`running (+modeline-format-icon "access_time" "*" 'mode-line-inactive "Running..."))
|
||||
(`errored (+modeline-format-icon "sim_card_alert" "!" 'error "Errored!"))
|
||||
(`interrupted (+modeline-format-icon "pause" "!" 'font-lock-comment-face "Interrupted"))
|
||||
(`interrupted (+modeline-format-icon "pause" "!" 'mode-line-inactive "Interrupted"))
|
||||
(`suspicious (+modeline-format-icon "priority_high" "!" 'error "Suspicious"))))))
|
||||
|
||||
|
||||
@@ -517,28 +537,6 @@ lines are selected, or the NxM dimensions of a block selection.")
|
||||
;; TODO (def-modeline! helm ...)
|
||||
|
||||
|
||||
;;
|
||||
;;; Bootstrap
|
||||
|
||||
(size-indication-mode +1) ; filesize in modeline
|
||||
|
||||
(setq-default
|
||||
mode-line-format
|
||||
'(""
|
||||
+modeline-bar
|
||||
+modeline-format-left
|
||||
(:eval
|
||||
(propertize
|
||||
" "
|
||||
'display
|
||||
`((space :align-to (- (+ right right-fringe right-margin)
|
||||
,(string-width
|
||||
(format-mode-line '("" +modeline-format-right))))))))
|
||||
+modeline-format-right))
|
||||
(with-current-buffer "*Messages*"
|
||||
(setq mode-line-format (default-value 'mode-line-format)))
|
||||
|
||||
|
||||
;; Other modes
|
||||
(set-modeline! :main 'default)
|
||||
(set-modeline-hook! '+doom-dashboard-mode-hook 'project)
|
||||
@@ -553,3 +551,34 @@ lines are selected, or the NxM dimensions of a block selection.")
|
||||
(if (eq major-mode 'magit-status-mode)
|
||||
(set-modeline! 'project)
|
||||
(hide-mode-line-mode +1))))
|
||||
|
||||
|
||||
;;
|
||||
;;; Bootstrap
|
||||
|
||||
(defvar +modeline--old-format (default-value 'mode-line-format))
|
||||
|
||||
(define-minor-mode +modeline-mode
|
||||
"TODO"
|
||||
:init-value nil
|
||||
:global nil
|
||||
(cond
|
||||
(+modeline-mode
|
||||
(setq mode-line-format
|
||||
(cons
|
||||
"" '(+modeline-bar
|
||||
+modeline-format-left
|
||||
(:eval
|
||||
(propertize
|
||||
" "
|
||||
'display
|
||||
`((space :align-to (- (+ right right-fringe right-margin)
|
||||
,(string-width
|
||||
(format-mode-line '("" +modeline-format-right))))))))
|
||||
+modeline-format-right))))
|
||||
((setq mode-line-format +modeline--old-format))))
|
||||
|
||||
(define-global-minor-mode +modeline-global-mode +modeline-mode +modeline-mode)
|
||||
|
||||
(add-hook '+modeline-global-mode-hook #'size-indication-mode)
|
||||
(add-hook 'doom-init-ui-hook #'+modeline-global-mode)
|
||||
|
||||
@@ -4,15 +4,6 @@
|
||||
(load! "+light"))
|
||||
|
||||
|
||||
(defvar +modeline--redisplayed-p nil)
|
||||
(defadvice! modeline-recalculate-height-a (&optional _force &rest _ignored)
|
||||
"Ensure that window resizing functions take modeline height into account."
|
||||
:before '(fit-window-to-buffer resize-temp-buffer-window)
|
||||
(unless +modeline--redisplayed-p
|
||||
(setq-local +modeline--redisplayed-p t)
|
||||
(redisplay t)))
|
||||
|
||||
|
||||
(use-package! doom-modeline
|
||||
:unless (featurep! +light)
|
||||
:hook (after-init . doom-modeline-mode)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
;;; ui/modeline/packages.el
|
||||
|
||||
(unless (featurep! +light)
|
||||
(package! doom-modeline :pin "881e099fe02e3dd5ad66c51156fcdcc60e093a9b"))
|
||||
(package! doom-modeline :pin "ffbaaee832f1c97ff608bc4959b408997d959b7d"))
|
||||
(package! anzu :pin "7b8688c84d6032300d0c415182c7c1ad6cb7f819")
|
||||
(when (featurep! :editor evil)
|
||||
(package! evil-anzu :pin "d3f6ed4773b48767bd5f4708c7f083336a8a8a86"))
|
||||
|
||||
@@ -25,7 +25,7 @@ This module has no dependencies.
|
||||
|
||||
* Configuration
|
||||
By default, ~nav-flash~ will be triggered whenever ~recenter~ is called or an
|
||||
entry is added to the jump-list (maanaged by better-jumper).
|
||||
entry is added to the jump-list (managed by better-jumper).
|
||||
|
||||
~recenter~ is called after many hooks and commands, such as:
|
||||
|
||||
|
||||
@@ -14,11 +14,12 @@ jumping to another part of the file)."
|
||||
|
||||
;;;###autoload
|
||||
(defun +nav-flash-blink-cursor-maybe (&rest _)
|
||||
"Like `+nav-flash-blink-cursor', but no-ops if in special-mode or term-mode,
|
||||
or triggered from one of `+nav-flash-exclude-commands'."
|
||||
"Like `+nav-flash-blink-cursor', but no-ops if in special-mode, term-mode,
|
||||
vterm-mode, or triggered from one of `+nav-flash-exclude-commands'."
|
||||
(unless (or (memq this-command +nav-flash-exclude-commands)
|
||||
(bound-and-true-p so-long-minor-mode)
|
||||
(derived-mode-p 'so-long-mode 'special-mode 'term-mode)
|
||||
(derived-mode-p 'so-long-mode 'special-mode 'term-mode
|
||||
'vterm-mode)
|
||||
(and (equal (point-marker) (car +nav-flash--last-point))
|
||||
(equal (selected-window) (cdr +nav-flash--last-point))))
|
||||
(+nav-flash-blink-cursor)
|
||||
|
||||
@@ -1,127 +0,0 @@
|
||||
;;; ui/pretty-code/+fira.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +pretty-code-fira-code-font-name "Fira Code Symbol"
|
||||
"Name of the fira code ligature font.")
|
||||
|
||||
(defvar +pretty-code-fira-code-font-ligatures
|
||||
'(("www" . #Xe100)
|
||||
("**" . #Xe101)
|
||||
("***" . #Xe102)
|
||||
("**/" . #Xe103)
|
||||
("*>" . #Xe104)
|
||||
("*/" . #Xe105)
|
||||
("\\\\" . #Xe106)
|
||||
("\\\\\\" . #Xe107)
|
||||
("{-" . #Xe108)
|
||||
("[]" . #Xe109)
|
||||
("::" . #Xe10a)
|
||||
(":::" . #Xe10b)
|
||||
(":=" . #Xe10c)
|
||||
("!!" . #Xe10d)
|
||||
("!=" . #Xe10e)
|
||||
("!==" . #Xe10f)
|
||||
("-}" . #Xe110)
|
||||
("--" . #Xe111)
|
||||
("---" . #Xe112)
|
||||
("-->" . #Xe113)
|
||||
("->" . #Xe114)
|
||||
("->>" . #Xe115)
|
||||
("-<" . #Xe116)
|
||||
("-<<" . #Xe117)
|
||||
("-~" . #Xe118)
|
||||
("#{" . #Xe119)
|
||||
("#[" . #Xe11a)
|
||||
("##" . #Xe11b)
|
||||
("###" . #Xe11c)
|
||||
("####" . #Xe11d)
|
||||
("#(" . #Xe11e)
|
||||
("#?" . #Xe11f)
|
||||
("#_" . #Xe120)
|
||||
("#_(" . #Xe121)
|
||||
(".-" . #Xe122)
|
||||
(".=" . #Xe123)
|
||||
(".." . #Xe124)
|
||||
("..<" . #Xe125)
|
||||
("..." . #Xe126)
|
||||
("?=" . #Xe127)
|
||||
("??" . #Xe128)
|
||||
(";;" . #Xe129)
|
||||
("/*" . #Xe12a)
|
||||
("/**" . #Xe12b)
|
||||
("/=" . #Xe12c)
|
||||
("/==" . #Xe12d)
|
||||
("/>" . #Xe12e)
|
||||
("//" . #Xe12f)
|
||||
("///" . #Xe130)
|
||||
("&&" . #Xe131)
|
||||
("||" . #Xe132)
|
||||
("||=" . #Xe133)
|
||||
("|=" . #Xe134)
|
||||
("|>" . #Xe135)
|
||||
("^=" . #Xe136)
|
||||
("$>" . #Xe137)
|
||||
("++" . #Xe138)
|
||||
("+++" . #Xe139)
|
||||
("+>" . #Xe13a)
|
||||
("=:=" . #Xe13b)
|
||||
("==" . #Xe13c)
|
||||
("===" . #Xe13d)
|
||||
("==>" . #Xe13e)
|
||||
("=>" . #Xe13f)
|
||||
("=>>" . #Xe140)
|
||||
("=<" . #Xe141)
|
||||
("=<<" . #Xe142)
|
||||
("=/=" . #Xe143)
|
||||
(">-" . #Xe144)
|
||||
(">=" . #Xe145)
|
||||
(">=>" . #Xe146)
|
||||
(">>" . #Xe147)
|
||||
(">>-" . #Xe148)
|
||||
(">>=" . #Xe149)
|
||||
(">>>" . #Xe14a)
|
||||
("<*" . #Xe14b)
|
||||
("<*>" . #Xe14c)
|
||||
("<|" . #Xe14d)
|
||||
("<|>" . #Xe14e)
|
||||
("<$" . #Xe14f)
|
||||
("<$>" . #Xe150)
|
||||
("<!--" . #Xe151)
|
||||
("<-" . #Xe152)
|
||||
("<--" . #Xe153)
|
||||
("<->" . #Xe154)
|
||||
("<+" . #Xe155)
|
||||
("<+>" . #Xe156)
|
||||
("<=" . #Xe157)
|
||||
("<==" . #Xe158)
|
||||
("<=>" . #Xe159)
|
||||
("<=<" . #Xe15a)
|
||||
("<>" . #Xe15b)
|
||||
("<<" . #Xe15c)
|
||||
("<<-" . #Xe15d)
|
||||
("<<=" . #Xe15e)
|
||||
("<<<" . #Xe15f)
|
||||
("<~" . #Xe160)
|
||||
("<~~" . #Xe161)
|
||||
("</" . #Xe162)
|
||||
("</>" . #Xe163)
|
||||
("~@" . #Xe164)
|
||||
("~-" . #Xe165)
|
||||
("~=" . #Xe166)
|
||||
("~>" . #Xe167)
|
||||
("~~" . #Xe168)
|
||||
("~~>" . #Xe169)
|
||||
("%%" . #Xe16a)
|
||||
("x" . #Xe16b)
|
||||
(":" . #Xe16c)
|
||||
("+" . #Xe16d)
|
||||
("+" . #Xe16e)
|
||||
("*" . #Xe16f)))
|
||||
|
||||
(defun +pretty-code-setup-fira-ligatures-h ()
|
||||
(set-fontset-font t '(#Xe100 . #Xe16f) +pretty-code-fira-code-font-name nil 'prepend)
|
||||
(setq-default prettify-symbols-alist
|
||||
(append prettify-symbols-alist
|
||||
(mapcar #'+pretty-code--correct-symbol-bounds
|
||||
+pretty-code-fira-code-font-ligatures))))
|
||||
|
||||
(add-hook 'doom-init-ui-hook #'+pretty-code-setup-fira-ligatures-h)
|
||||
@@ -1,58 +0,0 @@
|
||||
;;; ui/pretty-code/+hasklig.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +pretty-code-hasklig-font-name "Hasklig"
|
||||
"Name of the hasklig ligature font.")
|
||||
|
||||
(defvar +pretty-code-hasklig-font-ligatures
|
||||
'(("&&" . #Xe100)
|
||||
("***" . #Xe101)
|
||||
("*>" . #Xe102)
|
||||
("\\\\" . #Xe103)
|
||||
("||" . #Xe104)
|
||||
("|>" . #Xe105)
|
||||
("::" . #Xe106)
|
||||
("==" . #Xe107)
|
||||
("===" . #Xe108)
|
||||
("==>" . #Xe109)
|
||||
("=>" . #Xe10a)
|
||||
("=<<" . #Xe10b)
|
||||
("!!" . #Xe10c)
|
||||
(">>" . #Xe10d)
|
||||
(">>=" . #Xe10e)
|
||||
(">>>" . #Xe10f)
|
||||
(">>-" . #Xe110)
|
||||
(">-" . #Xe111)
|
||||
("->" . #Xe112)
|
||||
("-<" . #Xe113)
|
||||
("-<<" . #Xe114)
|
||||
("<*" . #Xe115)
|
||||
("<*>" . #Xe116)
|
||||
("<|" . #Xe117)
|
||||
("<|>" . #Xe118)
|
||||
("<$>" . #Xe119)
|
||||
("<>" . #Xe11a)
|
||||
("<-" . #Xe11b)
|
||||
("<<" . #Xe11c)
|
||||
("<<<" . #Xe11d)
|
||||
("<+>" . #Xe11e)
|
||||
(".." . #Xe11f)
|
||||
("..." . #Xe120)
|
||||
("++" . #Xe121)
|
||||
("+++" . #Xe122)
|
||||
("/=" . #Xe123)
|
||||
(":::" . #Xe124)
|
||||
(">=>" . #Xe125)
|
||||
("->>" . #Xe126)
|
||||
("<=>" . #Xe127)
|
||||
("<=<" . #Xe128)
|
||||
("<->" . #Xe129)))
|
||||
|
||||
|
||||
(defun +pretty-code-setup-hasklig-ligatures-h ()
|
||||
(set-fontset-font t '(#Xe100 . #Xe129) +pretty-code-hasklig-font-name nil 'prepend)
|
||||
(setq-default prettify-symbols-alist
|
||||
(append prettify-symbols-alist
|
||||
(mapcar #'+pretty-code--correct-symbol-bounds
|
||||
+pretty-code-hasklig-font-ligatures))))
|
||||
|
||||
(add-hook 'doom-init-ui-hook #'+pretty-code-setup-hasklig-ligatures-h)
|
||||
@@ -1,232 +0,0 @@
|
||||
;;; ui/pretty-code/+iosevka.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +pretty-code-iosevka-font-name "Iosevka"
|
||||
"Name of the iosevka ligature font.")
|
||||
|
||||
(defvar +pretty-code-iosevka-font-ligatures
|
||||
'(;; Double-ended hyphen arrows
|
||||
("<->" . #Xe100)
|
||||
("<-->" . #Xe101)
|
||||
("<--->" . #Xe102)
|
||||
("<---->" . #Xe103)
|
||||
("<----->" . #Xe104)
|
||||
;; Double-ended equals arrows
|
||||
("<=>" . #Xe105)
|
||||
("<==>" . #Xe106)
|
||||
("<===>" . #Xe107)
|
||||
("<====>" . #Xe108)
|
||||
("<=====>" . #Xe109)
|
||||
;; Double-ended asterisk operators
|
||||
("<**>" . #Xe10a)
|
||||
("<***>" . #Xe10b)
|
||||
("<****>" . #Xe10c)
|
||||
("<*****>" . #Xe10d)
|
||||
;; HTML comments
|
||||
("<!--" . #Xe10e)
|
||||
("<!---" . #Xe10f)
|
||||
;; Three-char ops with discards
|
||||
("<$" . #Xe110)
|
||||
("<$>" . #Xe111)
|
||||
("$>" . #Xe112)
|
||||
("<." . #Xe113)
|
||||
("<.>" . #Xe114)
|
||||
(".>" . #Xe115)
|
||||
("<*" . #Xe116)
|
||||
("<*>" . #Xe117)
|
||||
("*>" . #Xe118)
|
||||
("<\\" . #Xe119)
|
||||
("<\\>" . #Xe11a)
|
||||
("\\>" . #Xe11b)
|
||||
("</" . #Xe11c)
|
||||
("</>" . #Xe11d)
|
||||
("/>" . #Xe11e)
|
||||
("<\"" . #Xe11f)
|
||||
("<\">" . #Xe120)
|
||||
("\">" . #Xe121)
|
||||
("<'" . #Xe122)
|
||||
("<'>" . #Xe123)
|
||||
("'>" . #Xe124)
|
||||
("<^" . #Xe125)
|
||||
("<^>" . #Xe126)
|
||||
("^>" . #Xe127)
|
||||
("<&" . #Xe128)
|
||||
("<&>" . #Xe129)
|
||||
("&>" . #Xe12a)
|
||||
("<%" . #Xe12b)
|
||||
("<%>" . #Xe12c)
|
||||
("%>" . #Xe12d)
|
||||
("<@" . #Xe12e)
|
||||
("<@>" . #Xe12f)
|
||||
("@>" . #Xe130)
|
||||
("<#" . #Xe131)
|
||||
("<#>" . #Xe132)
|
||||
("#>" . #Xe133)
|
||||
("<+" . #Xe134)
|
||||
("<+>" . #Xe135)
|
||||
("+>" . #Xe136)
|
||||
("<-" . #Xe137)
|
||||
("<->" . #Xe138)
|
||||
("->" . #Xe139)
|
||||
("<!" . #Xe13a)
|
||||
("<!>" . #Xe13b)
|
||||
("!>" . #Xe13c)
|
||||
("<?" . #Xe13d)
|
||||
("<?>" . #Xe13e)
|
||||
("?>" . #Xe13f)
|
||||
("<|" . #Xe140)
|
||||
("<|>" . #Xe141)
|
||||
("|>" . #Xe142)
|
||||
("<:" . #Xe143)
|
||||
("<:>" . #Xe144)
|
||||
(":>" . #Xe145)
|
||||
;; Colons
|
||||
("::" . #Xe146)
|
||||
(":::" . #Xe147)
|
||||
("::::" . #Xe148)
|
||||
;; Arrow-like operators
|
||||
("->" . #Xe149)
|
||||
("->-" . #Xe14a)
|
||||
("->--" . #Xe14b)
|
||||
("->>" . #Xe14c)
|
||||
("->>-" . #Xe14d)
|
||||
("->>--" . #Xe14e)
|
||||
("->>>" . #Xe14f)
|
||||
("->>>-" . #Xe150)
|
||||
("->>>--" . #Xe151)
|
||||
("-->" . #Xe152)
|
||||
("-->-" . #Xe153)
|
||||
("-->--" . #Xe154)
|
||||
("-->>" . #Xe155)
|
||||
("-->>-" . #Xe156)
|
||||
("-->>--" . #Xe157)
|
||||
("-->>>" . #Xe158)
|
||||
("-->>>-" . #Xe159)
|
||||
("-->>>--" . #Xe15a)
|
||||
(">-" . #Xe15b)
|
||||
(">--" . #Xe15c)
|
||||
(">>-" . #Xe15d)
|
||||
(">>--" . #Xe15e)
|
||||
(">>>-" . #Xe15f)
|
||||
(">>>--" . #Xe160)
|
||||
("=>" . #Xe161)
|
||||
("=>=" . #Xe162)
|
||||
("=>==" . #Xe163)
|
||||
("=>>" . #Xe164)
|
||||
("=>>=" . #Xe165)
|
||||
("=>>==" . #Xe166)
|
||||
("=>>>" . #Xe167)
|
||||
("=>>>=" . #Xe168)
|
||||
("=>>>==" . #Xe169)
|
||||
("==>" . #Xe16a)
|
||||
("==>=" . #Xe16b)
|
||||
("==>==" . #Xe16c)
|
||||
("==>>" . #Xe16d)
|
||||
("==>>=" . #Xe16e)
|
||||
("==>>==" . #Xe16f)
|
||||
("==>>>" . #Xe170)
|
||||
("==>>>=" . #Xe171)
|
||||
("==>>>==" . #Xe172)
|
||||
(">=" . #Xe173)
|
||||
(">==" . #Xe174)
|
||||
(">>=" . #Xe175)
|
||||
(">>==" . #Xe176)
|
||||
(">>>=" . #Xe177)
|
||||
(">>>==" . #Xe178)
|
||||
("<-" . #Xe179)
|
||||
("-<-" . #Xe17a)
|
||||
("--<-" . #Xe17b)
|
||||
("<<-" . #Xe17c)
|
||||
("-<<-" . #Xe17d)
|
||||
("--<<-" . #Xe17e)
|
||||
("<<<-" . #Xe17f)
|
||||
("-<<<-" . #Xe180)
|
||||
("--<<<-" . #Xe181)
|
||||
("<--" . #Xe182)
|
||||
("-<--" . #Xe183)
|
||||
("--<--" . #Xe184)
|
||||
("<<--" . #Xe185)
|
||||
("-<<--" . #Xe186)
|
||||
("--<<--" . #Xe187)
|
||||
("<<<--" . #Xe188)
|
||||
("-<<<--" . #Xe189)
|
||||
("--<<<--" . #Xe18a)
|
||||
("-<" . #Xe18b)
|
||||
("--<" . #Xe18c)
|
||||
("-<<" . #Xe18d)
|
||||
("--<<" . #Xe18e)
|
||||
("-<<<" . #Xe18f)
|
||||
("--<<<" . #Xe190)
|
||||
("<=" . #Xe191)
|
||||
("=<=" . #Xe192)
|
||||
("==<=" . #Xe193)
|
||||
("<<=" . #Xe194)
|
||||
("=<<=" . #Xe195)
|
||||
("==<<=" . #Xe196)
|
||||
("<<<=" . #Xe197)
|
||||
("=<<<=" . #Xe198)
|
||||
("==<<<=" . #Xe199)
|
||||
("<==" . #Xe19a)
|
||||
("=<==" . #Xe19b)
|
||||
("==<==" . #Xe19c)
|
||||
("<<==" . #Xe19d)
|
||||
("=<<==" . #Xe19e)
|
||||
("==<<==" . #Xe19f)
|
||||
("<<<==" . #Xe1a0)
|
||||
("=<<<==" . #Xe1a1)
|
||||
("==<<<==" . #Xe1a2)
|
||||
("=<" . #Xe1a3)
|
||||
("==<" . #Xe1a4)
|
||||
("=<<" . #Xe1a5)
|
||||
("==<<" . #Xe1a6)
|
||||
("=<<<" . #Xe1a7)
|
||||
("==<<<" . #Xe1a8)
|
||||
;; Monadic operators
|
||||
(">=>" . #Xe1a9)
|
||||
(">->" . #Xe1aa)
|
||||
(">-->" . #Xe1ab)
|
||||
(">==>" . #Xe1ac)
|
||||
("<=<" . #Xe1ad)
|
||||
("<-<" . #Xe1ae)
|
||||
("<--<" . #Xe1af)
|
||||
("<==<" . #Xe1b0)
|
||||
;; Composition operators
|
||||
(">>" . #Xe1b1)
|
||||
(">>>" . #Xe1b2)
|
||||
("<<" . #Xe1b3)
|
||||
("<<<" . #Xe1b4)
|
||||
;; Lens operators
|
||||
(":+" . #Xe1b5)
|
||||
(":-" . #Xe1b6)
|
||||
(":=" . #Xe1b7)
|
||||
("+:" . #Xe1b8)
|
||||
("-:" . #Xe1b9)
|
||||
("=:" . #Xe1ba)
|
||||
("=^" . #Xe1bb)
|
||||
("=+" . #Xe1bc)
|
||||
("=-" . #Xe1bd)
|
||||
("=*" . #Xe1be)
|
||||
("=/" . #Xe1bf)
|
||||
("=%" . #Xe1c0)
|
||||
("^=" . #Xe1c1)
|
||||
("+=" . #Xe1c2)
|
||||
("-=" . #Xe1c3)
|
||||
("*=" . #Xe1c4)
|
||||
("/=" . #Xe1c5)
|
||||
("%=" . #Xe1c6)
|
||||
;; Logical
|
||||
("/\\" . #Xe1c7)
|
||||
("\\/" . #Xe1c8)
|
||||
;; Semigroup/monoid operators
|
||||
("<>" . #Xe1c9)
|
||||
("<+" . #Xe1ca)
|
||||
("<+>" . #Xe1cb)
|
||||
("+>" . #Xe1cc))
|
||||
"Defines the character mappings for ligatures for Iosevka.")
|
||||
|
||||
(defun +pretty-code-setup-iosevka-ligatures-h ()
|
||||
(set-fontset-font t '(#Xe100 . #Xe1cc) +pretty-code-iosevka-font-name nil 'prepend)
|
||||
(setq-default prettify-symbols-alist
|
||||
(append prettify-symbols-alist
|
||||
+pretty-code-iosevka-font-ligatures)))
|
||||
|
||||
(add-hook 'doom-init-ui-hook #'+pretty-code-setup-iosevka-ligatures-h)
|
||||
@@ -1,259 +0,0 @@
|
||||
;;; ui/pretty-code/+pragmata-pro.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +pretty-code-pragmata-pro-font-name "PragmataPro"
|
||||
"Name of the Pragmata Pro ligature font.")
|
||||
|
||||
(defvar +pretty-code-pragmata-pro-font-ligatures
|
||||
'(("[ERROR]" . #XE2C0)
|
||||
("[DEBUG]" . #XE2C1)
|
||||
("[INFO]" . #XE2C2)
|
||||
("[WARN]" . #XE2C3)
|
||||
("[WARNING]" . #XE2C4)
|
||||
("[ERR]" . #XE2C5)
|
||||
("[FATAL]" . #XE2C6)
|
||||
("[TRACE]" . #XE2C7)
|
||||
("[FIXME]" . #XE2C8)
|
||||
("[TODO]" . #XE2C9)
|
||||
("[BUG]" . #XE2CA)
|
||||
("[NOTE]" . #XE2CB)
|
||||
("[HACK]" . #XE2CC)
|
||||
("[MARK]" . #XE2CD)
|
||||
("# ERROR" . #XE2F0)
|
||||
("# DEBUG" . #XE2F1)
|
||||
("# INFO" . #XE2F2)
|
||||
("# WARN" . #XE2F3)
|
||||
("# WARNING" . #XE2F4)
|
||||
("# ERR" . #XE2F5)
|
||||
("# FATAL" . #XE2F6)
|
||||
("# TRACE" . #XE2F7)
|
||||
("# FIXME" . #XE2F8)
|
||||
("# TODO" . #XE2F9)
|
||||
("# BUG" . #XE2FA)
|
||||
("# NOTE" . #XE2FB)
|
||||
("# HACK" . #XE2FC)
|
||||
("# MARK" . #XE2FD)
|
||||
("// ERROR" . #XE2E0)
|
||||
("// DEBUG" . #XE2E1)
|
||||
("// INFO" . #XE2E2)
|
||||
("// WARN" . #XE2E3)
|
||||
("// WARNING". #XE2E4)
|
||||
("// ERR" . #XE2E5)
|
||||
("// FATAL" . #XE2E6)
|
||||
("// TRACE" . #XE2E7)
|
||||
("// FIXME" . #XE2E8)
|
||||
("// TODO" . #XE2E9)
|
||||
("// BUG" . #XE2EA)
|
||||
("// NOTE" . #XE2EB)
|
||||
("// HACK" . #XE2EC)
|
||||
("// MARK" . #XE2ED)
|
||||
("!!" . #XE900)
|
||||
("!=" . #XE901)
|
||||
("!==" . #XE902)
|
||||
("!!!" . #XE903)
|
||||
("!≡" . #XE904)
|
||||
("!≡≡" . #XE905)
|
||||
("!>" . #XE906)
|
||||
("!=<" . #XE907)
|
||||
("#(" . #XE920)
|
||||
("#_" . #XE921)
|
||||
("#{" . #XE922)
|
||||
("#?" . #XE923)
|
||||
("#>" . #XE924)
|
||||
("##" . #XE925)
|
||||
("#_(" . #XE926)
|
||||
("%=" . #XE930)
|
||||
("%>" . #XE931)
|
||||
("%>%" . #XE932)
|
||||
("%<%" . #XE933)
|
||||
("&%" . #XE940)
|
||||
("&&" . #XE941)
|
||||
("&*" . #XE942)
|
||||
("&+" . #XE943)
|
||||
("&-" . #XE944)
|
||||
("&/" . #XE945)
|
||||
("&=" . #XE946)
|
||||
("&&&" . #XE947)
|
||||
("&>" . #XE948)
|
||||
("$>" . #XE955)
|
||||
("***" . #XE960)
|
||||
("*=" . #XE961)
|
||||
("*/" . #XE962)
|
||||
("*>" . #XE963)
|
||||
("++" . #XE970)
|
||||
("+++" . #XE971)
|
||||
("+=" . #XE972)
|
||||
("+>" . #XE973)
|
||||
("++=" . #XE974)
|
||||
("--" . #XE980)
|
||||
("-<" . #XE981)
|
||||
("-<<" . #XE982)
|
||||
("-=" . #XE983)
|
||||
("->" . #XE984)
|
||||
("->>" . #XE985)
|
||||
("---" . #XE986)
|
||||
("-->" . #XE987)
|
||||
("-+-" . #XE988)
|
||||
("-\\/" . #XE989)
|
||||
("-|>" . #XE98A)
|
||||
("-<|" . #XE98B)
|
||||
(".." . #XE990)
|
||||
("..." . #XE991)
|
||||
("..<" . #XE992)
|
||||
(".>" . #XE993)
|
||||
(".~" . #XE994)
|
||||
(".=" . #XE995)
|
||||
("/*" . #XE9A0)
|
||||
("//" . #XE9A1)
|
||||
("/>" . #XE9A2)
|
||||
("/=" . #XE9A3)
|
||||
("/==" . #XE9A4)
|
||||
("///" . #XE9A5)
|
||||
("/**" . #XE9A6)
|
||||
(":::" . #XE9AF)
|
||||
("::" . #XE9B0)
|
||||
(":=" . #XE9B1)
|
||||
(":≡" . #XE9B2)
|
||||
(":>" . #XE9B3)
|
||||
(":=>" . #XE9B4)
|
||||
(":(" . #XE9B5)
|
||||
(":-(" . #XE9B6)
|
||||
(":)" . #XE9B7)
|
||||
(":-)" . #XE9B8)
|
||||
(":/" . #XE9B9)
|
||||
(":\\" . #XE9BA)
|
||||
(":3" . #XE9BB)
|
||||
(":D" . #XE9BC)
|
||||
(":P" . #XE9BD)
|
||||
(":>:" . #XE9BE)
|
||||
(":<:" . #XE9BF)
|
||||
("<$>" . #XE9C0)
|
||||
("<*" . #XE9C1)
|
||||
("<*>" . #XE9C2)
|
||||
("<+>" . #XE9C3)
|
||||
("<-" . #XE9C4)
|
||||
("<<" . #XE9C5)
|
||||
("<<<" . #XE9C6)
|
||||
("<<=" . #XE9C7)
|
||||
("<=" . #XE9C8)
|
||||
("<=>" . #XE9C9)
|
||||
("<>" . #XE9CA)
|
||||
("<|>" . #XE9CB)
|
||||
("<<-" . #XE9CC)
|
||||
("<|" . #XE9CD)
|
||||
("<=<" . #XE9CE)
|
||||
("<~" . #XE9CF)
|
||||
("<~~" . #XE9D0)
|
||||
("<<~" . #XE9D1)
|
||||
("<$" . #XE9D2)
|
||||
("<+" . #XE9D3)
|
||||
("<!>" . #XE9D4)
|
||||
("<@>" . #XE9D5)
|
||||
("<#>" . #XE9D6)
|
||||
("<%>" . #XE9D7)
|
||||
("<^>" . #XE9D8)
|
||||
("<&>" . #XE9D9)
|
||||
("<?>" . #XE9DA)
|
||||
("<.>" . #XE9DB)
|
||||
("</>" . #XE9DC)
|
||||
("<\\>" . #XE9DD)
|
||||
("<\">" . #XE9DE)
|
||||
("<:>" . #XE9DF)
|
||||
("<~>" . #XE9E0)
|
||||
("<**>" . #XE9E1)
|
||||
("<<^" . #XE9E2)
|
||||
("<!" . #XE9E3)
|
||||
("<@" . #XE9E4)
|
||||
("<#" . #XE9E5)
|
||||
("<%" . #XE9E6)
|
||||
("<^" . #XE9E7)
|
||||
("<&" . #XE9E8)
|
||||
("<?" . #XE9E9)
|
||||
("<." . #XE9EA)
|
||||
("</" . #XE9EB)
|
||||
("<\\" . #XE9EC)
|
||||
("<\"" . #XE9ED)
|
||||
("<:" . #XE9EE)
|
||||
("<->" . #XE9EF)
|
||||
("<!--" . #XE9F0)
|
||||
("<--" . #XE9F1)
|
||||
("<~<" . #XE9F2)
|
||||
("<==>" . #XE9F3)
|
||||
("<|-" . #XE9F4)
|
||||
("<<|" . #XE9F5)
|
||||
("<-<" . #XE9F7)
|
||||
("<-->" . #XE9F8)
|
||||
("<<==" . #XE9F9)
|
||||
("<==" . #XE9FA)
|
||||
("=<<" . #XEA00)
|
||||
("==" . #XEA01)
|
||||
("===" . #XEA02)
|
||||
("==>" . #XEA03)
|
||||
("=>" . #XEA04)
|
||||
("=~" . #XEA05)
|
||||
("=>>" . #XEA06)
|
||||
("=/=" . #XEA07)
|
||||
("=~=" . #XEA08)
|
||||
("==>>" . #XEA09)
|
||||
("≡≡" . #XEA10)
|
||||
("≡≡≡" . #XEA11)
|
||||
("≡:≡" . #XEA12)
|
||||
(">-" . #XEA20)
|
||||
(">=" . #XEA21)
|
||||
(">>" . #XEA22)
|
||||
(">>-" . #XEA23)
|
||||
(">>=" . #XEA24)
|
||||
(">>>" . #XEA25)
|
||||
(">=>" . #XEA26)
|
||||
(">>^" . #XEA27)
|
||||
(">>|" . #XEA28)
|
||||
(">!=" . #XEA29)
|
||||
(">->" . #XEA2A)
|
||||
("??" . #XEA40)
|
||||
("?~" . #XEA41)
|
||||
("?=" . #XEA42)
|
||||
("?>" . #XEA43)
|
||||
("???" . #XEA44)
|
||||
("?." . #XEA45)
|
||||
("^=" . #XEA48)
|
||||
("^." . #XEA49)
|
||||
("^?" . #XEA4A)
|
||||
("^.." . #XEA4B)
|
||||
("^<<" . #XEA4C)
|
||||
("^>>" . #XEA4D)
|
||||
("^>" . #XEA4E)
|
||||
("\\\\" . #XEA50)
|
||||
("\\>" . #XEA51)
|
||||
("\\/-" . #XEA52)
|
||||
("@>" . #XEA57)
|
||||
("|=" . #XEA60)
|
||||
("||" . #XEA61)
|
||||
("|>" . #XEA62)
|
||||
("|||" . #XEA63)
|
||||
("|+|" . #XEA64)
|
||||
("|->" . #XEA65)
|
||||
("|-->" . #XEA66)
|
||||
("|=>" . #XEA67)
|
||||
("|==>" . #XEA68)
|
||||
("|>-" . #XEA69)
|
||||
("|<<" . #XEA6A)
|
||||
("||>" . #XEA6B)
|
||||
("|>>" . #XEA6C)
|
||||
("|-" . #XEA6D)
|
||||
("||-" . #XEA6E)
|
||||
("~=" . #XEA70)
|
||||
("~>" . #XEA71)
|
||||
("~~>" . #XEA72)
|
||||
("~>>" . #XEA73)
|
||||
("[[" . #XEA80)
|
||||
("]]" . #XEA81)
|
||||
("\">" . #XEA90)
|
||||
("_|_" . #XEA97))
|
||||
"Defines the character mappings for ligatures for Pragmata Pro.")
|
||||
|
||||
(defun +pretty-code-setup-pragmata-pro-ligatures-h ()
|
||||
(setq-default prettify-symbols-alist
|
||||
(append prettify-symbols-alist
|
||||
(mapcar #'+pretty-code--correct-symbol-bounds
|
||||
+pretty-code-pragmata-pro-font-ligatures))))
|
||||
|
||||
(add-hook 'doom-init-ui-hook #'+pretty-code-setup-pragmata-pro-ligatures-h)
|
||||
@@ -1,199 +0,0 @@
|
||||
;;; ui/pretty-code/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +pretty-code-symbols
|
||||
'(;; org
|
||||
:name "»"
|
||||
:src_block "»"
|
||||
:src_block_end "«"
|
||||
:quote "“"
|
||||
:quote_end "”"
|
||||
;; Functional
|
||||
:lambda "λ"
|
||||
:def "ƒ"
|
||||
:composition "∘"
|
||||
:map "↦"
|
||||
;; Types
|
||||
:null "∅"
|
||||
:true "𝕋"
|
||||
:false "𝔽"
|
||||
:int "ℤ"
|
||||
:float "ℝ"
|
||||
:str "𝕊"
|
||||
:bool "𝔹"
|
||||
:list "𝕃"
|
||||
;; Flow
|
||||
:not "¬"
|
||||
:in "∈"
|
||||
:not-in "∉"
|
||||
:and "∧"
|
||||
:or "∨"
|
||||
:for "∀"
|
||||
:some "∃"
|
||||
:return "⟼"
|
||||
:yield "⟻"
|
||||
;; Other
|
||||
:union "⋃"
|
||||
:intersect "∩"
|
||||
:diff "∖"
|
||||
:tuple "⨂"
|
||||
:pipe "" ;; FIXME: find a non-private char
|
||||
:dot "•")
|
||||
"Options plist for `set-pretty-symbols!'.
|
||||
|
||||
This should not contain any symbols from the Unicode Private Area! There is no
|
||||
universal way of getting the correct symbol as that area varies from font to
|
||||
font.")
|
||||
|
||||
(defvar +pretty-code-enabled-modes t
|
||||
"List of major modes in which `prettify-symbols-mode' should be enabled.
|
||||
If t, enable it everywhere. If the first element is 'not, enable it in any mode
|
||||
besides what is listed.")
|
||||
|
||||
(defvar +pretty-code-symbols-alist '((t))
|
||||
"An alist containing a mapping of major modes to its value for
|
||||
`prettify-symbols-alist'.")
|
||||
|
||||
;;; Automatic font-specific ligatures
|
||||
(defvar +prog-ligatures-alist
|
||||
'((?! . "\\(?:!\\(?:==\\|[!=]\\)\\)") ; (regexp-opt '("!!" "!=" "!=="))
|
||||
(?# . "\\(?:#\\(?:###?\\|_(\\|[#(:=?[_{]\\)\\)") ; (regexp-opt '("##" "###" "####" "#(" "#:" "#=" "#?" "#[" "#_" "#_(" "#{"))
|
||||
(?$ . "\\(?:\\$>>?\\)") ; (regexp-opt '("$>" "$>>"))
|
||||
(?% . "\\(?:%%%?\\)") ; (regexp-opt '("%%" "%%%"))
|
||||
(?& . "\\(?:&&&?\\)") ; (regexp-opt '("&&" "&&&"))
|
||||
(?* . "\\(?:\\*\\(?:\\*[*/]\\|[)*/>]\\)?\\)") ; (regexp-opt '("*" "**" "***" "**/" "*/" "*>" "*)"))
|
||||
(?+ . "\\(?:\\+\\(?:\\+\\+\\|[+:>]\\)?\\)") ; (regexp-opt '("+" "++" "+++" "+>" "+:"))
|
||||
(?- . "\\(?:-\\(?:-\\(?:->\\|[>-]\\)\\|<[<-]\\|>[>-]\\|[:<>|}~-]\\)\\)") ; (regexp-opt '("--" "---" "-->" "--->" "->-" "-<" "-<-" "-<<" "->" "->>" "-}" "-~" "-:" "-|"))
|
||||
(?. . "\\(?:\\.\\(?:\\.[.<]\\|[.=>-]\\)\\)") ; (regexp-opt '(".-" ".." "..." "..<" ".=" ".>"))
|
||||
(?/ . "\\(?:/\\(?:\\*\\*\\|//\\|==\\|[*/=>]\\)\\)") ; (regexp-opt '("/*" "/**" "//" "///" "/=" "/==" "/>"))
|
||||
(?: . "\\(?::\\(?:::\\|[+:<=>]\\)?\\)") ; (regexp-opt '(":" "::" ":::" ":=" ":<" ":=" ":>" ":+"))
|
||||
(?\; . ";;") ; (regexp-opt '(";;"))
|
||||
(?0 . "0\\(?:\\(x[a-fA-F0-9]\\).?\\)") ; Tries to match the x in 0xDEADBEEF
|
||||
;; (?x . "x") ; Also tries to match the x in 0xDEADBEEF
|
||||
;; (regexp-opt '("<!--" "<$" "<$>" "<*" "<*>" "<**>" "<+" "<+>" "<-" "<--" "<---" "<->" "<-->" "<--->" "</" "</>" "<<" "<<-" "<<<" "<<=" "<=" "<=<" "<==" "<=>" "<===>" "<>" "<|" "<|>" "<~" "<~~" "<." "<.>" "<..>"))
|
||||
(?< . "\\(?:<\\(?:!--\\|\\$>\\|\\*\\(?:\\*?>\\)\\|\\+>\\|-\\(?:-\\(?:->\\|[>-]\\)\\|[>-]\\)\\|\\.\\(?:\\.?>\\)\\|/>\\|<[<=-]\\|=\\(?:==>\\|[<=>]\\)\\||>\\|~~\\|[$*+./<=>|~-]\\)\\)")
|
||||
(?= . "\\(?:=\\(?:/=\\|:=\\|<<\\|=[=>]\\|>>\\|[=>]\\)\\)") ; (regexp-opt '("=/=" "=:=" "=<<" "==" "===" "==>" "=>" "=>>"))
|
||||
(?> . "\\(?:>\\(?:->\\|=>\\|>[=>-]\\|[:=>-]\\)\\)") ; (regexp-opt '(">-" ">->" ">:" ">=" ">=>" ">>" ">>-" ">>=" ">>>"))
|
||||
(?? . "\\(?:\\?[.:=?]\\)") ; (regexp-opt '("??" "?." "?:" "?="))
|
||||
(?\[ . "\\(?:\\[\\(?:|]\\|[]|]\\)\\)") ; (regexp-opt '("[]" "[|]" "[|"))
|
||||
(?\\ . "\\(?:\\\\\\\\[\\n]?\\)") ; (regexp-opt '("\\\\" "\\\\\\" "\\\\n"))
|
||||
(?^ . "\\(?:\\^==?\\)") ; (regexp-opt '("^=" "^=="))
|
||||
(?w . "\\(?:wwww?\\)") ; (regexp-opt '("www" "wwww"))
|
||||
(?{ . "\\(?:{\\(?:|\\(?:|}\\|[|}]\\)\\|[|-]\\)\\)") ; (regexp-opt '("{-" "{|" "{||" "{|}" "{||}"))
|
||||
(?| . "\\(?:|\\(?:->\\|=>\\||=\\|[]=>|}-]\\)\\)") ; (regexp-opt '("|=" "|>" "||" "||=" "|->" "|=>" "|]" "|}" "|-"))
|
||||
(?_ . "\\(?:_\\(?:|?_\\)\\)") ; (regexp-opt '("_|_" "__"))
|
||||
(?\( . "\\(?:(\\*\\)") ; (regexp-opt '("(*"))
|
||||
(?~ . "\\(?:~\\(?:~>\\|[=>@~-]\\)\\)")) ; (regexp-opt '("~-" "~=" "~>" "~@" "~~" "~~>"))
|
||||
"An alist of all ligatures used by `+prog-ligatures-modes'.
|
||||
|
||||
The car is the character ASCII number, cdr is a regex which will call
|
||||
`font-shape-gstring' when matched.
|
||||
|
||||
Because of the underlying code in :ui pretty-code module, the regex should match
|
||||
a string starting with the character contained in car.
|
||||
|
||||
This variable is used only if you built Emacs with Harfbuzz on a version >= 28")
|
||||
|
||||
(defvar +prog-ligatures-modes '(not org-mode)
|
||||
"List of major modes in which ligatures should be enabled.
|
||||
|
||||
If t, enable it everywhere. Fundamental mode, and modes derived from special-mode,
|
||||
comint-mode, eshell-mode and term-mode are *still* excluded.
|
||||
|
||||
If the first element is 'not, enable it in any mode besides what is listed.
|
||||
|
||||
If nil, fallback to the prettify-symbols based replacement (add +font features to pretty-code).")
|
||||
|
||||
(defun +pretty-code--correct-symbol-bounds (ligature-alist)
|
||||
"Prepend non-breaking spaces to a ligature.
|
||||
|
||||
This way `compose-region' (called by `prettify-symbols-mode') will use the
|
||||
correct width of the symbols instead of the width measured by `char-width'."
|
||||
(let ((len (length (car ligature-alist)))
|
||||
(acc (list (cdr ligature-alist))))
|
||||
(while (> len 1)
|
||||
(setq acc (cons #X00a0 (cons '(Br . Bl) acc))
|
||||
len (1- len)))
|
||||
(cons (car ligature-alist) acc)))
|
||||
|
||||
(defun +pretty-code-init-pretty-symbols-h ()
|
||||
"Enable `prettify-symbols-mode'.
|
||||
|
||||
If in fundamental-mode, or a mode derived from special, comint, eshell or term
|
||||
modes, this function does nothing.
|
||||
|
||||
Otherwise it builds `prettify-code-symbols-alist' according to
|
||||
`+pretty-code-symbols-alist' for the current major-mode."
|
||||
(unless (or (eq major-mode 'fundamental-mode)
|
||||
(eq (get major-mode 'mode-class) 'special)
|
||||
(derived-mode-p 'comint-mode 'eshell-mode 'term-mode))
|
||||
(when (or (eq +pretty-code-enabled-modes t)
|
||||
(if (eq (car +pretty-code-enabled-modes) 'not)
|
||||
(not (memq major-mode (cdr +pretty-code-enabled-modes)))
|
||||
(memq major-mode +pretty-code-enabled-modes)))
|
||||
(setq prettify-symbols-alist
|
||||
(append (cdr (assq major-mode +pretty-code-symbols-alist))
|
||||
(default-value 'prettify-symbols-alist)))
|
||||
(when prettify-symbols-mode
|
||||
(prettify-symbols-mode -1))
|
||||
(prettify-symbols-mode +1))))
|
||||
|
||||
(defun +pretty-code-init-ligatures-h ()
|
||||
"Enable ligatures.
|
||||
|
||||
If in fundamental-mode, or a mode derived from special, comint, eshell or term
|
||||
modes, this function does nothing.
|
||||
|
||||
Otherwise it sets the buffer-local composition table to a composition table enhanced with
|
||||
`+prog-ligatures-alist' ligatures regexes."
|
||||
(unless (or (eq major-mode 'fundamental-mode)
|
||||
(eq (get major-mode 'mode-class) 'special)
|
||||
(derived-mode-p 'comint-mode 'eshell-mode 'term-mode))
|
||||
(when (or (eq +prog-ligatures-modes t)
|
||||
(if (eq (car +prog-ligatures-modes) 'not)
|
||||
(not (memq major-mode (cdr +prog-ligatures-modes)))
|
||||
(memq major-mode +prog-ligatures-modes)))
|
||||
(setq-local composition-function-table composition-ligature-table))))
|
||||
|
||||
|
||||
;;
|
||||
;;; Bootstrap
|
||||
|
||||
(add-hook 'after-change-major-mode-hook #'+pretty-code-init-pretty-symbols-h)
|
||||
|
||||
;;;###package prettify-symbols
|
||||
;; When you get to the right edge, it goes back to how it normally prints
|
||||
(setq prettify-symbols-unprettify-at-point 'right-edge)
|
||||
|
||||
(cond
|
||||
;; The emacs-mac build of Emacs appear to have built-in support for ligatures,
|
||||
;; using the same composition-function-table method
|
||||
;; https://bitbucket.org/mituharu/emacs-mac/src/26c8fd9920db9d34ae8f78bceaec714230824dac/lisp/term/mac-win.el?at=master#lines-345:805
|
||||
;; so use that instead if this module is enabled.
|
||||
((and IS-MAC (fboundp 'mac-auto-operator-composition-mode))
|
||||
(mac-auto-operator-composition-mode))
|
||||
|
||||
;; Harfbuzz builds do not need font-specific ligature support
|
||||
;; if they are above emacs-27
|
||||
((and EMACS28+
|
||||
(string-match-p "HARFBUZZ" system-configuration-features)
|
||||
+prog-ligatures-modes
|
||||
(require 'composite nil t))
|
||||
(defvar composition-ligature-table (make-char-table nil))
|
||||
|
||||
(dolist (char-regexp +prog-ligatures-alist)
|
||||
(set-char-table-range composition-ligature-table (car char-regexp)
|
||||
`([,(cdr char-regexp) 0 font-shape-gstring])))
|
||||
(unless doom-reloading-p
|
||||
(set-char-table-parent composition-ligature-table composition-function-table))
|
||||
|
||||
(add-hook 'after-change-major-mode-hook #'+pretty-code-init-ligatures-h))
|
||||
|
||||
;; Font-specific ligature support
|
||||
((featurep! +fira)
|
||||
(load! "+fira"))
|
||||
((featurep! +iosevka)
|
||||
(load! "+iosevka"))
|
||||
((featurep! +hasklig)
|
||||
(load! "+hasklig"))
|
||||
((featurep! +pragmata-pro)
|
||||
(load! "+pragmata-pro")))
|
||||
@@ -1,4 +1,4 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/tabs/packages.el
|
||||
|
||||
(package! centaur-tabs :pin "9114ef423e820eee3f9c6cb29e112fc22aee84dd")
|
||||
(package! centaur-tabs :pin "7e0332b138f836b9d0b6d2134310f53369598cfd")
|
||||
|
||||
@@ -26,9 +26,16 @@ This must be set before `treemacs' has loaded.")
|
||||
treemacs-persist-file (concat doom-cache-dir "treemacs-persist")
|
||||
treemacs-last-error-persist-file (concat doom-cache-dir "treemacs-last-error-persist"))
|
||||
:config
|
||||
;; Allow ace-window to target treemacs windows
|
||||
;; Allow ace-window to target treemacs windows elsewhere
|
||||
(after! ace-window
|
||||
(delq! 'treemacs-mode aw-ignored-buffers))
|
||||
;; ...but not from treemacs-visit-node-ace-* commands.
|
||||
(defadvice! +treemacs--ace-window-ignore-treemacs-buffer-a (orig-fn &rest args)
|
||||
:around '(treemacs-visit-node-ace
|
||||
treemacs-visit-node-ace-horizontal-split
|
||||
treemacs-visit-node-ace-vertical-split)
|
||||
(let ((aw-ignored-buffers (cons 'treemacs-mode aw-ignored-buffers)))
|
||||
(apply orig-fn args)))
|
||||
|
||||
;; Don't follow the cursor
|
||||
(treemacs-follow-mode -1)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/treemacs/packages.el
|
||||
|
||||
(package! treemacs :pin "644e9402f74dc6100a60fc2b54a2f94ba9bc52e0")
|
||||
(package! treemacs :pin "027e03b6fac5c0a870440d27c35d53bbe0215d81")
|
||||
;; These packages have no :pin because they're in the same repo
|
||||
(when (featurep! :editor evil +everywhere)
|
||||
(package! treemacs-evil))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/unicode/packages.el
|
||||
|
||||
(package! unicode-fonts :pin "7b88ae84e589f6c8b9386b2fb5a02ff4ccb91169")
|
||||
(package! unicode-fonts :pin "e3942fe40b418bfb2dc4e73633e09195437fef01")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
(if (featurep! +switch-window)
|
||||
(package! switch-window :pin "8710f6304d843365fb59b6efe7e1f729d14e557c")
|
||||
(package! ace-window :pin "7003c88cd9cad58dc35c7cd13ebc61c355fb5be7"))
|
||||
(package! ace-window :pin "c7cb315c14e36fded5ac4096e158497ae974bec9"))
|
||||
|
||||
(when (featurep! +numbers)
|
||||
(package! winum :pin "c5455e866e8a5f7eab6a7263e2057aff5f1118b9"))
|
||||
|
||||
@@ -163,6 +163,7 @@ stored in `persp-save-dir'.")
|
||||
("O" counsel-projectile-switch-project-action "jump to a project buffer or file")
|
||||
("f" counsel-projectile-switch-project-action-find-file "jump to a project file")
|
||||
("d" counsel-projectile-switch-project-action-find-dir "jump to a project directory")
|
||||
("D" counsel-projectile-switch-project-action-dired "open project in dired")
|
||||
("b" counsel-projectile-switch-project-action-switch-to-buffer "jump to a project buffer")
|
||||
("m" counsel-projectile-switch-project-action-find-file-manually "find file manually from project root")
|
||||
("w" counsel-projectile-switch-project-action-save-all-buffers "save all project buffers")
|
||||
@@ -195,10 +196,15 @@ stored in `persp-save-dir'.")
|
||||
(defun +workspaces-delete-all-posframes-h (&rest _)
|
||||
(posframe-delete-all))))
|
||||
|
||||
;; Fix #1525: Ignore dead buffers in PERSP's buffer list
|
||||
(defun +workspaces-dead-buffer-p (buf)
|
||||
(not (buffer-live-p buf)))
|
||||
(add-hook 'persp-filter-save-buffers-functions #'+workspaces-dead-buffer-p)
|
||||
|
||||
(add-hook! 'persp-filter-save-buffers-functions
|
||||
(defun +workspaces-dead-buffer-p (buf)
|
||||
;; Fix #1525: Ignore dead buffers in PERSP's buffer list
|
||||
(not (buffer-live-p buf)))
|
||||
(defun +workspaces-remote-buffer-p (buf)
|
||||
;; And don't save TRAMP buffers; they're super slow to restore
|
||||
(let ((dir (buffer-local-value 'default-directory buf)))
|
||||
(ignore-errors (file-remote-p dir)))))
|
||||
|
||||
;; Otherwise, buffers opened via bookmarks aren't treated as "real" and are
|
||||
;; excluded from the buffer list.
|
||||
|
||||
Reference in New Issue
Block a user