From fdf51d168dad04c7e716725dd86c87df406dcea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 26 Apr 2021 10:18:24 +0200 Subject: [PATCH] added dictionary change and ligatures --- .config/doom/config.el | 47 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.config/doom/config.el b/.config/doom/config.el index cc10f8f..8e5f58a 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -52,5 +52,52 @@ ;; ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how ;; they are implemented. + +;; Set FiraCode as Font (setq doom-font (font-spec :family "FiraCode Nerd Font Mono" :size 13) ) + +;; Projectile Settings (setq projectile-project-root "~/Documents") + +;; Switch Flyspell Dictionary +(defun fd-switch-dictionary() +(interactive) +(let* ((dic ispell-current-dictionary) + (change (if (string= dic "deutsch") "english" "deutsch"))) + (ispell-change-dictionary change) + (message "Dictionary switched from %s to %s" dic change) + )) +(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]))))