Move :ui pretty-code to :ui ligatures

Includes a major refactor of the module.
This commit is contained in:
Henrik Lissner 2020-08-12 18:52:14 -04:00
parent ed264dcdb2
commit 7081d833f6
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
32 changed files with 899 additions and 920 deletions

View file

@ -51,7 +51,7 @@ This is ignored by ccls.")
(set-rotate-patterns! 'c++-mode
:symbols '(("public" "protected" "private")
("class" "struct")))
(set-pretty-symbols! '(c-mode c++-mode)
(set-ligatures! '(c-mode c++-mode)
;; Functional
;; :def "void "
;; Types

View file

@ -7,7 +7,7 @@
(when (and (featurep! +flutter) IS-LINUX)
(when-let (path (doom-glob "/opt/flutter/bin/cache/dart-sdk"))
(setq flutter-sdk-path path)))
(set-pretty-symbols! '(dart-mode)
(set-ligatures! '(dart-mode)
;; Functional
:def "Function"
:lambda "() =>"

View file

@ -14,7 +14,7 @@
;; a subset of them (defined below).
(provide 'smartparens-elixir)
:config
(set-pretty-symbols! 'elixir-mode
(set-ligatures! 'elixir-mode
;; Functional
:def "def"
:lambda "fn"

View file

@ -6,7 +6,7 @@
(set-company-backend! 'elm-mode 'company-elm))
(set-repl-handler! 'elm-mode #'run-elm-interactive)
(set-pretty-symbols! 'elm-mode
(set-ligatures! 'elm-mode
:null "null"
:true "true" :false "false"
:int "Int" :str "String"

View file

@ -33,7 +33,7 @@ employed so that flycheck still does *some* helpful linting.")
:definition #'+emacs-lisp-lookup-definition
:documentation #'+emacs-lisp-lookup-documentation)
(set-docsets! '(emacs-lisp-mode lisp-interaction-mode) "Emacs Lisp")
(set-pretty-symbols! 'emacs-lisp-mode :lambda "lambda")
(set-ligatures! 'emacs-lisp-mode :lambda "lambda")
(set-rotate-patterns! 'emacs-lisp-mode
:symbols '(("t" "nil")
("let" "let*")

View file

@ -7,7 +7,7 @@
"MarionetteJS" "MomentJS" "NodeJS" "PrototypeJS" "React" "RequireJS"
"SailsJS" "UnderscoreJS" "VueJS" "ZeptoJS")
(set-pretty-symbols! '(js2-mode rjsx-mode web-mode)
(set-ligatures! '(js2-mode rjsx-mode web-mode)
;; Functional
:def "function"
:lambda "() =>"
@ -95,7 +95,7 @@
:config
(set-electric! 'typescript-mode
:chars '(?\} ?\)) :words '("||" "&&"))
(set-pretty-symbols! 'typescript-mode
(set-ligatures! 'typescript-mode
;; Functional
:def "function"
:lambda "() =>"

View file

@ -87,7 +87,7 @@ tools.
| =utop-eval-region= | =SPC c e= | evaluate selected region in =utop= |
** Hacks
+ =set-pretty-symbols!= is called with the full tuareg prettify symbol list, this
+ =set-ligatures!= is called with the full tuareg prettify symbol list, this
can cause columns to change as certain keywords are shortened (e.g. =fun=
becomes \lambda.
+ =tuareg-opam-update-env= is called the first time =tuareg= is loaded

View file

@ -10,7 +10,7 @@
(after! tuareg
;; tuareg-mode has the prettify symbols itself
(set-pretty-symbols! 'tuareg-mode :alist
(set-ligatures! 'tuareg-mode :alist
(append tuareg-prettify-symbols-basic-alist
tuareg-prettify-symbols-extra-alist))
;; harmless if `prettify-symbols-mode' isn't active

View file

@ -183,7 +183,7 @@ This forces it to read the background before rendering."
;; Automatic indent detection in org files is meaningless
(add-to-list 'doom-detect-indentation-excluded-modes 'org-mode)
(set-pretty-symbols! 'org-mode
(set-ligatures! 'org-mode
:name "#+NAME:"
:name "#+name:"
:src_block "#+BEGIN_SRC"

View file

@ -21,7 +21,7 @@
(set-repl-handler! 'php-mode #'php-boris)
(set-lookup-handlers! 'php-mode :documentation #'php-search-documentation)
(set-formatter! 'php-mode #'php-cs-fixer-fix)
(set-pretty-symbols! 'php-mode
(set-ligatures! 'php-mode
;; Functional
:lambda "function()"
:def "function"

View file

@ -31,7 +31,7 @@ called.")
(set-repl-handler! 'python-mode #'+python/open-repl :persist t)
(set-docsets! 'python-mode "Python 3" "NumPy" "SciPy")
(set-pretty-symbols! 'python-mode
(set-ligatures! 'python-mode
;; Functional
:def "def"
:lambda "lambda"

View file

@ -16,7 +16,7 @@
:definition #'+racket-lookup-definition
:documentation #'+racket-lookup-documentation)
(set-docsets! 'racket-mode "Racket")
(set-pretty-symbols! 'racket-mode
(set-ligatures! 'racket-mode
:lambda "lambda"
:map "map"
:dot ".")

View file

@ -69,7 +69,7 @@
(use-package! racer
:unless (featurep! +lsp)
:hook (rustic-mode . racer-mode)
:hook (rustic-mode-local-vars . racer-mode)
:init
;; HACK Fix #2132: `racer' depends on `rust-mode', which tries to modify
;; `auto-mode-alist'. We make extra sure that doesn't stick, especially

View file

@ -18,7 +18,7 @@
(when (featurep! +lsp)
(add-hook 'scala-mode-local-vars-hook #'lsp!))
(set-pretty-symbols! 'scala-mode
(set-ligatures! 'scala-mode
;; Functional
:def "def"
:composition "compose"

View file

@ -16,7 +16,7 @@
:config
(set-electric! 'sh-mode :words '("else" "elif" "fi" "done" "then" "do" "esac" ";;"))
(set-repl-handler! 'sh-mode #'+sh/open-repl)
(set-pretty-symbols! 'sh-mode
(set-ligatures! 'sh-mode
;; Functional
:def "function"
;; Types