Advertisement
Guest User

Untitled

a guest
Sep 14th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 5.51 KB | None | 0 0
  1.  
  2. ;;;;
  3. ;; Packages
  4. ;;;;
  5.  
  6. ;; Define package repositories
  7. (require 'package)
  8. (add-to-list 'package-archives
  9.              '("marmalade" . "http://marmalade-repo.org/packages/") t)
  10. (add-to-list 'package-archives
  11.              '("tromey" . "http://tromey.com/elpa/") t)
  12. (add-to-list 'package-archives
  13.              '("melpa" . "http://melpa.milkbox.net/packages/") t)
  14. (add-to-list 'package-archives
  15.              '("melpa-stable" . "http://stable.melpa.org/packages/") t)
  16.  
  17. (add-to-list 'package-pinned-packages '(cider . "melpa-stable") t)
  18.  
  19. ;; (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
  20. ;;                          ("marmalade" . "http://marmalade-repo.org/packages/")
  21. ;;                          ("melpa" . "http://melpa-stable.milkbox.net/packages/")))
  22.  
  23.  
  24. ;; Load and activate emacs packages. Do this first so that the
  25. ;; packages are loaded before you start trying to modify them.
  26. ;; This also sets the load path.
  27. (package-initialize)
  28.  
  29. ;; Download the ELPA archive description if needed.
  30. ;; This informs Emacs about the latest versions of all packages, and
  31. ;; makes them available for download.
  32. (when (not package-archive-contents)
  33.   (package-refresh-contents))
  34.  
  35. ;; Define he following variables to remove the compile-log warnings
  36. ;; when defining ido-ubiquitous
  37. (defvar ido-cur-item nil)
  38. (defvar ido-default-item nil)
  39. (defvar ido-cur-list nil)
  40. (defvar predicate nil)
  41. (defvar inherit-input-method nil)
  42.  
  43. ;; The packages you want installed. You can also install these
  44. ;; manually with M-x package-install
  45. ;; Add in your own as you wish:
  46. (defvar my-packages
  47.   '(;; makes handling lisp expressions much, much easier
  48.     ;; Cheatsheet: http://www.emacswiki.org/emacs/PareditCheatsheet
  49.     paredit
  50.  
  51.     ;; key bindings and code colorization for Clojure
  52.     ;; https://github.com/clojure-emacs/clojure-mode
  53.     clojure-mode
  54.  
  55.     ;; extra syntax highlighting for clojure
  56.     clojure-mode-extra-font-locking
  57.  
  58.     ;; integration with a Clojure REPL
  59.     ;; https://github.com/clojure-emacs/cider
  60.     cider
  61.  
  62.     ;; allow ido usage in as many contexts as possible. see
  63.     ;; customizations/navigation.el line 23 for a description
  64.     ;; of ido
  65.     ido-ubiquitous
  66.  
  67.     ;; Enhances M-x to allow easier execution of commands. Provides
  68.     ;; a filterable list of possible commands in the minibuffer
  69.     ;; http://www.emacswiki.org/emacs/Smex
  70.     smex
  71.  
  72.     ;; project navigation
  73.     projectile
  74.  
  75.     ;; colorful parenthesis matching
  76.     rainbow-delimiters
  77.  
  78.     ;; edit html tags like sexps
  79.     tagedit
  80.  
  81.     ;; git integration
  82.     magit))
  83.  
  84. (require 'ac-cider)
  85. (add-hook 'cider-mode-hook 'ac-flyspell-workaround)
  86. (add-hook 'cider-mode-hook 'ac-cider-setup)
  87. (add-hook 'cider-repl-mode-hook 'ac-cider-setup)
  88. (eval-after-load "auto-complete"
  89.   '(progn
  90.      (add-to-list 'ac-modes 'cider-mode)
  91.      (add-to-list 'ac-modes 'cider-repl-mode)))
  92.  
  93. ;; On OS X, an Emacs instance started from the graphical user
  94. ;; interface will have a different environment than a shell in a
  95. ;; terminal window, because OS X does not run a shell during the
  96. ;; login. Obviously this will lead to unexpected results when
  97. ;; calling external utilities like make from Emacs.
  98. ;; This library works around this problem by copying important
  99. ;; environment variables from the user's shell.
  100. ;; https://github.com/purcell/exec-path-from-shell
  101. (if (eq system-type 'darwin)
  102.     (add-to-list 'my-packages 'exec-path-from-shell))
  103.  
  104. (dolist (p my-packages)
  105.   (when (not (package-installed-p p))
  106.     (package-install p)))
  107.  
  108.  
  109. ;; Place downloaded elisp files in ~/.emacs.d/vendor. You'll then be able
  110. ;; to load them.
  111. ;;
  112. ;; For example, if you download yaml-mode.el to ~/.emacs.d/vendor,
  113. ;; then you can add the following code to this file:
  114. ;;
  115. ;; (require 'yaml-mode)
  116. ;; (add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
  117. ;;
  118. ;; Adding this code will make Emacs enter yaml mode whenever you open
  119. ;; a .yml file
  120. (add-to-list 'load-path "~/.emacs.d/vendor")
  121.  
  122.  
  123. ;;;;
  124. ;; Customization
  125. ;;;;
  126.  
  127. ;; Add a directory to our load path so that when you `load` things
  128. ;; below, Emacs knows where to look for the corresponding file.
  129. (add-to-list 'load-path "~/.emacs.d/customizations")
  130.  
  131. ;; Sets up exec-path-from-shell so that Emacs will use the correct
  132. ;; environment variables
  133. (load "shell-integration.el")
  134.  
  135. ;; These customizations make it easier for you to navigate files,
  136. ;; switch buffers, and choose options from the minibuffer.
  137. (load "navigation.el")
  138.  
  139. ;; These customizations change the way emacs looks and disable/enable
  140. ;; some user interface elements
  141. (load "ui.el")
  142.  
  143. ;; These customizations make editing a bit nicer.
  144. (load "editing.el")
  145.  
  146. ;; Hard-to-categorize customizations
  147. (load "misc.el")
  148.  
  149. ;; For editing lisps
  150. (load "elisp-editing.el")
  151.  
  152. ;; Langauage-specific
  153. (load "setup-clojure.el")
  154. (load "setup-js.el")
  155. (custom-set-variables
  156.  ;; custom-set-variables was added by Custom.
  157.  ;; If you edit it by hand, you could mess it up, so be careful.
  158.  ;; Your init file should contain only one such instance.
  159.  ;; If there is more than one, they won't work right.
  160.  '(coffee-tab-width 2)
  161.  '(package-selected-packages
  162.    (quote
  163.     (company ac-cider tagedit smex rainbow-delimiters projectile paredit magit ido-ubiquitous exec-path-from-shell clojure-mode-extra-font-locking cider))))
  164. (custom-set-faces
  165.  ;; custom-set-faces was added by Custom.
  166.  ;; If you edit it by hand, you could mess it up, so be careful.
  167.  ;; Your init file should contain only one such instance.
  168.  ;; If there is more than one, they won't work right.
  169.  )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement