diff options
| author | Yousef Jan <yousefjan24000@gmail.com> | 2026-05-10 13:14:19 +0300 |
|---|---|---|
| committer | Yousef Jan <yousefjan24000@gmail.com> | 2026-05-10 13:14:19 +0300 |
| commit | 5836edd99f703ae44066fab774cd1858b06b12b6 (patch) | |
| tree | 43b866f3c4a7eb3d1601233615549ceb78d570d9 /doom/config.el | |
| parent | 9e91374284c0e7a6d4567c3cad8577af6dcc270f (diff) | |
Updates
Diffstat (limited to 'doom/config.el')
| -rw-r--r-- | doom/config.el | 52 |
1 files changed, 48 insertions, 4 deletions
diff --git a/doom/config.el b/doom/config.el index 54d71ac..85e8772 100644 --- a/doom/config.el +++ b/doom/config.el @@ -37,6 +37,35 @@ (custom-set-faces! '(default :background "#131313" :foreground "#FCFCFC")) +(defvar my/syntax-comment "#6a6a6a") +(defvar my/syntax-string "#b5bd68") +(defvar my/syntax-keyword "#afd7ff") +(defvar my/syntax-type "#ffd787") +(defvar my/syntax-function "#d7afaf") + +(defun my/setup-syntax-highlighting (&rest _) + "Apply a 5-color scheme to font-lock faces." + (custom-set-faces! + `(font-lock-comment-face :foreground ,my/syntax-comment :slant italic) + `(font-lock-comment-delimiter-face :foreground ,my/syntax-comment :slant italic) + `(font-lock-doc-face :foreground ,my/syntax-comment :slant italic) + `(font-lock-string-face :foreground ,my/syntax-string) + `(font-lock-doc-markup-face :foreground ,my/syntax-string) + `(font-lock-keyword-face :foreground ,my/syntax-keyword :weight bold) + `(font-lock-builtin-face :foreground ,my/syntax-keyword) + `(font-lock-preprocessor-face :foreground ,my/syntax-keyword) + `(font-lock-negation-char-face :foreground ,my/syntax-keyword) + `(font-lock-type-face :foreground ,my/syntax-type) + `(font-lock-constant-face :foreground ,my/syntax-type) + `(font-lock-function-name-face :foreground ,my/syntax-function) + `(font-lock-variable-name-face :foreground "#FCFCFC") + `(font-lock-warning-face :foreground ,my/syntax-function :weight bold) + `(font-lock-regexp-grouping-backslash :foreground ,my/syntax-function) + `(font-lock-regexp-grouping-construct :foreground ,my/syntax-function))) + +(my/setup-syntax-highlighting) +(add-hook 'doom-load-theme-hook #'my/setup-syntax-highlighting 40) + ;; This determines the style of line numbers in effect. If set to `nil', line ;; numbers are disabled. For relative line numbers, set this to `relative'. (setq display-line-numbers-type 'relative) @@ -46,15 +75,15 @@ (setq org-directory "~/org/") ;; Keep terminal and editor typography aligned and ensure Nerd Font glyphs render. -(setq doom-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 15) - doom-variable-pitch-font (font-spec :family "JetBrainsMono Nerd Font" :size 15) - doom-symbol-font (font-spec :family "JetBrainsMono Nerd Font Mono" :size 15)) +(setq doom-font (font-spec :family "FiraCode Nerd Font Mono" :size 15) + doom-variable-pitch-font (font-spec :family "FiraCode Nerd Font" :size 15) + doom-symbol-font (font-spec :family "FiraCode Nerd Font Mono" :size 15)) (defun my/setup-icon-font-fallback (&optional frame) "Ensure Nerd Font glyphs are available in FRAME." (with-selected-frame (or frame (selected-frame)) (when (display-graphic-p) - (set-fontset-font t 'unicode "JetBrainsMono Nerd Font Mono" nil 'append)))) + (set-fontset-font t 'unicode "FiraCode Nerd Font Mono" nil 'append)))) (add-hook 'after-make-frame-functions #'my/setup-icon-font-fallback) (my/setup-icon-font-fallback) @@ -245,3 +274,18 @@ (lambda () (unless (frame-focus-state) (save-some-buffers t)))) + +(defun my/dashboard-widget-loaded-centered () + (when doom-init-time + (let* ((msg (doom-display-benchmark-h 'return)) + (width (with-current-buffer (doom-fallback-buffer) + (window-width (get-buffer-window (current-buffer))))) + (pad (max 0 (/ (- width (length msg)) 2)))) + (insert "\n" + (make-string pad ?\s) + (propertize msg 'face '+dashboard-loaded) + "\n")))) + +(setq +dashboard-functions + '(+dashboard-widget-banner + my/dashboard-widget-loaded-centered)) |