diff options
author | Vincent Ambo <mail@tazj.in> | 2018-06-22T08·29+0200 |
---|---|---|
committer | Vincent Ambo <github@tazj.in> | 2019-02-10T20·43+0100 |
commit | 4fe8d78dbb16dbec2b8c173a5142b4b14927fd28 (patch) | |
tree | 481bd47ba446167088f846f9eeb383a847dc7d86 /init/modes.el | |
parent | f0dfc8b06de568e57050510a5b56fcbb725a6733 (diff) |
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.
Diffstat (limited to 'init/modes.el')
-rw-r--r-- | init/modes.el | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/init/modes.el b/init/modes.el index d9a27c52a411..19ed2a684349 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) |