mirror of
https://github.com/Foltik/dotfiles
synced 2024-11-23 20:20:53 -05:00
Add pretty-font-mode for ligatures
This commit is contained in:
parent
541b24e970
commit
f8cae643cf
@ -1014,9 +1014,7 @@ from blanket trimming entire files.
|
||||
(use-package pretty-mode
|
||||
:hook (prog-mode . pretty-mode)
|
||||
:config
|
||||
(pretty-deactivate-groups '(:arithmetic
|
||||
:sub-and-superscripts))
|
||||
(pretty-activate-groups '(:equality
|
||||
(pretty-deactivate-groups '(:equality
|
||||
:ordering
|
||||
:ordering-double
|
||||
:ordering-triple
|
||||
@ -1024,16 +1022,23 @@ from blanket trimming entire files.
|
||||
:arrows-twoheaded
|
||||
:punctuation
|
||||
:logic
|
||||
:sets)))
|
||||
:sets))
|
||||
|
||||
(pretty-activate-groups '(:sub-and-superscripts
|
||||
:greek
|
||||
:arithmetic-nary)))
|
||||
#+END_SRC
|
||||
|
||||
*** Prettify-Symbols-Mode
|
||||
Allows custom unicode replacement of symbols. Fill in the gaps where
|
||||
pretty-mode left off.
|
||||
pretty-mode left off. See list of unicode symbols that can be used [[https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode][here]].
|
||||
**** Python
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun jf-prettify-python ()
|
||||
(dolist (pair '(;; Syntax
|
||||
(dolist (pair
|
||||
;; Syntax
|
||||
'(("def" . #x2131)
|
||||
("not" . #x2757)
|
||||
("in" . #x2208)
|
||||
("not in" . #x2209)
|
||||
("return" . #x27fc)
|
||||
@ -1044,12 +1049,35 @@ pretty-mode left off.
|
||||
("float" . #x211d)
|
||||
("str" . #x1d54a)
|
||||
("True" . #x1d54b)
|
||||
("False" . #x1d53d)))
|
||||
("False" . #x1d53d)
|
||||
;; Mypy
|
||||
("Dict" . #x1d507)
|
||||
("List" . #x2112)
|
||||
("Tuple" . #x2a02)
|
||||
("Set" . #x2126)
|
||||
("Iterable" . #x1d50a)
|
||||
("Any" . #x2754)
|
||||
("Union" . #x22c3)))
|
||||
(push pair prettify-symbols-alist)))
|
||||
|
||||
(add-hook 'python-mode-hook #'prettify-symbols-mode)
|
||||
(add-hook 'python-mode-hook #'jf-prettify-python)
|
||||
#+END_SRC
|
||||
*** Pretty fonts
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package pretty-fonts
|
||||
:load-path jf-load-path
|
||||
:config
|
||||
(pretty-fonts-add-hook 'prog-mode-hook pretty-fonts-fira-code-alist)
|
||||
(pretty-fonts-add-hook 'org-mode-hook pretty-fonts-fira-code-alist)
|
||||
(pretty-fonts-set-fontsets-for-fira-code))
|
||||
#+END_SRC
|
||||
*** Rainbow Delimiters
|
||||
Make it easier to spot sexp depth by pairing delimiter colors.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package rainbow-delimiters
|
||||
:hook (prog-mode . rainbow-delimiters-mode))
|
||||
#+END_SRC
|
||||
** Checkers
|
||||
*** Flycheck
|
||||
Flycheck highlights syntax errors in a few languages.
|
||||
|
Loading…
Reference in New Issue
Block a user