Created
November 2, 2020 17:52
-
-
Save anonimitoraf/cf33c5e768d840371ca67c1517290704 to your computer and use it in GitHub Desktop.
Minimal emacs init.el
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; --- Package-management --- | |
;; Set up package.el to work with MELPA | |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/")) | |
(package-initialize) | |
(package-refresh-contents) | |
;; --- Optimizations --- | |
(setq gc-cons-threshold 100000000) | |
(add-hook 'after-init-hook (lambda () (setq gc-cons-threshold 800000))) | |
;; --- Evil --- | |
(unless (package-installed-p 'evil) | |
(package-install 'evil)) | |
(require 'evil) | |
(evil-mode 1) | |
;; --- Projectile --- | |
(unless (package-installed-p 'projectile) | |
(package-install 'projectile)) | |
(require 'projectile) | |
(projectile-mode 1) | |
;; --- Helm --- | |
(unless (package-installed-p 'helm) | |
(package-install 'helm)) | |
(require 'helm) | |
(helm-mode 1) | |
(global-set-key (kbd "C-:") 'helm-M-x) | |
;; --- Convenience ---- | |
(fset 'yes-or-no-p 'y-or-n-p) | |
(unless (package-installed-p 'which-key) | |
(package-install 'which-key)) | |
(require 'which-key) | |
(which-key-mode 1) | |
;; --- Preferences --- | |
(setq-default tab-width 2 | |
indent-tabs-mode nil) | |
;; --- Flycheck --- | |
(unless | |
(package-installed-p 'flycheck) | |
(package-install 'flycheck)) | |
(unless | |
(package-installed-p 'flycheck-posframe) | |
(package-install 'flycheck-posframe)) | |
(with-eval-after-load 'flycheck | |
(require 'flycheck-posframe) | |
(add-hook 'flycheck-mode-hook #'flycheck-posframe-mode)) | |
(require 'flycheck) | |
(global-flycheck-mode 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment