You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.4 KiB

  1. ;; Set enironment information
  2. (setq user-full-name "Drew Short")
  3. (setq user-email-address "warrick@sothr.com")
  4. ;; Load common lisp
  5. (require 'cl)
  6. ;; Package management
  7. (load "package")
  8. (package-initialize)
  9. (defvar sothr/packages '(auto-complete
  10. cyberpunk-theme
  11. gist
  12. magit
  13. markdown-mode
  14. projectile
  15. go-mode
  16. rust-mode
  17. yaml-mode)
  18. "Default packages")
  19. ;; Repositories
  20. (add-to-list 'package-archives
  21. '("melpa" . "http://melpa.milkbox.net/packages/") t)
  22. (setq package-archive-enable-alist '(("melpa" deft magit)))
  23. ;; Advice from the melpa site for a package dependency validation error in emacs 24
  24. ;;(defadvice package-compute-transaction
  25. ;; (before package-compute-transaction-reverse (package-list requirements) activate compile)
  26. ;; "reverse the requirements"
  27. ;; (setq requirements (reverse requirements))
  28. ;; (print requirements))
  29. ;; Make sure default packages are installed
  30. (defun sothr/packages-installed-p ()
  31. (loop for pkg in sothr/packages
  32. when (not (package-installed-p pkg)) do (return nil)
  33. finally (return t)))
  34. ;; This is the logic that runs the above function
  35. (unless (sothr/packages-installed-p)
  36. (message "%s" "Refreshing package database...")
  37. (package-refresh-contents)
  38. (dolist (pkg sothr/packages)
  39. (when (not (package-installed-p pkg))
  40. (package-install pkg))))
  41. ;; Default configuration for auto-complete
  42. (ac-config-default)
  43. ;; Load my default theme
  44. (load-theme 'cyberpunk t)