(require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (package-initialize) (package-refresh-contents) (defvar my-packages '( lispy smartparens which-key git-gutter rainbow-delimiters auto-complete-distel auto-complete evil magit base16-theme evil-collection undo-tree which-key )) (dolist (p my-packages) (when (not (package-installed-p p)) (package-install p))) (load-theme 'base16-oceanicnext t) (which-key-mode) (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. '(package-selected-packages '(lispy smartparens which-key git-gutter rainbow-delimiters auto-complete-distel auto-complete evil magit evil-magit)) '(undo-tree-auto-save-history t) '(undo-tree-history-directory-alist '(("." . "~/.undohist-emacs"))) '(undo-tree-visualizer-diff t) '(undo-tree-visualizer-timestamps t)) (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. ) ;; Undo-tree (global-undo-tree-mode) ;; Autocomplete (require 'auto-complete) (global-auto-complete-mode t) ;; EVIL (setq evil-want-keybinding nil) (require 'evil) (evil-collection-init) (evil-set-leader 'normal (kbd "SPC")) (evil-define-key 'normal 'global (kbd "C-k") 'evil-scroll-up) (evil-define-key 'normal 'global (kbd "C-j") 'evil-scroll-down) (evil-define-key 'normal 'global (kbd "l") 'evil-window-right) (evil-define-key 'normal 'global (kbd "h") 'evil-window-left) (evil-define-key 'normal 'global (kbd "j") 'evil-window-up) (evil-define-key 'normal 'global (kbd "k") 'evil-window-down) (evil-define-key 'normal 'global (kbd "i") 'help) (evil-mode 1) ;; Rainbow Delims (add-hook 'prog-mode-hook #'rainbow-delimiters-mode) (show-paren-mode) ;; Git gutter (global-git-gutter-mode +1) ;; smartparens (require 'smartparens-config) (add-hook 'prog-mode-hook #'smartparens-mode ) (setq cider-font-lock-dynamically '(macro core function var)) ;; These don't work yet? ;; (define-key evil-insert-state-map (kbd "C-\\") 'cider-eval-defun-up-to-point) ;; (define-key evil-normal-state-map (kbd "C-\\") 'cider-eval-defun-up-to-point) ;; Extra things ; (global-whitespace-mode 1) ; (progn ;; Make whitespace-mode with very basic background coloring for whitespaces. ;; http://ergoemacs.org/emacs/whitespace-mode.html ; (setq whitespace-style (quote (face spaces tabs newline space-mark tab-mark newline-mark ))) ;; Make whitespace-mode and whitespace-newline-mode use “¶” for end of line char and “▷” for tab. ; (setq whitespace-display-mappings ;; all numbers are unicode codepoint in decimal. e.g. (insert-char 182 1) ; (quote ( ; (space-mark 32 [183] [46]) ; SPACE 32 「 」, 183 MIDDLE DOT 「·」, 46 FULL STOP 「.」 ; (newline-mark 10 [182 10]) ; LINE FEED, ; (tab-mark 9 [8614]) ; tab ; ) ; ) ; ) ; )