From 4fe8d78dbb16dbec2b8c173a5142b4b14927fd28 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 22 Jun 2018 10:29:31 +0200 Subject: refactor: Begin moving package configuration to use-package This is the first in a series of commits for refactoring my configuration to make use of jwiegley's use-package. In the previous layout of the configuration there were some questions around what settings go into which file, but in the end it is all just related to which packages are being configured (besides settings related to global Emacs behaviour). This commit introduces use-package forms for all currently used packages (which are still installed via Nix, not via package.el) but does not yet clean up the rest of the configuration in a suitable way. Note that this version introduces a bug in which the configuration of telephone line is not correctly initialised after package setup. --- init/modes.el | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'init/modes.el') diff --git a/init/modes.el b/init/modes.el index d9a27c52a4..19ed2a6843 100644 --- a/init/modes.el +++ b/init/modes.el @@ -1,14 +1,6 @@ ;; Initializes modes I use. (add-hook 'prog-mode-hook 'esk-add-watchwords) -(add-hook 'prog-mode-hook 'idle-highlight-mode) - -;; Configure markdown-mode -(autoload 'markdown-mode "markdown-mode" - "Major mode for editing Markdown files" t) -(add-to-list 'auto-mode-alist '("\\.txt\\'" . markdown-mode)) -(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode)) -(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode)) ;; Use auto-complete as completion at point (defun set-auto-complete-as-completion-at-point-function () @@ -17,35 +9,18 @@ (add-hook 'auto-complete-mode-hook 'set-auto-complete-as-completion-at-point-function) -;; Configure Erlang mode - -(defun erlang-mode-init-setup () - (interactive) - ;; Don't indent after '>' while I'm writing - (local-set-key ">" 'self-insert-command) - ;;(local-set-key "RET" 'newline) - (rainbow-delimiters-mode 1) - ) - -(add-hook 'erlang-mode-hook 'erlang-mode-init-setup) - ;; Enable rainbow-delimiters for all things programming (add-hook 'prog-mode-hook 'rainbow-delimiters-mode) ;; Enable Paredit & Company in Emacs Lisp mode -(add-hook 'emacs-lisp-mode-hook 'paredit-mode) (add-hook 'emacs-lisp-mode-hook 'company-mode) ;; Always highlight matching brackets (show-paren-mode 1) ;; Always auto-close parantheses and other pairs -(electric-pair-mode) - -;; Represent undo-history as an actual tree (visualize with C-x u) -(setq undo-tree-mode-lighter "") -(require 'undo-tree) -(global-undo-tree-mode) +;; (replaced by smartparens) +;; (electric-pair-mode) ;; Keep track of recent files (recentf-mode) @@ -57,9 +32,5 @@ (auto-compression-mode t) ;; Show available key chord completions -(which-key-mode t) - -;; Show previews of ace-window numbers in the mode line for each window. -(ace-window-display-mode) (provide 'modes) -- cgit 1.4.1