Skip to content

Instantly share code, notes, and snippets.

@svard
Last active April 1, 2016 17:00
Show Gist options
  • Save svard/03afdb9af13099609e98 to your computer and use it in GitHub Desktop.
Save svard/03afdb9af13099609e98 to your computer and use it in GitHub Desktop.
My .emacs
(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.
'(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
'(custom-enabled-themes (quote (deeper-blue))))
(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.
)
(load "package")
(package-initialize)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
;; (add-to-list 'package-archives
;; '("melpa" . "http://melpa.milkbox.net/packages/") t)
(add-to-list 'package-archives
'("melpa-stable" . "http://melpa-stable.milkbox.net/packages/") t)
(setq package-archive-enable-alist '(("melpa" deft magit)))
(defvar my-packages '(better-defaults
clojure-mode
inf-clojure
elixir-mode
auto-complete
cider
alchemist
autopair
paredit
highlight-parentheses
python-mode
js3-mode
haskell-mode
lfe-mode
rainbow-delimiters
aggressive-indent))
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p)))
(setq inhibit-splash-screen t
initial-scratch-message nil)
(setq tab-width 2
indent-tabs-mode nil)
(setq make-backup-files nil)
(require 'clojure-mode)
(setq clojure-indent-style :always-indent)
(define-clojure-indent
(-> 0)
(->> 0)
(match 1))
;;(define-key global-map (kbd "RET") 'newline-and-indent)
;;(global-set-key (kbd "RET") 'newline-and-indent)
(global-set-key (kbd "C-;") 'comment-or-uncomment-region)
(require 'paredit)
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.jsx?\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.js?\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.boot\\'" . clojure-mode))
(add-to-list 'auto-mode-alist '("\\.lfe\\'" . lfe-mode))
(add-to-list 'magic-mode-alist '(".* boot" . clojure-mode))
(setq web-mode-markup-indent-offset 2)
(setq web-mode-code-indent-offset 2)
(add-hook 'after-init-hook 'global-company-mode)
(add-hook 'clojure-mode-hook #'paredit-mode)
(add-hook 'clojure-mode-hook #'highlight-parentheses-mode)
(add-hook 'clojure-mode-hook #'rainbow-delimiters-mode)
(add-hook 'clojure-mode-hook #'aggressive-indent-mode)
(add-hook 'elixir-mode-hook (lambda () (alchemist-mode t) (autopair-mode t)))
(add-hook 'elm-mode-hook (lambda () (auto-complete-mode t) (electric-indent-local-mode -1) (autopair-mode t)))
(add-hook 'haskell-mode-hook (lambda () (auto-complete-mode t) (haskell-indentation-mode t)))
(add-hook 'REPL-mode-hook (lambda () (auto-complete-mode t)))
(add-hook 'lfe-mode-hook #'paredit-mode)
(add-hook 'lfe-mode-hook #'highlight-parentheses-mode)
(add-hook 'lfe-mode-hook #'rainbow-delimiters-mode)
(add-hook 'lfe-mode-hook #'aggressive-indent-mode)
(add-hook 'erlang-mode-hook #'auto-complete-mode)
(add-hook 'erlang-mode-hook #'autopair-mode)
(setenv "PATH" (concat (getenv "PATH") ":/home/kristofer/program/nvm/v0.10.39/bin/elm"))
(setq exec-path (append exec-path '("/home/kristofer/program/nvm/v0.10.39/bin/elm")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment