config.el 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
  2. (setq user-full-name "Colin Powell"
  3. user-mail-address "colin@unbl.ink")
  4. (pixel-scroll-precision-mode t)
  5. (nyan-mode) ;; progress in the form of a rainbow cat.
  6. (setq doom-theme 'doom-one
  7. doom-font (font-spec :family "Iosevka" :size 14 :weight 'regular)
  8. doom-big-font (font-spec :family "Iosevka" :size 18 :weight 'regular)
  9. doom-variable-pitch-font (font-spec :family "Overpass" :size 12))
  10. ;; This determines the style of line numbers in effect. If set to `nil', line
  11. ;; numbers are disabled. For relative line numbers, set this to `relative'.
  12. (setq display-line-numbers-type t)
  13. (add-hook 'after-init-hook #'global-emojify-mode) ;; emojis?!
  14. (add-hook 'prog-mode-hook #'goto-address-mode) ;; linify links!
  15. (setq shell-file-name (executable-find "bash"))
  16. (setq-default vterm-shell (executable-find "fish"))
  17. (setq-default explicit-shell-file-name (executable-find "fish"))
  18. ;; change `org-directory'. It must be set before org loads!
  19. (setq org-directory "~/var/org/")
  20. (map! ;; Easier window movement
  21. :n "C-h" 'evil-window-left
  22. :n "C-j" 'evil-window-down
  23. :n "C-k" 'evil-window-up
  24. :n "C-l" 'evil-window-right
  25. (:map evil-treemacs-state-map
  26. "C-h" 'evil-window-left
  27. "C-l" 'evil-window-right))
  28. (defun unfill-paragraph ()
  29. "Takes a multi-line paragraph and makes it into a single line of text."
  30. (interactive)
  31. (let ((fill-column (point-max)))
  32. (fill-paragraph nil)))
  33. (define-key global-map "\M-z" 'unfill-paragraph)
  34. (defun file-notify-rm-all-watches ()
  35. "Remove all existing file notification watches from Emacs."
  36. (interactive)
  37. (maphash
  38. (lambda (key _value)
  39. (file-notify-rm-watch key))
  40. file-notify-descriptors))
  41. (setq frame-title-format
  42. '(""
  43. (:eval
  44. (if (s-contains-p org-roam-directory (or buffer-file-name ""))
  45. (replace-regexp-in-string
  46. ".*/[0-9]*-?" "☰ "
  47. (subst-char-in-string ?_ ? buffer-file-name))
  48. "%b"))
  49. (:eval
  50. (let ((project-name (projectile-project-name)))
  51. (unless (string= "-" project-name)
  52. (format (if (buffer-modified-p) " ◉ %s" "  ●  %s") project-name))))))
  53. (load! "+agenda-fix")
  54. (defun vulpea-agenda-files-update (&rest _)
  55. (setq org-agenda-files vulpea-project-files))
  56. (setq org-roam-directory "~/var/org/"
  57. org-roam-dailies-directory "dailies")
  58. (advice-add 'org-agenda :before #'vulpea-agenda-files-update)
  59. (advice-add 'org-todo-list :before #'vulpea-agenda-files-update)
  60. (setq display-line-numbers-type 'normal)
  61. (remove-hook! '(org-mode-hook) #'display-line-numbers-mode)
  62. (setq mm-text-html-renderer 'w3m)
  63. (setq w3m-fill-column 88)
  64. (after! eshell
  65. (set-eshell-alias!
  66. "djsh" "~/src/github.com/sureapp/surepreme/make shell"
  67. "djpytest" "DJANGO_SETTINGS_MODULE=ff.settings.ci pytest --reuse-db --black --flake8 --isort --durations=3 $*"
  68. "surep" "cd ~/src/github.com/sureapp/surepreme/"
  69. "ffdev" "ssh dev-ff.local "
  70. "f" "(other-window 1) && find-file $1"
  71. "l" "ls -lh"
  72. "d" "dired $1"
  73. "gl" "(call-interactively 'magit-log-current)"
  74. "gs" "magit-status"
  75. "gc" "magit-commit"))
  76. (setq lsp-lens-enable 1
  77. lsp-ui-sideline-enable 1
  78. lsp-enable-links 1
  79. lsp-headerline-breadcrumb-enable 1
  80. lsp-modeline-code-actions-enable 1
  81. lsp-modeline-diagnostics-enable 1
  82. lsp-completion-show-detail 1
  83. lsp-file-watch-threshold nil)