123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
- (setq user-full-name "Colin Powell"
- user-mail-address "colin@unbl.ink")
- (nyan-mode)
- (setq doom-theme 'doom-one
- doom-font (font-spec :family "Iosevka" :size 14 :weight 'regular)
- doom-big-font (font-spec :family "Iosevka" :size 18 :weight 'regular)
- doom-variable-pitch-font (font-spec :family "Overpass" :size 12))
- (setq display-line-numbers-type t)
- ;; change `org-directory'. It must be set before org loads!
- (setq org-directory "~/var/org/")
- (load! "+agenda-fix")
- (defun vulpea-agenda-files-update (&rest _)
- (setq org-agenda-files vulpea-project-files))
- (setq org-roam-directory "~/var/org/"
- org-roam-dailies-directory "dailies")
- (advice-add 'org-agenda :before #'vulpea-agenda-files-update)
- (advice-add 'org-todo-list :before #'vulpea-agenda-files-update)
- (map! ;; Easier window movement
- :n "C-h" 'evil-window-left
- :n "C-j" 'evil-window-down
- :n "C-k" 'evil-window-up
- :n "C-l" 'evil-window-right
- (:map evil-treemacs-state-map
- "C-h" 'evil-window-left
- "C-l" 'evil-window-right)
- :leader
- (:prefix "f"
- :desc "Find file in dotfiles" "t" #'+hlissner/find-in-dotfiles
- :desc "Browse dotfiles" "T" #'+hlissner/browse-dotfiles)
- (:prefix "b"
- :desc "Black format buffer" "f" #'blacken-buffer
- :desc "isort buffer" "I" #'py-isort-buffer
- :desc "Links in buffer" "l" #'ace-link-org))
- (defun unfill-paragraph ()
- "Takes a multi-line paragraph and makes it into a single line of text."
- (interactive)
- (let ((fill-column (point-max)))
- (fill-paragraph nil)))
- (define-key global-map "\M-z" 'unfill-paragraph)
- (defun file-notify-rm-all-watches ()
- "Remove all existing file notification watches from Emacs."
- (interactive)
- (maphash
- (lambda (key _value)
- (file-notify-rm-watch key))
- file-notify-descriptors))
- (setq frame-title-format
- '(""
- (:eval
- (if (s-contains-p org-roam-directory (or buffer-file-name ""))
- (replace-regexp-in-string
- ".*/[0-9]*-?" "☰ "
- (subst-char-in-string ?_ ? buffer-file-name))
- "%b"))
- (:eval
- (let ((project-name (projectile-project-name)))
- (unless (string= "-" project-name)
- (format (if (buffer-modified-p) " ◉ %s" " ● %s") project-name))))))
- (setq mm-text-html-renderer 'w3m)
- (setq w3m-fill-column 88)
- (setq lsp-lens-enable 1
- lsp-ui-sideline-enable 1
- lsp-enable-links 1
- lsp-headerline-breadcrumb-enable 1
- lsp-modeline-code-actions-enable 1
- lsp-modeline-diagnostics-enable 1
- lsp-completion-show-detail 1
- lsp-file-watch-threshold nil)
- ;; check for hosts folder and find any init-HOSTNAME.el files in there and load them
- (defvar host (substring (shell-command-to-string "hostname") 0 -1))
- (defvar host-dir "~/.config/doom/hosts/")
- (add-load-path! host-dir)
- ;; Setup nov.el mode for epubs and change font
- (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
- (defun my-nov-font-setup ()
- (face-remap-add-relative 'variable-pitch :family "Overpass"
- :height 1.0))
- (add-hook 'nov-mode-hook 'my-nov-font-setup)
- ;;(let ((init-host-feature (intern (concat "init-" host ".el"))))
- ;; (load-file init-host-feature))
- (defvar host-init (concat "~/.config/doom/hosts/init-" host ".el"))
- (if (file-exists-p host-init)
- (load-file host-init))
- (load-file "~/.config/doom/+agenda-fix.el")
- ;; Enable org-modern mode per buffer
- ;(add-hook 'org-mode-hook #'org-modern-mode)
- ;(add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
- ;; Or globally
- (with-eval-after-load 'org (global-org-modern-mode))
|