dotfiles/emacs.d/init.el
2022-06-05 21:40:09 -06:00

94 lines
2.3 KiB
EmacsLisp

;;; package --- Rawley Fowler's init.el
;;; Commentary:
;;; I used Vim for quite a few years, but evil mode Emacs
;;; is so much nicer.
;;; Code:
(menu-bar-mode -1)
(scroll-bar-mode -1)
(tool-bar-mode -1)
(set-language-environment "UTF-8")
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(transient-mark-mode)
(show-paren-mode 1)
(defalias 'yes-or-no-p 'y-or-n-p)
(require 'package)
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(eval-and-compile
(setq use-package-always-ensure t
use-package-expand-minimally t))
(require 'use-package)
;; Misc Packages
(use-package restart-emacs)
;; Theme
(use-package modus-themes
:init
(setq modus-themes-italic-constructs t
modus-themes-bold-constructs nil
modus-themes-region '(bg-only no-extend))
(modus-themes-load-themes)
:config
(modus-themes-load-operandi)
:bind
("<f5>" . modus-themes-toggle))
;; Evil.
(use-package evil
:ensure t
:init
(setq evil-want-integration t)
(setq evil-want-keybinding nil)
(setq evil-vsplit-window-right t)
(setq evil-split-window-below t)
(evil-mode))
(defun save-and-kill-this-buffer ()
(interactive)
(save-buffer)
(kill-current-buffer))
(use-package evil-collection
:after evil
:ensure t
:config
(evil-collection-init))
(use-package evil-org)
;; Other configs
(load-file "~/.emacs.d/lsp.el")
(load-file "~/.emacs.d/modes.el")
(load-file "~/.emacs.d/extra.el")
(load-file "~/.emacs.d/bind.el")
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(helm-minibuffer-history-key "M-p")
'(package-selected-packages '(evil-org evil-collection evil use-package)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;;; init.el ends here