;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- ;; Some functionality uses this to identify you (setq user-full-name "FollieHiyuki" user-mail-address "folliekazetani@protonmail.com") ;; Set qutebrowser as the default browser (setq browse-url-browser-function 'browse-url-generic browse-url-generic-program "qutebrowser") ;; Font settings (setq doom-font (font-spec :family "Iosevka" :size 16) doom-variable-pitch-font (font-spec :family "sans" :size 16) doom-big-font (font-spec :family "Iosevka" :size 24)) ;;(setq inhibit-compacting-font-caches t) (custom-set-faces! '(font-lock-comment-face :slant italic) '(font-lock-keyword-face :weight bold)) ;; Work around modeline cut off. See hlissner/doom-emacs#2967 (setq all-the-icons-scale-factor 1.0) (after! doom-modeline ;; (custom-set-faces! ;; '(mode-line :height 0.97) ;; '(mode-line-inactive :height 0.97)) (setq doom-modeline-major-mode-icon t doom-modeline-major-mode-color-icon t doom-modeline-unicode-fallback t)) ;; Emoji (after! emojify (setq emojify-display-style 'unicode)) ;; Theme (setq doom-theme 'doom-nord) (setq doom-themes-enable-bold t doom-themes-enable-italic t) (after! treemacs (setq doom-themes-treemacs-theme 'doom-colors doom-themes-treemacs-enable-variable-pitch nil)) ;; 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) +doom-dashboard-banner-padding '(0 . 2) +doom-dashboard-functions '(doom-dashboard-widget-banner doom-dashboard-widget-shortmenu doom-dashboard-widget-loaded)) ;; Line number (setq display-line-numbers-type 'relative) (setq global-hl-line-modes nil) ;; Git-gutter (after! git-gutter (setq +vc-gutter-default-style nil)) ;; Indent (setq-default indent-tabs-mode nil tab-width 2 evil-shift-width 2 standard-indent 2 line-spacing 2) (after! highlight-indent-guides (setq highlight-indent-guides-method 'character highlight-indent-guides-responsive t)) ;; Use ranger.el instead of default dired (after! ranger (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)) ;; Projectile (after! projectile (setq projectile-project-search-path '("~/Code/") projectile-auto-discover nil)) ;; Ivy / Counsel (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) (use-package! all-the-icons-ivy-rich :after 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 :after all-the-icons-ivy-rich) ;; Company (after! company (setq company-idle-delay 0.5 company-minimum-prefix-length 2 company-show-numbers nil)) ;; lsp (use-package! lsp-treemacs :after treemacs :config (lsp-treemacs-sync-mode 1)) (setq lsp-clients-clangd-args '("-j=2" "--background-index" "--clang-tidy" "--completion-style=detailed" "--pch-storage=memory" "--header-insertion=iwyu" "--header-insertion-decorators")) (after! lsp-clangd (set-lsp-priority! 'clangd 2)) ;; Prefer clangd instead of default ccls (after! lsp-lua (setq lua-lsp-dir (expand-file-name "lsp/lua-language-server/" doom-etc-dir) lsp-clients-lua-language-server-bin (expand-file-name "bin/Linux/lua-language-server" lua-lsp-dir) lsp-clients-lua-language-server-main-location (expand-file-name "main.lua" lua-lsp-dir) lsp-lua-completion-call-snippet "Replace" lsp-lua-telemetry-enable nil lsp-lua-hint-enable t)) ;; Quicker which-key (after! which-key (setq which-key-idle-delay 0.5)) ;; Org (setq org-directory "~/Documents/Org/" 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-hide-emphasis-markers t) (defun follie/comfy-org-editing () (setq visual-fill-column-width 120 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) (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 (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 org-tree-slide-header nil org-tree-slide-slide-in-effect t org-tree-slide-breadcrumbs " ▶ " org-tree-slide-activate-message "Presentation starto..." org-tree-slide-deactivate-message "Thanks for listening!")) ;; Org-noter (setq org-noter-notes-search-path '("~/Documents/Org/noter/")) ;; Org-journal (setq org-journal-dir "~/Documents/Org/journal/") ;; Spell checker (after! flyspell (setq flyspell-lazy-idle-seconds 2)) ;; Magit (after! magit (setq magit-diff-refine-hunk 'all)) ;;(add-hook 'magit-mode-hook (lambda () (magit-delta-mode +1))) ;; 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.