This repository has been archived on 2022-08-21. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/home/.config/doom/config.el

154 lines
5.1 KiB
EmacsLisp
Raw Normal View History

2021-02-13 17:28:59 +01: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")
;; Font settings
2021-02-17 18:42:02 +01:00
(setq doom-font (font-spec :family "Iosevka Nerd Font" :size 16)
doom-variable-pitch-font (font-spec :family "sans" :size 16)
2021-02-20 02:13:59 +01:00
doom-big-font (font-spec :family "Iosevka Nerd Font" :size 24))
;;(setq inhibit-compacting-font-caches t)
2021-02-13 17:28:59 +01:00
(custom-set-faces!
2021-02-20 02:13:59 +01:00
'(font-lock-comment-face :slant italic)
'(font-lock-keyword-face :weight bold))
2021-02-13 17:28:59 +01:00
2021-02-20 02:13:59 +01:00
;; Work around modeline cut off. See hlissner/doom-emacs#2967
(setq all-the-icons-scale-factor 1.1)
(after! doom-modeline
(custom-set-faces!
'(mode-line :height 0.97)
'(mode-line-inactive :height 0.97))
(setq doom-modeline-unicode-fallback t))
2021-02-13 17:28:59 +01:00
;; Emoji
2021-02-16 13:55:18 +01:00
(after! emojify
2021-02-17 06:40:50 +01:00
(setq emojify-display-style 'unicode))
2021-02-13 17:28:59 +01:00
;; Theme
(setq doom-theme 'doom-nord)
(setq doom-themes-enable-bold t
doom-themes-enable-italic t)
2021-02-16 13:55:18 +01:00
(after! treemacs
2021-02-17 06:40:50 +01:00
(setq doom-themes-treemacs-theme 'doom-colors
doom-themes-treemacs-enable-variable-pitch nil))
2021-02-13 17:28:59 +01: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 21:59:55 +01: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 17:28:59 +01:00
;; Line number
(setq display-line-numbers-type 'relative)
;; 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 06:40:50 +01:00
(setq highlight-indent-guides-method 'character
highlight-indent-guides-responsive t))
2021-02-13 17:28:59 +01:00
;; Use ranger.el instead of default dired
(after! ranger
2021-02-17 06:40:50 +01:00
(setq ranger-override-dired-mode t
ranger-parent-depth 0
ranger-cleanup-eagerly t
ranger-show-hidden t
ranger-max-preview-size 20
ranger-dont-show-binary t))
2021-02-13 17:28:59 +01:00
;; Projectile
2021-02-16 13:55:18 +01:00
(after! projectile
2021-02-17 06:40:50 +01:00
(setq projectile-project-search-path '("~/Code/")
projectile-auto-discover nil))
2021-02-16 13:55:18 +01:00
;; Ivy / Counsel
(after! ivy
(use-package! all-the-icons-ivy-rich
:defer-incrementally counsel-projectile
:init (all-the-icons-ivy-rich-mode 1)
:config
(setq all-the-icons-ivy-rich-icon-size 1.0))
(use-package! ivy-rich
:defer-incrementally all-the-icons-ivy-rich))
2021-02-16 13:55:18 +01:00
(after! counsel
2021-02-17 06:40:50 +01:00
(setq counsel-linux-app-format-function #'counsel-linux-app-format-function-name-only))
2021-02-16 13:55:18 +01:00
(map! "C-M-j" 'counsel-switch-buffer)
(map! :map minibuffer-local-map
"C-r" 'counsel-minibuffer-history)
;; Completion + lsp
2021-02-13 17:28:59 +01:00
(after! company
2021-02-17 06:40:50 +01:00
(setq company-idle-delay 0.5
company-minimum-prefix-length 2
company-show-numbers nil))
2021-02-13 17:28:59 +01: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-02-17 06:40:50 +01:00
;;(after! lsp-clangd (set-lsp-priority! 'clangd 2)) ;; Prefer clangd instead of default ccls
2021-02-13 17:28:59 +01:00
;; Quicker which-key
2021-02-16 13:55:18 +01:00
(after! which-key
2021-02-17 06:40:50 +01:00
(setq which-key-idle-delay 0.5))
2021-02-13 17:28:59 +01:00
;; Org mode
(setq org-directory "~/Documents/Org/"
org-agenda-files '("~/Documents/Org/agenda.org")
org-default-notes-file (expand-file-name "notes.org" org-directory)
org-journal-dir "~/Documents/Org/Journal/"
org-hide-emphasis-markers t)
2021-02-17 06:40:50 +01:00
;; Spell checker
2021-02-17 23:19:52 +01:00
(after! flyspell
(setq flyspell-lazy-idle-seconds 2))
2021-02-17 06:40:50 +01:00
2021-02-16 18:04:27 +01:00
;; Asynchronous bytecode compilation
(use-package! async
:defer-incrementally t
2021-02-16 18:04:27 +01:00
:init
(dired-async-mode 1)
(async-bytecomp-package-mode 1)
:custom (async-bytecomp-allowed-packages '(all)))
2021-02-13 17:28:59 +01:00
2021-02-17 06:40:50 +01:00
;; Set qutebrowser as the default browser
(setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "qutebrowser")
2021-02-21 15:26:50 +01:00
;; Magit
(after! magit
(setq magit-diff-refine-hunk 'all))
2021-02-13 17:28:59 +01: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.