Add ligature support (Emacs >28)
This commit is contained in:
parent
cb6faff0ee
commit
7fdc76d1c0
54
init.el
54
init.el
@ -418,6 +418,41 @@
|
|||||||
;; (Emacs 27+ on some systems may not have a monocolor fallback font set after multicolor emoji fonts.)
|
;; (Emacs 27+ on some systems may not have a monocolor fallback font set after multicolor emoji fonts.)
|
||||||
(set-fontset-font t 'symbol "Symbola" nil 'append)
|
(set-fontset-font t 'symbol "Symbola" nil 'append)
|
||||||
|
|
||||||
|
;; Download and configure ligature.el to enable font ligatures in prog-mode. (Emacs >28)
|
||||||
|
(when (>= emacs-major-version 28)
|
||||||
|
(unless (file-directory-p (concat user-emacs-directory "/ligature"))
|
||||||
|
(make-directory (concat user-emacs-directory "/ligature")))
|
||||||
|
(unless (file-exists-p (concat user-emacs-directory "/ligature/ligature.el"))
|
||||||
|
(url-copy-file "https://raw.githubusercontent.com/mickeynp/ligature.el/master/ligature.el" (concat user-emacs-directory "/ligature/ligature.el") t))
|
||||||
|
(use-package ligature
|
||||||
|
:load-path
|
||||||
|
"ligature"
|
||||||
|
:config
|
||||||
|
(ligature-set-ligatures 'prog-mode '("|||>" "<|||" "<==>" "<!--" "####" "~~>" "***" "||=" "||>"
|
||||||
|
":::" "::=" "=:=" "===" "==>" "=!=" "=>>" "=<<" "=/=" "!=="
|
||||||
|
"!!." ">=>" ">>=" ">>>" ">>-" ">->" "->>" "-->" "---" "-<<"
|
||||||
|
"<~~" "<~>" "<*>" "<||" "<|>" "<$>" "<==" "<=>" "<=<" "<->"
|
||||||
|
"<--" "<-<" "<<=" "<<-" "<<<" "<+>" "</>" "###" "#_(" "..<"
|
||||||
|
"..." "+++" "/==" "///" "_|_" "www" "&&" "^=" "~~" "~@" "~="
|
||||||
|
"~>" "~-" "**" "*>" "*/" "||" "|}" "|]" "|=" "|>" "|-" "{|"
|
||||||
|
"[|" "]#" "::" ":=" ":>" ":<" "$>" "==" "=>" "!=" "!!" ">:"
|
||||||
|
">=" ">>" ">-" "-~" "-|" "->" "-<" "<~" "<*" "<|" "<:" "<$"
|
||||||
|
"<=" "<>" "<-" "<<" "<+" "</" "#{" "#[" "#:" "#=" "#!" "##"
|
||||||
|
"#(" "#?" "#_" "%%" ".=" ".-" ".." ".?" "+>" "++" "?:" "?="
|
||||||
|
"?." "??" ";;" "/*" "/=" "/>" "//" "__" "~~" "(*" "*)" "://"
|
||||||
|
"=~" "!~" "\\\\" "#####" "--" "---"))
|
||||||
|
(ligature-set-ligatures 'prog-mode '(("-" (rx (| (+ (: (? "-") (? (| "<" ">" "<<" ">>" "|" "||"))))
|
||||||
|
(| "~" ))))
|
||||||
|
("=" (rx (| (+ (: (? "=") (? (| "<" ">" "<<" ">>" "|" "||" "/" "//" ":" "!"))))
|
||||||
|
(| "~" ))))
|
||||||
|
("#" (rx (| (+ "#")
|
||||||
|
(| "{" "[" ":" "=" "!" "(" "?" "_"))))
|
||||||
|
("/" (rx (| (+ "/")
|
||||||
|
(| "==" "*" "=" ">"))))
|
||||||
|
("0" (rx "x" (+ hex)))))
|
||||||
|
:hook
|
||||||
|
(prog-mode . ligature-mode)))
|
||||||
|
|
||||||
;;====================
|
;;====================
|
||||||
;; Theme
|
;; Theme
|
||||||
;;====================
|
;;====================
|
||||||
@ -629,6 +664,24 @@
|
|||||||
("M-." . lsp-ui-peek-find-definitions)
|
("M-." . lsp-ui-peek-find-definitions)
|
||||||
("M-?" . lsp-ui-peek-find-references)))
|
("M-?" . lsp-ui-peek-find-references)))
|
||||||
|
|
||||||
|
;;====================
|
||||||
|
;; SLIME (Lisp Interaction Framework)
|
||||||
|
;;====================
|
||||||
|
|
||||||
|
;; Load SLIME
|
||||||
|
(use-package slime
|
||||||
|
:config
|
||||||
|
(setq inferior-lisp-program (executable-find "sbcl"))
|
||||||
|
:commands
|
||||||
|
(slime))
|
||||||
|
|
||||||
|
;; Load SLIME-docker
|
||||||
|
(use-package slime-docker
|
||||||
|
:custom
|
||||||
|
(slime-docker-program "sbcl")
|
||||||
|
:commands
|
||||||
|
(slime-docker))
|
||||||
|
|
||||||
;;====================
|
;;====================
|
||||||
;; Package-Lint (Elisp Package Linter)
|
;; Package-Lint (Elisp Package Linter)
|
||||||
;;====================
|
;;====================
|
||||||
@ -936,6 +989,7 @@
|
|||||||
:demand
|
:demand
|
||||||
t
|
t
|
||||||
:custom
|
:custom
|
||||||
|
(fussy-filter-fn 'fussy-filter-fast)
|
||||||
(completion-styles '(fussy basic))
|
(completion-styles '(fussy basic))
|
||||||
(completion-category-defaults nil)
|
(completion-category-defaults nil)
|
||||||
(completion--category-overrides nil))
|
(completion--category-overrides nil))
|
||||||
|
Loading…
Reference in New Issue
Block a user