dotfiles/doom/config.el

86 lines
3 KiB
EmacsLisp
Raw Normal View History

2022-12-13 23:12:11 +00:00
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
2024-05-17 12:01:51 +00:00
(setq user-full-name "Raine Godmaire"
user-mail-address "its@raine.ing")
2022-12-13 23:12:11 +00:00
(setq doom-theme 'doom-gruvbox)
(setq display-line-numbers-type 'relative)
2024-03-30 10:47:54 +00:00
(set-frame-parameter nil 'alpha-background 95)
2024-03-30 10:53:15 +00:00
(add-to-list 'default-frame-alist '(alpha-background . 95))
2024-03-30 10:47:54 +00:00
2022-12-13 23:12:11 +00:00
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-unicode-font' -- for unicode glyphs
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
2023-03-18 23:30:57 +00:00
(setq doom-font (font-spec :family "Hack Nerd Font Mono" :size 14 :weight 'regular))
2022-12-13 23:12:11 +00:00
;; Here are some additional functions/macros that will 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
2024-03-19 20:37:52 +00:00
;; Load all *.el files in config/
(let* ((config-dir (concat doom-user-dir "config"))
(config-files (directory-files-recursively config-dir "\.el")))
(dolist (file config-files)
(load! file doom-user-dir)))
2023-09-18 04:26:46 +00:00
2024-05-17 12:02:14 +00:00
(use-package! charm-freeze)
2023-09-18 04:26:46 +00:00
;; Elfeed
(add-hook! 'elfeed-search-mode-hook #'elfeed-update)
;; Dired config
(add-hook 'dired-after-readin-hook 'dired-git-info-auto-enable)
;; Zen config
(add-hook 'writeroom-mode-enable-hook
(lambda () (display-line-numbers-mode -1)))
(add-hook 'writeroom-mode-disable-hook
(lambda () (display-line-numbers-mode)))
;; Wakatime
(global-wakatime-mode)
2023-10-31 13:54:11 +00:00
;; Formatters
(set-formatter! 'ruff '("ruff" "format" "-q" "-") :modes '(python-mode))
2024-03-30 10:47:30 +00:00
;; Tabnine
(use-package! tabnine
:hook ((prog-mode . tabnine-mode)
(kill-emacs . tabnine-kill-process))
:config
(add-to-list 'completion-at-point-functions #'tabnine-completion-at-point)
(tabnine-start-process)
:bind
(:map tabnine-completion-map
("C-y" . tabnine-accept-completion)
("M-<return>" . tabnine-accept-completion-by-line)
("C-g" . tabnine-clear-overlay)
("M-[" . tabnine-previous-completion)
("M-]" . tabnine-next-completion)))
(map!
:leader
:prefix ("t" . "toggle")
:desc "Center cursor mode" "L" #'centered-cursor-mode
2024-04-13 14:45:15 +00:00
:desc "Visual fill column mode" "C" #'visual-fill-column-mode
:prefix ("p" . "project")
:desc "Occur in Project" "O" #'projectile-multi-occur)