Last active
December 16, 2015 21:10
-
-
Save mrrodriguez/5498087 to your computer and use it in GitHub Desktop.
Personal Emacs configuration.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq mac-option-modifier 'control) | |
(setq mac-command-modifier 'meta) | |
;; fix the PATH variable | |
(defun set-exec-path-from-shell-PATH () | |
(let ((path-from-shell (shell-command-to-string "$SHELL -i -c 'echo $PATH'"))) | |
(setenv "PATH" path-from-shell) | |
(setq exec-path (split-string path-from-shell path-separator)))) | |
(when window-system (set-exec-path-from-shell-PATH)) | |
;; paren highlighting | |
(show-paren-mode t) | |
;; rainbow delimiters | |
;(global-rainbow-delimiters-mode 1) | |
(column-number-mode t) | |
;; dependencies | |
(add-to-list 'load-path "~/.emacs.d/elisp") | |
(autoload 'drools-mode "drools-mode") | |
(require 'package) | |
(add-to-list 'package-archives | |
'("marmalade" . "http://marmalade-repo.org/packages/")) | |
(package-initialize) | |
(defvar my-packages '(exec-path-from-shell | |
starter-kit | |
starter-kit-lisp | |
starter-kit-bindings | |
starter-kit-eshell | |
clojure-mode | |
clojure-test-mode | |
nrepl)) | |
(dolist (p my-packages) | |
(when (not (package-installed-p p)) | |
(package-install p))) | |
;; mode hooks | |
(add-to-list 'auto-mode-alist '("\\.drl\\'" . drools-mode)) | |
;; paredit | |
(add-hook 'clojure-mode-hook 'paredit-mode) | |
(add-hook 'nrepl-mode-hook 'paredit-mode) | |
(global-set-key [f7] 'paredit-mode) | |
;; clojure-mode | |
(global-set-key [f9] 'nrepl-jack-in) | |
;; nrepl | |
(add-hook 'nrepl-interaction-mode-hook 'nrepl-turn-on-eldoc-mode) | |
(setq nrepl-popup-stacktraces nil) | |
(add-to-list 'same-window-buffer-names "*nrepl*") | |
(add-hook 'nrepl-mode-hook 'paredit-mode) | |
;; Auto complete | |
(require 'auto-complete-config) | |
(ac-config-default) | |
(define-key ac-completing-map "\M-/" 'ac-stop) | |
;; ac-nrepl | |
(require 'ac-nrepl) | |
(add-hook 'nrepl-mode-hook 'ac-nrepl-setup) | |
(add-hook 'nrepl-interaction-mode-hook 'ac-nrepl-setup) | |
(eval-after-load "auto-complete" '(add-to-list 'ac-modes 'nrepl-mode)) | |
;; theme | |
(load-theme 'deeper-blue t) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(global-rainbow-delimiters-mode t)) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment