;; ;;; Misc ;; (setq display-line-numbers-type t) (setq scroll-margin 10 hscroll-margin 10) (setq browse-url-generic-program (executable-find "firefox") browse-url-browser-function 'browse-url-generic) ;; ;;; Doom-specific ;; ;; Make it more default-ey. (setq frame-title-format '("Emacs") icon-title-format frame-title-format) (setq doom-theme 'doom-tomorrow-night) (setq +format-on-save-enabled-modes '(not nix-mode json-mode yaml-mode)) ;; ;;; LSP ;; (setq lsp-enable-suggest-server-download nil) ;; ;;; Org ;; (setq org-directory "~/doc/org/") (after! org (setq org-todo-keywords '((sequence "PROJ(p)" ; A master task. "TODO(t)" ; A task that needs to be done with statues: "STRT(s@)" ; - In progress. "HOLD(l@/!)" ; - Paused because of me. "WAIT(w@/!)" ; - Paused because of not me. "|" "DONE(d@/!)" ; Complete state. "KILL(k@/!)")) ; Incomplete state. org-todo-keyword-faces '(("PROJ" . +org-todo-project) ("TODO" . +org-todo-active) ("STRT" . +org-todo-active) ("HOLD" . +org-todo-onhold) ("WAIT" . +org-todo-onhold) ("DONE" . +org-todo-cancel) ("KILL" . +org-todo-cancel)))) (add-hook! 'org-mode-hook 'auto-fill-mode) (add-hook! 'org-mode-hook (lambda (&rest _) (setq fill-column 80))) (setq org-roam-directory "~/doc/roam/" org-roam-db-location (concat org-roam-directory ".db")) (use-package! org-roam-ui :requires websocket :after org-roam :config (setq org-roam-ui-sync-theme t org-roam-ui-follow t org-roam-ui-update-on-save t org-roam-ui-open-on-start t)) ;; ;;; Elisp ;; (setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc)) ;; ;;; Haskell ;; (setq lsp-haskell-formatting-provider "ormolu") ;; ;;; Nix ;; (after! lsp-mode (add-to-list 'lsp-language-id-configuration '(nix-mode . "nix")) (lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection '("rnix-lsp")) :major-modes '(nix-mode) :server-id 'nix))) ;; ;;; YAML ;; (add-hook! 'yaml-mode-hook (defun +disable-flycheck-for-yaml-helm-templates () (when (and buffer-file-name (string-match-p "/templates/" buffer-file-name) (or (string-suffix-p ".yaml" buffer-file-name) (string-suffix-p ".yml" buffer-file-name))) (remove-hook! 'yaml-mode-local-vars-hook #'lsp!) (pushnew! flycheck-disabled-checkers 'yaml-jsyaml 'yaml-ruby 'yaml-yamllint)))) (setq-hook! 'yaml-mode-hook +format-with-lsp nil) ;; ;;; 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) ;; ;;; mu4e ;; (setq mu4e-root-maildir "~/mail" mu4e-context-policy 'ask-if-none mu4e-compose-context-policy 'always-ask mu4e-update-interval 60 sendmail-program (executable-find "msmtp") send-mail-function #'message-send-mail-with-sendmail message-send-mail-function #'message-send-mail-with-sendmail message-sendmail-envelope-from 'header message-sendmail-extra-arguments '("--read-envelope-from") message-sendmail-f-is-evil t message-kill-buffer-on-exit t) ;; ;;; Circe ;; (defun nixfiles/irc-bouncer-password-f (&rest _) (+pass-get-secret "server/soju.manwe.shire.net/azahi")) (set-irc-server! "libera" `(:host "shire.net" :port 6667 :user "azahi/libera" :pass nixfiles/irc-bouncer-password-f)) (set-irc-server! "oftc" `(:host "shire.net" :port 6667 :user "azahi/oftc" :pass nixfiles/irc-bouncer-password-f)) (set-irc-server! "hackint" `(:host "shire.net" :port 6667 :user "azahi/hackint" :pass nixfiles/irc-bouncer-password-f)) (set-irc-server! "rizon" `(:host "shire.net" :port 6667 :user "azahi/rizon" :pass nixfiles/irc-bouncer-password-f)) ;; (use-package! hledger-mode ;; :mode ("\\.journal\\'") ;; :hook ((hledger-view-mode . hl-line-mode) ;; (hledger-view-mode . center-text-for-reading)) ;; :init ;; (setq hledger-jfile "~/doc/accounting/current.journal") ;; :config ;; (set-company-backend! 'hledger-mode 'hledger-company) ;; (add-hook! 'hledger-mode-hook ;; (lambda (&rest _) ;; (make-local-variable 'company-backends) ;; (add-to-list 'company-backends 'hledger-company)))) ;; (use-package! hledger-input ;; :hook ((hledger-input-post-commit . hledger-show-new-balances) ;; (hledger-input-mode . auto-fill-mode) ;; (hledger-input-mode . (lambda (&rest _) ;; (make-local-variable 'compay-idle-delay) ;; (setq-local company-idle-delay 0.1)))) ;; :init ;; (setq hledger-input-buffer-height 20)) (use-package! kubernetes :defer t :commands (kubernetes-overview) :init (setq kubernetes-poll-frequency 3600 kubernetes-redraw-frequency 3600)) (use-package! kubernetes-evil :after kubernetes-overview) (use-package! kubernetes-tramp :defer t)