all repos — nixfiles @ c174606193cfead00e88c39f6b96ea8f09fda1ab

System and user configuration, managed by nix and home-manager

Emacs: use :ensure to download packages when needed
Alan Pearce alan@alanpearce.co.uk
Sat, 18 May 2013 12:35:20 +0100
commit

c174606193cfead00e88c39f6b96ea8f09fda1ab

parent

0c6a787848903894cc6ba692c2e93fad83eb4851

1 files changed, 19 insertions(+), 21 deletions(-)

jump to
M emacs/init.elemacs/init.el
@@ -55,28 +55,8 @@ (mapc (lambda (package-name)
         (unless (package-installed-p package-name)
           (package-install package-name)))
-      '(auto-compile
-        auto-indent-mode
-        autopair
-        ace-jump-mode
-        bind-key
-        company
-        dired+
+      '(bind-key
         diminish
-        expand-region
-        helm
-        nginx-mode
-        mic-paren
-        multiple-cursors
-        mustache-mode
-        projectile
-        project-persist
-        paredit
-        solarized-theme
-        smart-tab
-        smart-tabs-mode
-        smex
-        undo-tree
         use-package))
 
 (require 'use-package)
@@ -118,6 +98,7 @@ jit-lock-stealth-load 5       jit-lock-defer-time 0.1)
 
 (use-package solarized-theme
+  :ensure t
   :config (load-theme 'solarized-light t))
 
 (when (or (display-graphic-p)
@@ -307,12 +288,14 @@ (setq completion-styles '(basic initials partial-completion substring)       completion-ignore-case t)
 
 (use-package smart-tab
+  :ensure t
   :init (global-smart-tab-mode)
   :config (progn
             (nconc smart-tab-completion-functions-alist '((php-mode . php-complete-function)))
             (diminish 'smart-tab-mode "")))
 
 (use-package company
+  :ensure t
   :commands (company-mode)
   :bind (("C-<tab>" . company-complete))
   :init (progn
@@ -332,6 +315,7 @@ (put 'dired-find-alternate-file 'disabled nil))) 
 (use-package dired+
   :defer t
+  :ensure t
   :config (diredp-toggle-find-file-reuse-dir 1))
 
 ;;;; Documentation
@@ -436,6 +420,7 @@ tab-always-indent 'complete) 
 (use-package auto-indent-mode
   :defer t
+  :ensure t
   :commands (auto-indent-minor-mode
              auto-indent-mode)
   :config (progn
@@ -449,6 +434,7 @@ auto-indent-mode-untabify-on-yank-or-paste nil)             (auto-indent-global-mode)))
 
 (use-package smart-tabs-mode
+  :ensure t
   :commands (smart-tabs-mode
              smart-tabs-mode-enable
              smart-tabs-advice)
@@ -493,6 +479,7 @@ (use-package lacarte   :bind (("M-`" . lacarte-execute-menu-command)))
 
 (use-package helm-config
+  :ensure helm
   :bind (("C-x i"   . helm-imenu)
          ("C-x C-b" . helm-mini)))
 
@@ -511,6 +498,7 @@ (ido-initiate-auto-merge (current-buffer)))             (bind-key "C-c C-s" #'ido-manual-merge ido-file-dir-completion-map)))
 
 (use-package smex
+  :ensure t
   :bind (("M-x" . smex)
          ("<apps>" . smex)
          ("<menu>" . smex)
@@ -627,10 +615,12 @@ ;;;; Projects
 
 (use-package projectile
+  :ensure t
   :bind (("C-c C-f" . projectile-find-file))
   :commands (projectile-global-mode))
 
 (use-package project-persist
+  :ensure t
   :commands (project-persist-mode)
   :bind (("C-c P d" . project-persist-delete)
          ("C-c P f" . project-persist-find)
@@ -775,6 +765,7 @@ (when (boundp 'x-select-request-type)   (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)))
 
 (use-package ace-jump-mode
+  :ensure t
   :bind (("C-c SPC" . ace-jump-mode))
   :config (progn
             (ace-jump-mode-enable-mark-sync)
@@ -782,6 +773,7 @@ (setq ace-jump-word-mode-use-query-char nil                   ace-jump-mode-scope 'window)))
 
 (use-package autopair
+  :ensure t
   :commands (autopair-mode)
   :init (progn
           (add-hook 'prog-mode-hook #'autopair-mode)
@@ -789,12 +781,14 @@ (setq autopair-blink nil                 autopair-skip-whitespace nil)))
 
 (use-package expand-region
+  :ensure t
   :bind ("C-M-SPC" . er/expand-region))
 
 (use-package goto-chg
   :bind ("C-x C-SPC" . goto-last-change))
 
 (use-package multiple-cursors
+  :ensure t
   :bind (("C-." . mc/mark-next-like-this)
          ("C-," . mc/mark-previous-like-this)
          ("M-<f3>" . mc/mark-all-like-this-dwim)
@@ -802,6 +796,7 @@ ("C-<f3>" . mc/mark-more-like-this-extended)          ("C-S-L" . mc/edit-lines)))
 
 (use-package paredit
+  :ensure t
   :commands (paredit-mode)
   :init (progn
           (put #'paredit-forward-delete 'delete-selection 'supersede)
@@ -823,6 +818,7 @@ ("C-M-p" . smart-backward)          ("C-M-n" . smart-forward)))
 
 (use-package undo-tree
+  :ensure t
   :idle (require 'undo-tree)
   :defer t
   :config (progn
@@ -914,6 +910,7 @@ ;;;; Programming
 
 (use-package auto-compile
+  :ensure t
   :commands (auto-compile-on-save-mode)
   :init (add-hook 'emacs-lisp-mode-hook #'auto-compile-on-save-mode))
 
@@ -1007,6 +1004,7 @@ js3-square-indent-offset 4                   js3-curly-indent-offset 4)))
 
 (use-package mustache-mode
+  :ensure t
   :mode (("\\.mustache" . mustache-mode)
          ("\\.mt\\'" . mustache-mode)
          ("\\.template\\'" . mustache-mode)))