config.el 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
  2. (setq user-full-name "Colin Powell"
  3. user-mail-address "colin@unbl.ink")
  4. (nyan-mode)
  5. (setq doom-theme 'doom-one
  6. doom-font (font-spec :family "Iosevka" :size 14 :weight 'regular)
  7. doom-big-font (font-spec :family "Iosevka" :size 18 :weight 'regular)
  8. doom-variable-pitch-font (font-spec :family "Overpass" :size 12))
  9. (setq display-line-numbers-type t)
  10. ;; change `org-directory'. It must be set before org loads!
  11. (setq org-directory "~/var/org/")
  12. (load! "+agenda-fix")
  13. (defun vulpea-agenda-files-update (&rest _)
  14. (setq org-agenda-files vulpea-project-files))
  15. (setq org-roam-directory "~/var/org/"
  16. org-roam-dailies-directory "dailies")
  17. (advice-add 'org-agenda :before #'vulpea-agenda-files-update)
  18. (advice-add 'org-todo-list :before #'vulpea-agenda-files-update)
  19. (map! ;; Easier window movement
  20. :n "C-h" 'evil-window-left
  21. :n "C-j" 'evil-window-down
  22. :n "C-k" 'evil-window-up
  23. :n "C-l" 'evil-window-right
  24. (:map evil-treemacs-state-map
  25. "C-h" 'evil-window-left
  26. "C-l" 'evil-window-right))
  27. (defun unfill-paragraph ()
  28. "Takes a multi-line paragraph and makes it into a single line of text."
  29. (interactive)
  30. (let ((fill-column (point-max)))
  31. (fill-paragraph nil)))
  32. (define-key global-map "\M-z" 'unfill-paragraph)
  33. (defun file-notify-rm-all-watches ()
  34. "Remove all existing file notification watches from Emacs."
  35. (interactive)
  36. (maphash
  37. (lambda (key _value)
  38. (file-notify-rm-watch key))
  39. file-notify-descriptors))
  40. (setq frame-title-format
  41. '(""
  42. (:eval
  43. (if (s-contains-p org-roam-directory (or buffer-file-name ""))
  44. (replace-regexp-in-string
  45. ".*/[0-9]*-?" "☰ "
  46. (subst-char-in-string ?_ ? buffer-file-name))
  47. "%b"))
  48. (:eval
  49. (let ((project-name (projectile-project-name)))
  50. (unless (string= "-" project-name)
  51. (format (if (buffer-modified-p) " ◉ %s" "  ●  %s") project-name))))))
  52. (setq mm-text-html-renderer 'w3m)
  53. (setq w3m-fill-column 88)
  54. (setq lsp-lens-enable 1
  55. lsp-ui-sideline-enable 1
  56. lsp-enable-links 1
  57. lsp-headerline-breadcrumb-enable 1
  58. lsp-modeline-code-actions-enable 1
  59. lsp-modeline-diagnostics-enable 1
  60. lsp-completion-show-detail 1
  61. lsp-file-watch-threshold nil)