diff options
author | azahi <azat@bahawi.net> | 2024-10-10 03:33:47 +0300 |
---|---|---|
committer | azahi <azat@bahawi.net> | 2024-10-10 03:33:47 +0300 |
commit | c6c9929a090aa8022045514e09ecafd57a954c27 (patch) | |
tree | 0a71feedcada203c045f94d01bc2d8b733b067ee /modules/emacs/doom/config.el | |
parent | 2024-08-20 (diff) |
2024-10-10
Diffstat (limited to '')
-rw-r--r-- | modules/emacs/doom/config.el | 183 |
1 files changed, 88 insertions, 95 deletions
diff --git a/modules/emacs/doom/config.el b/modules/emacs/doom/config.el index 206e5cd..fe3b5b4 100644 --- a/modules/emacs/doom/config.el +++ b/modules/emacs/doom/config.el @@ -2,15 +2,15 @@ ;;; Misc ;; -(setq frame-title-format '("GNU Emacs")) +(setq! frame-title-format '("GNU Emacs")) (setq-hook! '(prog-mode-hook yaml-mode-hook) display-line-numbers-type 'relative scroll-margin 10 hscroll-margin 10) -(setq browse-url-generic-program (executable-find "firefox") - browse-url-browser-function 'browse-url-generic) +(setq! browse-url-generic-program (executable-find "firefox") + browse-url-browser-function 'browse-url-generic) (use-package! xclip :config @@ -19,34 +19,47 @@ xclip-mode t xclip-method 'wl-copy)) -(setq migemo-options '("--quiet" "--emacs") - skk-show-inline t) +(setq! migemo-options '("--quiet" "--emacs") + skk-show-inline t) ;; ;;; Doom-specific ;; -(setq doom-theme 'modus-operandi - doom-modeline-icon nil - doom-modeline-indent-info t - doom-modeline-total-line-number t - doom-modeline-height 30) +(setq! doom-theme 'modus-operandi + doom-modeline-icon nil + doom-modeline-indent-info t + doom-modeline-total-line-number t + doom-modeline-height 30) + +;; +;;; TVL +;; + +(use-package! tvl) ;; ;;; Editorconfig ;; -(setq +editorconfig-mode-alist '((sh-mode . "sh")) - editorconfig-exclude-modes '(lisp-mode - common-lisp-mode - emacs-lisp-mode)) +(setq! +editorconfig-mode-alist '((sh-mode . "sh")) + ;; It's never a good idea to force specific indentation rules for Lisp, + ;; the only rule should be is not to use tabs. + editorconfig-exclude-modes '(emacs-lisp-mode + clojure-mode + scheme-mode + lisp-mode + racket-mode + fennel-mode + hy-mode + dune-mode)) ;; ;;; LSP ;; -(setq lsp-enable-suggest-server-download nil - lsp-modeline-code-actions-enable nil) +(setq! lsp-enable-suggest-server-download nil + lsp-modeline-code-actions-enable nil) ;; ;;; Nix @@ -66,9 +79,9 @@ ;;; Go ;; -(setq lsp-go-analyses '((unsedvariable . t) - (unusedparams . t) - (unusedwrite . t))) +(setq! lsp-go-analyses '((unsedvariable . t) + (unusedparams . t) + (unusedwrite . t))) ;; ;;; Org @@ -79,38 +92,38 @@ ;; For some reason only using `after!' work here. `setq-hook!' and etc doesn't ;; produce expected results. (after! org - (setq org-todo-keywords '((sequence - "TODO(t)" - "LOOP(r)" - "STRT(s@)" - "WAIT(w@/!)" - "HOLD(h@/!)" - "IDEA(i)" - "PROJ(p)" - "|" - "DONE(d@/!)" - "KILL(k@/!)")) - org-todo-keyword-faces '(("STRT" . +org-todo-active) - ("WAIT" . +org-todo-onhold) - ("HOLD" . +org-todo-onhold) - ("PROJ" . +org-todo-project) - ("KILL" . +org-todo-cancel)) - org-capture-templates '(("t" "Todo" entry - (file+headline +org-capture-todo-file "Inbox") - "* TODO %?\n%i\n%a" :prepend t) - ("n" "Note" entry - (file+headline +org-capture-notes-file "Inbox") - "* %u %?\n%i\n%a" :prepend t) - ("j" "Journal" entry - (file+olp+datetree +org-capture-journal-file) - "* %U %?\n%i\n%a" :prepend t)))) + (setq! org-todo-keywords '((sequence + "TODO(t)" + "LOOP(r)" + "STRT(s@)" + "WAIT(w@/!)" + "HOLD(h@/!)" + "IDEA(i)" + "PROJ(p)" + "|" + "DONE(d@/!)" + "KILL(k@/!)")) + org-todo-keyword-faces '(("STRT" . +org-todo-active) + ("WAIT" . +org-todo-onhold) + ("HOLD" . +org-todo-onhold) + ("PROJ" . +org-todo-project) + ("KILL" . +org-todo-cancel)) + org-capture-templates '(("t" "Todo" entry + (file+headline +org-capture-todo-file "Inbox") + "* TODO %?\n%i\n%a" :prepend t) + ("n" "Note" entry + (file+headline +org-capture-notes-file "Inbox") + "* %u %?\n%i\n%a" :prepend t) + ("j" "Journal" entry + (file+olp+datetree +org-capture-journal-file) + "* %U %?\n%i\n%a" :prepend t)))) (add-hook! 'org-mode-hook 'auto-fill-mode) (setq-hook! 'org-mode-hook fill-column 80) -(setq org-roam-directory "~/doc/roam/" - org-roam-db-location (concat org-roam-directory ".db")) +(setq! org-roam-directory "~/doc/roam/" + org-roam-db-location (concat org-roam-directory ".db")) (use-package! org-roam-ui :requires websocket @@ -132,8 +145,8 @@ ;;; PlantUML ;; -(setq plantuml-default-exec-mode 'executable - org-plantuml-exec-mode 'plantuml) +(setq! plantuml-default-exec-mode 'executable + org-plantuml-exec-mode 'plantuml) ;; ;;; Elisp @@ -142,15 +155,11 @@ (after! flycheck (pushnew! flycheck-disabled-checkers 'emacs-lisp-checkdoc)) -;; Turn this off because it leaves face artifacts when changing indentation. -(add-hook! 'emacs-lisp-mode-hook - (highlight-indent-guides-mode -1)) - ;; ;;; Haskell ;; -(setq lsp-haskell-formatting-provider "ormolu") +(setq! lsp-haskell-formatting-provider "ormolu") ;; ;;; Nickel @@ -186,38 +195,23 @@ ;;; Elfeed ;; -(setq elfeed-db-directory "~/.elfeed" - elfeed-enclosure-default-dir (concat elfeed-db-directory "/enclosures") - rmh-elfeed-org-files (list (concat elfeed-db-directory "/index.org")) - elfeed-goodies/powerline-default-separator nil - elfeed-goodies/entry-pane-size 0.75 - elfeed-goodies/entry-pane-position 'bottom) - -(add-hook! 'elfeed-new-entry-hook - '((elfeed-make-tagger - :before "2 weeks ago" - :remove 'unread) - (elfeed-make-tagger - :feed-title "SberMarket Tech" - :entry-title (not ".*(DevOps|Golang).*") - :add 'junk - :remove 'unread) - (elfeed-make-tagger - :feed-title "dotconferences" - :entry-title (not ".*dotGo.*") - :add 'junk - :remove 'unread))) +(setq! elfeed-db-directory "~/.elfeed" + elfeed-enclosure-default-dir (concat elfeed-db-directory "/enclosures") + rmh-elfeed-org-files (list (concat elfeed-db-directory "/index.org")) + elfeed-goodies/powerline-default-separator nil + elfeed-goodies/entry-pane-size 0.75 + elfeed-goodies/entry-pane-position 'bottom) ;; ;;; mu4e ;; (after! mu4e - (setq sendmail-program (executable-find "msmtp") - send-mail-function #'smtpmail-send-it - message-sendmail-f-is-evil t - message-sendmail-extra-arguments '("--read-envelope-from") - message-send-mail-function #'message-send-mail-with-sendmail)) + (setq! sendmail-program (executable-find "msmtp") + send-mail-function #'smtpmail-send-it + message-sendmail-f-is-evil t + message-sendmail-extra-arguments '("--read-envelope-from") + message-send-mail-function #'message-send-mail-with-sendmail)) (setq-hook! 'mu4e-main-mode-hook mu4e-update-interval 30) @@ -225,26 +219,25 @@ ;;; Circe ;; -(setq circe-network-options - (mapcar (lambda (server) - `(,server - :server-buffer-name ,server - :host "azahi.cc" - :port 6697 - :tls t - :logging nil - :user ,(concat circe-default-user "/" server) - :pass ,(lambda (&rest _) - (+pass-get-secret "server/soju.shire.net/azahi")))) - '("libera" "oftc" "hackint" "rizon"))) +(setq! circe-network-options + (mapcar (lambda (server) + `(,server + :server-buffer-name ,server + :host "azahi.cc" + :port 6697 + :tls t + :logging nil + :user ,(concat circe-default-user "/" server) + :pass ,(lambda (&rest _) + (+pass-get-secret "server/soju.shire.net/azahi")))) + '("libera" "oftc" "hackint" "rizon"))) ;; ;;; Sops ;; (use-package! sops - :config - (global-sops-mode 1)) + :hook (doom-first-file . global-sops-mode)) ;; ;;; Hledger @@ -256,7 +249,7 @@ :hook ((hledger-view-mode . hl-line-mode) (hledger-view-mode . center-text-for-reading)) :init - (setq hledger-jfile "~/doc/accounting/current.journal") + (setq! hledger-jfile "~/doc/accounting/current.journal") :config (set-company-backend! 'hledger-mode 'hledger-company) (add-hook! 'hledger-mode-hook @@ -272,4 +265,4 @@ (make-local-variable 'compay-idle-delay) (setq-local company-idle-delay 0.1)))) :init - (setq hledger-input-buffer-height 20)) + (setq! hledger-input-buffer-height 20)) |