Skip to content

Instantly share code, notes, and snippets.

@anonimitoraf
Created November 2, 2020 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonimitoraf/cf33c5e768d840371ca67c1517290704 to your computer and use it in GitHub Desktop.
Save anonimitoraf/cf33c5e768d840371ca67c1517290704 to your computer and use it in GitHub Desktop.
Minimal emacs init.el
;; --- 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