You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

101 lines
2.6 KiB

;; https://www.reddit.com/r/emacs/comments/53zpv9/how_do_i_get_emacs_to_stop_adding_custom_fields/
;; prevent Emacs from automatically modifying this file
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(when (file-exists-p custom-file)
(load custom-file))
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(require 'which-key)
(which-key-setup-side-window-bottom)
(setq which-key-show-early-on-C-h t)
(which-key-mode)
;;(add-to-list 'load-path "~/.emacs.d/evil")
(require 'evil)
(evil-mode 1)
(require 'evil-org)
(add-hook 'org-mode-hook 'evil-org-mode)
(evil-org-set-key-theme '(navigation insert textobjects additional calendar))
(require 'evil-org-agenda)
(evil-org-agenda-set-keys)
(setq org-startup-indented t)
(setq org-journal-dir "~/org/journal/")
(setq org-journal-date-format "%A, %d %B %Y")
(setq org-journal-file-format "%Y-%m-%d.org")
(setq org-journal-file-type "daily")
(require 'org-journal)
(require 'treemacs)
(require 'treemacs-evil)
(setq-default indent-tabs-mode nil)
(setq-default c-basic-offset 4)
(setq-default c-default-style "k&r")
(require 'evil-surround)
(global-evil-surround-mode 1)
;; better completion
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(ido-mode t)
(ido-vertical-mode t)
(global-set-key (kbd "C-x g") 'magit-status)
(require 'evil-magit)
;; display line and column number in mode line
(setq line-number-mode t)
(setq column-number-mode t)
;; display line numbers on the left
(add-hook 'prog-mode-hook #'display-line-numbers-mode)
(add-hook 'yaml-mode-hook #'display-line-numbers-mode)
;; indicate changed lines in version-controlled files
(global-diff-hl-mode)
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)
(require 'fill-column-indicator)
(add-hook 'prog-mode-hook #'fci-mode)
;; package-refresh-contents fails to refresh the 'gnu' archive and also
;; package-install can't download some packages/dependencies when TLS1.3 is
;; enabled
;; TODO: verify this and/or find a better solution
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
;; disable native dialog boxes
(setq use-dialog-box nil)
(when (bound-and-true-p tooltip-mode)
(tooltip-mode -1))
;; disable standard GUI
(menu-bar-mode 0)
(tool-bar-mode 0)
(scroll-bar-mode 0)
(setq inhibit-splash-screen t)
(require 'doom-modeline)
(doom-modeline-mode 1)
(require 'doom-themes)
(setq doom-themes-enable-bold t
doom-themes-enable-italic t)
(load-theme 'doom-one t)
(doom-themes-visual-bell-config)
(doom-themes-neotree-config)
(setq doom-themes-treemacs-theme "doom-colors")
(doom-themes-treemacs-config)
(doom-themes-org-config)