Change font

This commit is contained in:
Tobias Ostner 2024-10-04 10:41:29 +02:00
parent 6539218c88
commit a77822c5cb
2 changed files with 45 additions and 35 deletions

View file

@ -102,9 +102,9 @@
(corfu-popupinfo-mode) (corfu-popupinfo-mode)
:config :config
(add-hook 'eshell-mode-hook (add-hook 'eshell-mode-hook
(lambda () (lambda ()
(setq-local corfu-auto nil) (setq-local corfu-auto nil)
(corfu-mode)))) (corfu-mode))))
(use-package diff-hl (use-package diff-hl
:hook ((magit-pre-refresh . diff-hl-magit-pre-refresh) :hook ((magit-pre-refresh . diff-hl-magit-pre-refresh)
@ -269,7 +269,7 @@
:default-weight semilight :default-weight semilight
:default-height 250) :default-height 250)
(t (t
:default-family "Cascadia Code" :default-family "Fira Code"
:default-weight regular :default-weight regular
:default-height 130 :default-height 130
:fixed-pitch-height 1.0 :fixed-pitch-height 1.0
@ -324,26 +324,36 @@
:after fontaine :after fontaine
:config :config
(defun to/set-ligatures-for-font (font-family) (defun to/set-ligatures-for-font (font-family)
(let ((ligatures (let ((ligatures
(cond ((string= font-family "Iosevka Comfy") (cond ((string= font-family "Iosevka Comfy")
'("<---" "<--" "<<-" "<-" "->" "-->" "--->" "<->" "<-->" "<--->" '("<---" "<--" "<<-" "<-" "->" "-->" "--->" "<->" "<-->" "<--->"
"<---->" "<!--" "<==" "<===" "<=" "=>" "=>>" "==>" "===>" ">=" "<---->" "<!--" "<==" "<===" "<=" "=>" "=>>" "==>" "===>" ">="
"<=>" "<==>" "<===>" "<====>" "<!---" "<~~" "<~" "~>" "~~>" "::" "<=>" "<==>" "<===>" "<====>" "<!---" "<~~" "<~" "~>" "~~>" "::"
":::" "==" "!=" "===" "!==" ":=" ":-" ":+" "<*" "<*>" "*>" "<|" ":::" "==" "!=" "===" "!==" ":=" ":-" ":+" "<*" "<*>" "*>" "<|"
"<|>" "|>" "+:" "-:" "=:" "<******>" "++" "+++")) "<|>" "|>" "+:" "-:" "=:" "<******>" "++" "+++"))
((string= font-family "Cascadia Code") ((string= font-family "Cascadia Code")
'("www" "--" "---" "-~" "(*" "{|" "}#" "[|" "]#" ".-" ".." "..." "..=" '("www" "--" "---" "-~" "(*" "{|" "}#" "[|" "]#" ".-" ".." "..." "..="
"..<" ".?" ".=" "::" ":::" "::=" ":=" "://" ";;" "!." "!:" "!!" "!!." "..<" ".?" ".=" "::" ":::" "::=" ":=" "://" ";;" "!." "!:" "!!" "!!."
"!=" "!==" "?." "?:" "??" "??=" "?=" "*)" "**" "***" "*>" "*/" "#(" "!=" "!==" "?." "?:" "??" "??=" "?=" "*)" "**" "***" "*>" "*/" "#("
"#{" "#[" "#:" "#!" "#?" "#=" "#_" "#_(" "/*" "/>" "//" "///" "/\\" "#{" "#[" "#:" "#!" "#?" "#=" "#_" "#_(" "/*" "/>" "//" "///" "/\\"
"\\\\" "&&" "|}" "|]" "||" "|||" "|||>" "|>" "$>" "++" "+++" "+>" "==" "\\\\" "&&" "|}" "|]" "||" "|||" "|||>" "|>" "$>" "++" "+++" "+>" "=="
"===" "=>>" "=<<" ">=" ">>" ">>=" ">>>" "<!--" "<*" "<*>" "<|" "<||" "===" "=>>" "=<<" ">=" ">>" ">>=" ">>>" "<!--" "<*" "<*>" "<|" "<||"
"<|||" "<|>" "<$" "<$>" "<+" "<+>" "<=" "<>" "<<" "<<=" "<<<" "<~" "<|||" "<|>" "<$" "<$>" "<+" "<+>" "<=" "<>" "<<" "<<=" "<<<" "<~"
"<~>" "<~~" "</" "</>" "~-" "~@" "~=" "~>" "~~" "~~>" "^=" "%%" "<~>" "<~~" "</" "</>" "~-" "~@" "~=" "~>" "~~" "~~>" "^=" "%%"
"->" "-->" "--->" "<-" "<--" "<---")) "->" "-->" "--->" "<-" "<--" "<---"))
(t ((string= font-family "Fira Code")
'())))) '("www" "**" "***" "**/" "*>" "*/" "\\\\" "\\\\\\" "{-" "[]" "::"
(ligature-set-ligatures 'prog-mode ligatures))) ":::" ":=" "!!" "!=" "!==" "-}" "--" "---" "-->" "->" "->>" "-<"
"-<<" "-~" "#{" "#[" "##" "###" "####" "#(" "#?" "#_" "#_(" ".-"
".=" ".." "..<" "..." "?=" "??" ";;" "/*" "/**" "/=" "/==" "/>"
"//" "///" "&&" "||" "||=" "|=" "|>" "^=" "$>" "++" "+++" "+>"
"=:=" "==" "===" "==>" "=>" "=>>" "<=" "=<<" "=/=" ">-" ">=" ">=>"
">>" ">>-" ">>=" ">>>" "<*" "<*>" "<|" "<|>" "<$" "<$>" "<!--"
"<-" "<--" "<->" "<+" "<+>" "<=" "<==" "<=>" "<=<" "<>" "<<" "<<-"
"<<=" "<<<" "<~" "<~~" "</" "</>" "~@" "~-" "~=" "~>" "~~" "~~>"
"%%" "x" ":" "+" "+" "*"))
(t '()))))
(ligature-set-ligatures 'prog-mode ligatures)))
(to/set-ligatures-for-font (face-attribute 'default :family)) (to/set-ligatures-for-font (face-attribute 'default :family))
(global-ligature-mode t)) (global-ligature-mode t))
@ -352,10 +362,10 @@
:hook :hook
((lsp-mode . lsp-diagnostics-mode) ((lsp-mode . lsp-diagnostics-mode)
((js-mode ((js-mode
js-ts-mode js-ts-mode
js-jsx-mode js-jsx-mode
typescript-ts-mode typescript-ts-mode
tsx-ts-mode) . lsp-deferred) tsx-ts-mode) . lsp-deferred)
((python-mode python-ts-mode) . lsp) ((python-mode python-ts-mode) . lsp)
(nix-mode . lsp) (nix-mode . lsp)
((swift-mode swift-ts-mode) .lsp)) ((swift-mode swift-ts-mode) .lsp))
@ -404,8 +414,8 @@
(load-theme 'modus-vivendi-tinted :no-confirm)) (load-theme 'modus-vivendi-tinted :no-confirm))
(use-package minions (use-package minions
:config :config
(minions-mode)) (minions-mode))
(use-package multiple-cursors (use-package multiple-cursors
:bind :bind
@ -459,10 +469,10 @@
:after org :after org
:defer 3 :defer 3
:config :config
(org-babel-do-load-languages (org-babel-do-load-languages
'org-babel-load-languages 'org-babel-load-languages
(append org-babel-load-languages (append org-babel-load-languages
'((swift . t))))) '((swift . t)))))
(use-package olivetti (use-package olivetti
:hook (org-mode markdown-mode) :hook (org-mode markdown-mode)

View file

@ -1,4 +1,4 @@
font_family Cascadia Code font_family Fira Code
font_size 13.0 font_size 13.0
hide_window_decorations yes hide_window_decorations yes
tab_bar_style slant tab_bar_style slant