2021-02-13 11:28:59 -05:00
|
|
|
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;; Some functionality uses this to identify you
|
|
|
|
(setq user-full-name "FollieHiyuki"
|
|
|
|
user-mail-address "folliekazetani@protonmail.com")
|
|
|
|
|
2021-02-28 21:12:41 -05:00
|
|
|
;; Set qutebrowser as the default browser
|
|
|
|
(setq browse-url-browser-function 'browse-url-generic
|
|
|
|
browse-url-generic-program "qutebrowser")
|
|
|
|
|
2021-03-12 17:20:35 -05:00
|
|
|
;; Secrets
|
|
|
|
(setq auth-sources '("~/.config/doom/.authinfo.gpg"))
|
|
|
|
|
2021-02-13 11:28:59 -05:00
|
|
|
;; Font settings
|
2021-03-03 02:45:15 -05:00
|
|
|
(setq doom-font (font-spec :family "Iosevka" :size 16)
|
2021-03-09 12:09:33 -05:00
|
|
|
doom-serif-font (font-spec :family "Iosevka Slab" :size 16)
|
2021-03-08 16:18:17 -05:00
|
|
|
doom-variable-pitch-font (font-spec :family "Iosevka Aile" :size 16)
|
2021-03-03 02:45:15 -05:00
|
|
|
doom-big-font (font-spec :family "Iosevka" :size 24))
|
2021-03-09 12:09:33 -05:00
|
|
|
(after! unicode-fonts
|
|
|
|
(setq doom-unicode-font doom-font)
|
|
|
|
(dolist (unicode-block '("CJK Compatibility"
|
|
|
|
"CJK Compatibility Forms"
|
|
|
|
"CJK Compatibility Ideographs"
|
|
|
|
"CJK Compatibility Ideographs Supplement"
|
|
|
|
"CJK Radicals Supplement"
|
|
|
|
"CJK Strokes"
|
|
|
|
"CJK Symbols and Punctuation"
|
|
|
|
"CJK Unified Ideographs"
|
|
|
|
"CJK Unified Ideographs Extension A"
|
|
|
|
"CJK Unified Ideographs Extension B"
|
|
|
|
"CJK Unified Ideographs Extension C"
|
|
|
|
"CJK Unified Ideographs Extension D"
|
|
|
|
"CJK Unified Ideographs Extension E"))
|
|
|
|
(push "Sarasa Mono J" (cadr (assoc unicode-block unicode-fonts-block-font-mapping)))))
|
2021-02-19 20:13:59 -05:00
|
|
|
;;(setq inhibit-compacting-font-caches t)
|
2021-02-13 11:28:59 -05:00
|
|
|
(custom-set-faces!
|
2021-02-19 20:13:59 -05:00
|
|
|
'(font-lock-comment-face :slant italic)
|
|
|
|
'(font-lock-keyword-face :weight bold))
|
2021-02-13 11:28:59 -05:00
|
|
|
|
2021-03-12 17:20:35 -05:00
|
|
|
;; Japanese input method
|
|
|
|
(use-package! mozc
|
|
|
|
:config
|
|
|
|
(setq default-input-method "japanese-mozc"))
|
|
|
|
;; (use-package! mozc-cand-posframe
|
|
|
|
;; :after mozc
|
|
|
|
;; :config
|
|
|
|
;; (setq mozc-candidate-style 'posframe)
|
|
|
|
;; (custom-set-faces!
|
|
|
|
;; '(mozc-cand-posframe-normal-face :inherit tooltip)
|
|
|
|
;; '(mozc-cand-posframe-focused-face :inherit highlight)
|
|
|
|
;; '(mozc-cand-posframe-footer-face :inherit default)))
|
|
|
|
|
2021-02-19 20:13:59 -05:00
|
|
|
;; Work around modeline cut off. See hlissner/doom-emacs#2967
|
2021-02-28 00:10:30 -05:00
|
|
|
(setq all-the-icons-scale-factor 1.0)
|
2021-02-19 20:13:59 -05:00
|
|
|
(after! doom-modeline
|
2021-03-12 17:20:35 -05:00
|
|
|
(custom-set-faces!
|
|
|
|
'(mode-line :height 0.98)
|
|
|
|
'(mode-line-inactive :height 0.98))
|
2021-02-28 08:55:48 -05:00
|
|
|
(setq doom-modeline-major-mode-icon t
|
|
|
|
doom-modeline-major-mode-color-icon t
|
|
|
|
doom-modeline-unicode-fallback t))
|
2021-02-13 11:28:59 -05:00
|
|
|
|
|
|
|
;; Emoji
|
2021-02-16 07:55:18 -05:00
|
|
|
(after! emojify
|
2021-02-17 00:40:50 -05:00
|
|
|
(setq emojify-display-style 'unicode))
|
2021-02-13 11:28:59 -05:00
|
|
|
|
|
|
|
;; Theme
|
|
|
|
(setq doom-theme 'doom-nord)
|
|
|
|
(setq doom-themes-enable-bold t
|
|
|
|
doom-themes-enable-italic t)
|
2021-02-16 07:55:18 -05:00
|
|
|
(after! treemacs
|
2021-02-17 00:40:50 -05:00
|
|
|
(setq doom-themes-treemacs-theme 'doom-colors
|
|
|
|
doom-themes-treemacs-enable-variable-pitch nil))
|
2021-02-13 11:28:59 -05:00
|
|
|
|
|
|
|
;; Pick an image for dashboard
|
|
|
|
;;(defun random-choice (items)
|
|
|
|
;; (let* ((size (length items))
|
|
|
|
;; (index (random size)))
|
|
|
|
;; (nth index items)))
|
|
|
|
;;(defvar *kawaii* (random-choice (delete "."
|
|
|
|
;; (delete ".." (directory-files (expand-file-name "images" doom-private-dir))))))
|
|
|
|
(setq +doom-dashboard-banner-file "yukino.png"
|
|
|
|
+doom-dashboard-banner-dir (expand-file-name "images" doom-private-dir)
|
2021-02-14 15:59:55 -05:00
|
|
|
+doom-dashboard-banner-padding '(0 . 2)
|
|
|
|
+doom-dashboard-functions '(doom-dashboard-widget-banner
|
|
|
|
doom-dashboard-widget-shortmenu
|
|
|
|
doom-dashboard-widget-loaded))
|
2021-02-13 11:28:59 -05:00
|
|
|
|
|
|
|
;; Line number
|
|
|
|
(setq display-line-numbers-type 'relative)
|
2021-02-28 21:12:41 -05:00
|
|
|
(setq global-hl-line-modes nil)
|
2021-02-13 11:28:59 -05:00
|
|
|
|
2021-03-06 05:54:47 -05:00
|
|
|
;; Git-gutter
|
|
|
|
(after! git-gutter
|
|
|
|
(setq +vc-gutter-default-style nil))
|
|
|
|
|
2021-02-13 11:28:59 -05:00
|
|
|
;; Indent
|
|
|
|
(setq-default
|
|
|
|
indent-tabs-mode nil
|
|
|
|
tab-width 2
|
|
|
|
evil-shift-width 2
|
|
|
|
standard-indent 2
|
|
|
|
line-spacing 2)
|
|
|
|
(after! highlight-indent-guides
|
2021-02-17 00:40:50 -05:00
|
|
|
(setq highlight-indent-guides-method 'character
|
|
|
|
highlight-indent-guides-responsive t))
|
2021-02-13 11:28:59 -05:00
|
|
|
|
|
|
|
;; Use ranger.el instead of default dired
|
|
|
|
(after! ranger
|
2021-03-08 16:18:17 -05:00
|
|
|
(setq ranger-parent-depth 0
|
2021-02-17 00:40:50 -05:00
|
|
|
ranger-cleanup-eagerly t
|
|
|
|
ranger-show-hidden t
|
|
|
|
ranger-max-preview-size 20
|
|
|
|
ranger-dont-show-binary t))
|
2021-02-13 11:28:59 -05:00
|
|
|
|
|
|
|
;; Projectile
|
2021-02-16 07:55:18 -05:00
|
|
|
(after! projectile
|
2021-02-17 00:40:50 -05:00
|
|
|
(setq projectile-project-search-path '("~/Code/")
|
|
|
|
projectile-auto-discover nil))
|
2021-02-16 07:55:18 -05:00
|
|
|
|
2021-02-23 18:55:23 -05:00
|
|
|
;; Ivy / Counsel
|
2021-03-01 14:48:10 -05:00
|
|
|
(after! counsel
|
|
|
|
(setq counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only))
|
|
|
|
(map! "C-M-j" 'counsel-switch-buffer)
|
|
|
|
(map! :map minibuffer-local-map
|
|
|
|
"C-r" 'counsel-minibuffer-history)
|
2021-02-28 21:12:41 -05:00
|
|
|
(use-package! all-the-icons-ivy-rich
|
2021-03-11 06:22:29 -05:00
|
|
|
:defer-incrementally counsel-projectile
|
2021-02-28 21:12:41 -05:00
|
|
|
:init (all-the-icons-ivy-rich-mode 1)
|
|
|
|
:config
|
|
|
|
(setq all-the-icons-ivy-rich-icon-size 1.0))
|
|
|
|
(use-package! ivy-rich
|
|
|
|
:after all-the-icons-ivy-rich)
|
2021-02-16 07:55:18 -05:00
|
|
|
|
2021-03-03 02:45:15 -05:00
|
|
|
;; Company
|
2021-02-13 11:28:59 -05:00
|
|
|
(after! company
|
2021-02-17 00:40:50 -05:00
|
|
|
(setq company-idle-delay 0.5
|
2021-02-23 18:55:23 -05:00
|
|
|
company-minimum-prefix-length 2
|
|
|
|
company-show-numbers nil))
|
2021-03-03 02:45:15 -05:00
|
|
|
|
|
|
|
;; lsp
|
|
|
|
(use-package! lsp-treemacs
|
|
|
|
:after treemacs
|
|
|
|
:config
|
|
|
|
(lsp-treemacs-sync-mode 1))
|
2021-02-13 11:28:59 -05:00
|
|
|
(setq lsp-clients-clangd-args '("-j=2"
|
|
|
|
"--background-index"
|
|
|
|
"--clang-tidy"
|
|
|
|
"--completion-style=detailed"
|
|
|
|
"--pch-storage=memory"
|
|
|
|
"--header-insertion=iwyu"
|
|
|
|
"--header-insertion-decorators"))
|
2021-03-03 02:45:15 -05:00
|
|
|
(after! lsp-clangd (set-lsp-priority! 'clangd 2)) ;; Prefer clangd instead of default ccls
|
2021-03-04 15:35:42 -05:00
|
|
|
(after! lsp-lua
|
2021-03-27 21:14:11 -04:00
|
|
|
(setq lsp-clients-lua-language-server-bin (expand-file-name "lsp/lua-language-server/bin/Linux/lua-language-server" doom-etc-dir)
|
|
|
|
lsp-clients-lua-language-server-main-location (expand-file-name "lsp/lua-language-server/main.lua" doom-etc-dir)
|
2021-03-04 15:35:42 -05:00
|
|
|
lsp-lua-completion-call-snippet "Replace"
|
|
|
|
lsp-lua-telemetry-enable nil
|
|
|
|
lsp-lua-hint-enable t))
|
2021-02-13 11:28:59 -05:00
|
|
|
|
|
|
|
;; Quicker which-key
|
2021-02-16 07:55:18 -05:00
|
|
|
(after! which-key
|
2021-02-17 00:40:50 -05:00
|
|
|
(setq which-key-idle-delay 0.5))
|
2021-02-13 11:28:59 -05:00
|
|
|
|
2021-03-01 14:48:10 -05:00
|
|
|
;; Org
|
2021-03-26 18:09:37 -04:00
|
|
|
(setq org-directory "~/Documents/Org/")
|
|
|
|
(after! org
|
|
|
|
(setq org-default-notes-file "~/Documents/Org/notes.org"
|
|
|
|
org-agenda-files '("~/Documents/Org/agenda/agenda.org" "~/Documents/Org/agenda/archive.org")
|
|
|
|
org-confirm-babel-evaluate nil
|
|
|
|
org-ellipsis "▾"
|
|
|
|
org-log-done t
|
|
|
|
org-log-into-drawser t
|
|
|
|
org-insert-heading-respect-content nil
|
|
|
|
org-hide-emphasis-markers t)
|
|
|
|
(add-to-list 'org-modules 'ol-info)
|
|
|
|
;; Org-noter
|
|
|
|
(setq org-noter-notes-search-path '("~/Documents/Org/noter/"))
|
|
|
|
;; Org-journal
|
|
|
|
(setq org-journal-dir "~/Documents/Org/journal/"))
|
2021-02-28 21:12:41 -05:00
|
|
|
(defun follie/comfy-org-editing ()
|
2021-03-09 12:09:33 -05:00
|
|
|
(setq visual-fill-column-width 100
|
2021-02-28 21:12:41 -05:00
|
|
|
visual-fill-column-center-text t)
|
|
|
|
(visual-fill-column-mode 1)
|
|
|
|
(display-line-numbers-mode -1))
|
|
|
|
(add-hook 'org-mode-hook 'follie/comfy-org-editing)
|
2021-03-26 18:09:37 -04:00
|
|
|
(add-hook! org-mode (electric-indent-local-mode -1))
|
2021-03-01 14:48:10 -05:00
|
|
|
(defun follie/org-toggle-emphasis-markers ()
|
|
|
|
"Toggle emphasis markers in an Org buffer"
|
|
|
|
(interactive)
|
|
|
|
(if org-hide-emphasis-markers
|
|
|
|
(setq org-hide-emphasis-markers nil)
|
|
|
|
(setq org-hide-emphasis-markers t))
|
|
|
|
(org-mode-restart))
|
|
|
|
(map! :map org-mode-map
|
|
|
|
:localleader :desc "org-toggle-emphasis-markers"
|
|
|
|
"z" #'follie/org-toggle-emphasis-markers)
|
|
|
|
;; Org-tree-slide
|
2021-02-28 08:55:48 -05:00
|
|
|
(use-package! org-tree-slide
|
|
|
|
:commands org-tree-slide-mode
|
|
|
|
:config
|
|
|
|
(advice-remove 'org-tree-slide--display-tree-with-narrow #'+org-present--narrow-to-subtree-a)
|
|
|
|
(setq +org-present-text-scale 2
|
|
|
|
org-tree-slide-skip-outline-level 0
|
|
|
|
org-tree-slide-modeline-display nil
|
2021-03-01 14:48:10 -05:00
|
|
|
org-tree-slide-header nil
|
2021-02-28 08:55:48 -05:00
|
|
|
org-tree-slide-slide-in-effect t
|
2021-03-01 14:48:10 -05:00
|
|
|
org-tree-slide-breadcrumbs " ▶ "
|
2021-02-28 08:55:48 -05:00
|
|
|
org-tree-slide-activate-message "Presentation starto..."
|
|
|
|
org-tree-slide-deactivate-message "Thanks for listening!"))
|
2021-02-13 11:28:59 -05:00
|
|
|
|
2021-03-06 14:22:26 -05:00
|
|
|
;; Latex
|
|
|
|
(setq +latex-viewers '(pdf-tools))
|
|
|
|
|
2021-02-17 00:40:50 -05:00
|
|
|
;; Spell checker
|
2021-02-17 17:19:52 -05:00
|
|
|
(after! flyspell
|
|
|
|
(setq flyspell-lazy-idle-seconds 2))
|
2021-02-17 00:40:50 -05:00
|
|
|
|
2021-02-21 09:26:50 -05:00
|
|
|
;; Magit
|
|
|
|
(after! magit
|
|
|
|
(setq magit-diff-refine-hunk 'all))
|
2021-03-03 02:45:15 -05:00
|
|
|
;;(add-hook 'magit-mode-hook (lambda () (magit-delta-mode +1)))
|
2021-02-21 09:26:50 -05:00
|
|
|
|
2021-03-31 09:14:13 -04:00
|
|
|
;; Elfeed
|
|
|
|
(setq rmh-elfeed-org-files (list (expand-file-name "elfeed.org" doom-private-dir)))
|
|
|
|
;;(add-hook! 'elfeed-search-mode-hook 'elfeed-update)
|
2021-04-02 20:23:33 -04:00
|
|
|
(use-package! elfeed-goodies
|
|
|
|
:after elfeed
|
|
|
|
:config
|
|
|
|
(elfeed-goodies/setup)
|
|
|
|
(setq elfeed-goodies/entry-pane-size 0.5))
|
2021-03-31 09:14:13 -04:00
|
|
|
|
|
|
|
;; Elpher
|
|
|
|
(defun elpher--init-hook ()
|
|
|
|
(setq visual-fill-column-center-text t)
|
|
|
|
(visual-fill-column-mode 1))
|
|
|
|
(use-package! elpher
|
|
|
|
:defer t
|
|
|
|
:config
|
|
|
|
(setq elpher-use-tls t
|
|
|
|
elpher-auto-disengage-TLS t
|
|
|
|
elpher-connection-timeout 10
|
|
|
|
elpher-gemini-max-fill-width 80
|
|
|
|
elpher-gemini-TLS-cert-checks nil)
|
|
|
|
(add-hook 'elpher-mode-hook 'elpher--init-hook))
|
|
|
|
|
|
|
|
;; mu4e
|
|
|
|
(use-package! mu4e
|
|
|
|
:commands mu4e mu4e-compose-new
|
|
|
|
:config
|
|
|
|
(setq mu4e-update-interval (* 10 60)
|
|
|
|
mu4e-view-image-max-width 600
|
|
|
|
mu4e-context-policy 'always-ask
|
|
|
|
mu4e-compose-context-policy 'always-ask
|
|
|
|
mu4e-index-cleanup nil
|
|
|
|
mu4e-index-lazy-check t))
|
|
|
|
(set-email-account! "Gmail"
|
|
|
|
'((mu4e-sent-folder . "/[Gmail]/Sent Mail")
|
|
|
|
(mu4e-drafts-folder . "/[Gmail]/Drafts")
|
|
|
|
(mu4e-trash-folder . "/[Gmail]/Trash")
|
|
|
|
(mu4e-refile-folder . "/[Gmail]/All Mail")
|
|
|
|
(smtpmail-smtp-user . "example@gmail.com")
|
|
|
|
(smtpmail-smtp-server . "smtp.gmail.com")
|
|
|
|
(smtpmail-smtp-service . 465)
|
|
|
|
(smtpmail-stream-type . ssl)
|
|
|
|
(user-full-name . "FGoogle")
|
|
|
|
(user-mail-address . "example@gmail.com")
|
|
|
|
(mu4e-compose-signature . "---\nfgoogle"))
|
|
|
|
t)
|
|
|
|
|
|
|
|
;; circe
|
|
|
|
(defun my-fetch-password (&rest params)
|
|
|
|
(require 'auth-source)
|
|
|
|
(let ((match (car (apply #'auth-source-search params))))
|
|
|
|
(if match
|
|
|
|
(let ((secret (plist-get match :secret)))
|
|
|
|
(if (functionp secret)
|
|
|
|
(funcall secret)
|
|
|
|
secret))
|
|
|
|
(error "Password not found for %S" params))))
|
|
|
|
(set-irc-server! "chat.freenode.net"
|
|
|
|
'(:tls t
|
|
|
|
:port 6697
|
|
|
|
:nick "FollieHiyuki"
|
|
|
|
:sasl-password (my-fetch-password :user "FollieHiyuki" :host "irc.freenode.net")
|
|
|
|
:channels ("#voidlinux" "#river" "#archlinux" "#nixos")))
|
|
|
|
|
2021-02-13 11:28:59 -05:00
|
|
|
;; Here are some additional functions/macros that could help you configure Doom:
|
|
|
|
;;
|
|
|
|
;; - `load!' for loading external *.el files relative to this one
|
|
|
|
;; - `use-package!' for configuring packages
|
|
|
|
;; - `after!' for running code after a package has loaded
|
|
|
|
;; - `add-load-path!' for adding directories to the `load-path', relative to
|
|
|
|
;; this file. Emacs searches the `load-path' when you load packages with
|
|
|
|
;; `require' or `use-package'.
|
|
|
|
;; - `map!' for binding new keys
|
|
|
|
;;
|
|
|
|
;; To get information about any of these functions/macros, move the cursor over
|
|
|
|
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
|
|
|
|
;; This will open documentation for it, including demos of how they are used.
|
|
|
|
;;
|
|
|
|
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
|
|
|
;; they are implemented.
|