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.

87 lines
2.5 KiB

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