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.

82 lines
2.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. better-defaults
  11. cyberpunk-theme
  12. gist
  13. magit
  14. markdown-mode
  15. org
  16. org-ac
  17. org-autolist
  18. org-bullets
  19. org-doing
  20. projectile
  21. slime
  22. go-mode
  23. rust-mode
  24. yaml-mode)
  25. "Default packages")
  26. ;; Repositories
  27. (add-to-list 'package-archives
  28. '("melpa" . "http://melpa.milkbox.net/packages/") t)
  29. (setq package-archive-enable-alist '(("melpa" deft magit)))
  30. ;; Advice from the melpa site for a package dependency validation error in emacs 24
  31. ;;(defadvice package-compute-transaction
  32. ;; (before package-compute-transaction-reverse (package-list requirements) activate compile)
  33. ;; "reverse the requirements"
  34. ;; (setq requirements (reverse requirements))
  35. ;; (print requirements))
  36. ;; Make sure default packages are installed
  37. (defun sothr/packages-installed-p ()
  38. (loop for pkg in sothr/packages
  39. when (not (package-installed-p pkg)) do (return nil)
  40. finally (return t)))
  41. ;; This is the logic that runs the above function
  42. (unless (sothr/packages-installed-p)
  43. (message "%s" "Refreshing package database...")
  44. (package-refresh-contents)
  45. (dolist (pkg sothr/packages)
  46. (when (not (package-installed-p pkg))
  47. (package-install pkg))))
  48. ;; Default configuration for auto-complete
  49. (ac-config-default)
  50. ;; Make all files show a linenum
  51. (global-linum-mode)
  52. ;; Configure SLIME
  53. ;; Inferior Lisp interpreter is found at $CL_BIN
  54. (setq inferior-lisp-program (getenv "CL_BIN"))
  55. (setq slime-contribs '(slime-fancy))
  56. ;; Load my default theme
  57. (load-theme 'cyberpunk t)
  58. (custom-set-variables
  59. ;; custom-set-variables was added by Custom.
  60. ;; If you edit it by hand, you could mess it up, so be careful.
  61. ;; Your init file should contain only one such instance.
  62. ;; If there is more than one, they won't work right.
  63. '(package-selected-packages
  64. (quote
  65. (org-doing org-bullets org-autolist org-ac better-defaults yaml-mode slime rust-mode projectile markdown-mode magit go-mode gist cyberpunk-theme auto-complete))))
  66. (custom-set-faces
  67. ;; custom-set-faces was added by Custom.
  68. ;; If you edit it by hand, you could mess it up, so be careful.
  69. ;; Your init file should contain only one such instance.
  70. ;; If there is more than one, they won't work right.
  71. )