Last active
August 29, 2015 14:27
-
-
Save wfaler/bd0a19a4d7d404f0f0e5 to your computer and use it in GitHub Desktop.
OSX init.el
This file contains hidden or 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
(require 'package) | |
(setq package-list '(markdown-mode | |
yaml-mode | |
js2-mode | |
jsx-mode | |
find-file-in-project | |
auto-complete | |
nix-mode | |
dockerfile-mode | |
scala-mode2 | |
haskell-mode | |
solarized-theme | |
;; flycheck | |
;; flycheck-haskell | |
hi2 | |
)) | |
(add-to-list 'package-archives | |
'("melpa" . "http://melpa.milkbox.net/packages/") t) | |
;; activate all the packages (in particular autoloads) | |
(package-initialize) | |
;; fetch the list of packages available | |
(unless package-archive-contents | |
(package-refresh-contents)) | |
;; install the missing packages | |
(dolist (package package-list) | |
(unless (package-installed-p package) | |
(package-install package))) | |
(when (not package-archive-contents) | |
(package-refresh-contents)) | |
;; NO FRILLS | |
(dolist (mode '(menu-bar-mode tool-bar-mode scroll-bar-mode)) | |
(when (fboundp mode) (funcall mode -1))) | |
(setq inhibit-startup-screen t) | |
;; NO JUNK | |
(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t)) | |
backup-directory-alist `((".*" . ,temporary-file-directory))) | |
;; HASKELL | |
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode) | |
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation) | |
(add-hook 'haskell-mode-hook 'turn-on-hi2) | |
(custom-set-variables '(haskell-process-type 'cabal-repl)) | |
(custom-set-variables | |
'(haskell-process-suggest-remove-import-lines t) | |
'(haskell-process-auto-import-loaded-modules t) | |
'(haskell-process-log t)) | |
(eval-after-load 'haskell-mode '(progn | |
(define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload) | |
(define-key haskell-mode-map (kbd "C-c C-z") 'haskell-interactive-switch) | |
(define-key haskell-mode-map (kbd "C-c C-n C-t") 'haskell-process-do-type) | |
(define-key haskell-mode-map (kbd "C-c C-n C-i") 'haskell-process-do-info) | |
(define-key haskell-mode-map (kbd "C-c C-n C-c") 'haskell-process-cabal-build) | |
(define-key haskell-mode-map (kbd "C-c C-n c") 'haskell-process-cabal) | |
(define-key haskell-mode-map (kbd "SPC") 'haskell-mode-contextual-space))) | |
(eval-after-load 'haskell-cabal '(progn | |
(define-key haskell-cabal-mode-map (kbd "C-c C-z") 'haskell-interactive-switch) | |
(define-key haskell-cabal-mode-map (kbd "C-c C-k") 'haskell-interactive-mode-clear) | |
(define-key haskell-cabal-mode-map (kbd "C-c C-c") 'haskell-process-cabal-build) | |
(define-key haskell-cabal-mode-map (kbd "C-c c") 'haskell-process-cabal))) | |
;; END HASKELL | |
;;(require 'scala-mode2) | |
;;(add-hook 'scala-mode-hook 'ensime-scala-mode-hook) | |
(column-number-mode) | |
(setq-default indent-tabs-mode nil) | |
(define-key global-map (kbd "RET") 'newline-and-indent) | |
;;(load-theme 'solarized-dark t) | |
(require 'js2-mode) | |
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) | |
(add-to-list 'auto-mode-alist '("\\.jsx$" . jsx-mode)) | |
(add-to-list 'auto-mode-alist '("\\.tpl$\\'" . html-mode)) | |
;;(add-to-list 'auto-mode-alist '("\\.purs$" . haskell-mode)) | |
;;(custom-set-variables | |
;; '(js2-basic-offset 2) | |
;; '(js2-bounce-indent-p t) | |
;;) | |
;;(global-set-key (kbd "C-x f") 'find-file-in-project) | |
(load-theme 'solarized-dark t) | |
;; OSX specific | |
(defun set-exec-path-from-shell-PATH () | |
(let ((path-from-shell (replace-regexp-in-string | |
"[ \t\n]*$" | |
"" | |
(shell-command-to-string "$SHELL --login -i -c 'echo $PATH'")))) | |
(setenv "PATH" path-from-shell) | |
(setq eshell-path-env path-from-shell) ; for eshell users | |
(setq exec-path (split-string path-from-shell path-separator)))) | |
(when window-system (set-exec-path-from-shell-PATH)) | |
(global-set-key (kbd "M-3") '(lambda () (interactive) (insert "#"))) | |
(set-frame-parameter | |
nil 'fullscreen | |
(when (not (frame-parameter nil 'fullscreen)) 'fullboth)) | |
(set-face-attribute 'default nil :height 110) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment