Last active
December 17, 2018 12:11
-
-
Save wfaler/b56e36a4cac89f7697d45e82293acf4b to your computer and use it in GitHub Desktop.
Latest init.el, updated for Haskell and engine
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
(require 'package) | |
(setq package-list '(markdown-mode | |
yaml-mode | |
rjsx-mode | |
elm-mode | |
typescript-mode | |
json-mode | |
dhall-mode | |
php-mode | |
projectile | |
helm-projectile | |
auto-complete | |
nix-mode | |
dockerfile-mode | |
ensime | |
scala-mode | |
haskell-mode | |
solarized-theme | |
go-mode | |
go-autocomplete | |
intero | |
neotree | |
)) | |
(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))) | |
(require 'go-autocomplete) | |
(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 'intero-mode) | |
(column-number-mode) | |
(setq-default indent-tabs-mode nil) | |
(define-key global-map (kbd "RET") 'newline-and-indent) | |
(require 'js2-mode) | |
(add-to-list 'auto-mode-alist '("\\.js$" . rjsx-mode)) | |
(add-to-list 'auto-mode-alist '("\\.jsx$" . rjsx-mode)) | |
(add-to-list 'auto-mode-alist '("\\.tpl$\\'" . html-mode)) | |
(add-to-list 'auto-mode-alist '("\\.purs$" . haskell-mode)) | |
(require 'neotree) | |
(global-set-key [f8] 'neotree-toggle) | |
(global-set-key "\C-x\C-x" 'helm-projectile) | |
(global-set-key "\C-x\g" 'rgrep) | |
;;(global-set-key "\C-x\C-a" 'projectile-find-file) | |
(setq projectile-mode-line | |
'(:eval (if (projectile-project-p) | |
(format " Projectile[%s]" | |
(projectile-project-name)) | |
""))) | |
(setq default-tab-width 2) | |
;;(set-frame-parameter | |
;; nil 'fullscreen | |
;; (when (not (frame-parameter nil 'fullscreen)) 'fullboth)) | |
(set-face-attribute 'default nil :height 110) | |
(if (display-graphic-p) | |
(load-theme 'solarized-dark 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. | |
'(package-selected-packages | |
(quote | |
(dhall-mode auto-complete-mode go-flymake goflymake go-autocomplete typescript-mode ## go-mode terraform-mode yaml-mode solarized-theme rjsx-mode php-mode nix-mode neotree markdown-mode json-mode intero helm-projectile ensime elm-mode dockerfile-mode auto-complete)))) | |
;; 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. ) | |
(require 'go-autocomplete) | |
(require 'auto-complete-config) | |
(ac-config-default) | |
(defun kill-whitespace () | |
"Kill the whitespace between two non-whitespace characters" | |
(interactive "*") | |
(save-excursion | |
(save-restriction | |
(save-match-data | |
(progn | |
(re-search-backward "[^ \t\r\n]" nil t) | |
(re-search-forward "[ \t\r\n]+" nil t) | |
(replace-match "" nil nil)))))) | |
(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