All checks were successful
build / build (push) Successful in 2m40s
38 lines
1.4 KiB
EmacsLisp
Executable File
38 lines
1.4 KiB
EmacsLisp
Executable File
;;; -*- lexical-binding: t; -*-
|
||
|
||
(require 'syd/base)
|
||
|
||
(use-package ligature
|
||
:config
|
||
(ligature-set-ligatures 'prog-mode
|
||
'("|||>" "<|||" "<==>" "<!--" "####" "~~>" "***" "||="
|
||
"||>" ":::" "::=" "=:=" "===" "==>" "=!=" "=>>"
|
||
"=<<" "=/=" "!==" "!!." ">=>" ">>=" ">>>" ">>-"
|
||
">->" "->>" "-->" "---" "-<<" "<~~" "<~>" "<*>"
|
||
"<||" "<|>" "<$>" "<==" "<=>" "<=<" "<->" "<--"
|
||
"<-<" "<<=" "<<-" "<<<" "<+>" "</>" "###" "#_("
|
||
"..<" "..." "+++" "/==" "///" "_|_" "www" "&&" "^="
|
||
"~~" "~@" "~=" "~>" "~-" "**" "*>" "*/" "||" "|}"
|
||
"|]" "|=" "|>" "|-" "{|" "[|" "]#" "::" ":=" ":>"
|
||
":<" "$>" "==" "=>" "!=" "!!" ">:" ">=" ">>" ">-"
|
||
"-~" "-|" "->" "--" "-<" "<~" "<*" "<|" "<:" "<$"
|
||
"<=" "<>" "<-" "<<" "<+" "</" "#{" "#[" "#:" "#="
|
||
"#!" "##" "#(" "#?" "#_" "%%" ".=" ".-" ".." ".?"
|
||
"+>" "++" "?:" "?=" "?." "??" ";;" ";;;"
|
||
"/*" "/=" "/>" "//" "__" "~~" "(*" "*)"
|
||
"\\\\" "://"))
|
||
;; Sitelen pona glyphs.
|
||
(rx-let ((ideograph (any (#xF1900 . #xF198C)))
|
||
(tok-punct (any "" ""))
|
||
(arrow (any "←-↙"))
|
||
(zwj ""))
|
||
(ligature-set-ligatures
|
||
'fundamental-mode
|
||
`(("" ,(rx (* (or ideograph tok-punct))))
|
||
("" ,(rx "" (* (or ideograph tok-punct)) ""))
|
||
("" ,(rx zwj arrow))
|
||
("" ,(rx zwj ideograph)))))
|
||
(global-ligature-mode 1))
|
||
|
||
(provide 'syd/ligature)
|