diff --git a/.config/doom/config.el b/.config/doom/config.el index 8e5f58a..66a5fca 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -54,7 +54,7 @@ ;; they are implemented. ;; Set FiraCode as Font -(setq doom-font (font-spec :family "FiraCode Nerd Font Mono" :size 13) ) +(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 13) ) ;; Projectile Settings (setq projectile-project-root "~/Documents") @@ -69,35 +69,19 @@ )) (global-set-key (kbd "") 'fd-switch-dictionary) -;; Enable lifatures -(when (window-system) - (set-frame-font "FiraCode Nerd Font")) -(let ((alist '((33 . ".\\(?:\\(?:==\\|!!\\)\\|[!=]\\)") - (35 . ".\\(?:###\\|##\\|_(\\|[#(?[_{]\\)") - (36 . ".\\(?:>\\)") - (37 . ".\\(?:\\(?:%%\\)\\|%\\)") - (38 . ".\\(?:\\(?:&&\\)\\|&\\)") - (42 . ".\\(?:\\(?:\\*\\*/\\)\\|\\(?:\\*[*/]\\)\\|[*/>]\\)") - (43 . ".\\(?:\\(?:\\+\\+\\)\\|[+>]\\)") - (45 . ".\\(?:\\(?:-[>-]\\|<<\\|>>\\)\\|[<>}~-]\\)") - (46 . ".\\(?:\\(?:\\.[.<]\\)\\|[.=-]\\)") - (47 . ".\\(?:\\(?:\\*\\*\\|//\\|==\\)\\|[*/=>]\\)") - (48 . ".\\(?:x[a-zA-Z]\\)") - (58 . ".\\(?:::\\|[:=]\\)") - (59 . ".\\(?:;;\\|;\\)") - (60 . ".\\(?:\\(?:!--\\)\\|\\(?:~~\\|->\\|\\$>\\|\\*>\\|\\+>\\|--\\|<[<=-]\\|=[<=>]\\||>\\)\\|[*$+~/<=>|-]\\)") - (61 . ".\\(?:\\(?:/=\\|:=\\|<<\\|=[=>]\\|>>\\)\\|[<=>~]\\)") - (62 . ".\\(?:\\(?:=>\\|>[=>-]\\)\\|[=>-]\\)") - (63 . ".\\(?:\\(\\?\\?\\)\\|[:=?]\\)") - (91 . ".\\(?:]\\)") - (92 . ".\\(?:\\(?:\\\\\\\\\\)\\|\\\\\\)") - (94 . ".\\(?:=\\)") - (119 . ".\\(?:ww\\)") - (123 . ".\\(?:-\\)") - (124 . ".\\(?:\\(?:|[=|]\\)\\|[=>|]\\)") - (126 . ".\\(?:~>\\|~~\\|[>=@~-]\\)") - ) - )) - (dolist (char-regexp alist) - (set-char-table-range composition-function-table (car char-regexp) - `([,(cdr char-regexp) 0 font-shape-gstring])))) +;; Enable the www ligature in every possible major mode +(ligature-set-ligatures 't '("www")) + +;; Enable ligatures in programming modes +(ligature-set-ligatures 'prog-mode '("www" "**" "***" "**/" "*>" "*/" "\\\\" "\\\\\\" "{-" "::" + ":::" ":=" "!!" "!=" "!==" "-}" "----" "-->" "->" "->>" + "-<" "-<<" "-~" "#{" "#[" "##" "###" "####" "#(" "#?" "#_" + "#_(" ".-" ".=" ".." "..<" "..." "?=" "??" ";;" "/*" "/**" + "/=" "/==" "/>" "//" "///" "&&" "||" "||=" "|=" "|>" "^=" "$>" + "++" "+++" "+>" "=:=" "==" "===" "==>" "=>" "=>>" "<=" + "=<<" "=/=" ">-" ">=" ">=>" ">>" ">>-" ">>=" ">>>" "<*" + "<*>" "<|" "<|>" "<$" "<$>" "