Skip to content

Instantly share code, notes, and snippets.

@thoferon
Last active December 22, 2015 20:59
Show Gist options
  • Save thoferon/6530578 to your computer and use it in GitHub Desktop.
Save thoferon/6530578 to your computer and use it in GitHub Desktop.
Emacs configuration
;; Packages required :
;; jujube-theme
;; haskell-mode
;; ghc
(require 'package)
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))
(package-initialize)
(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.
'(custom-safe-themes (quote ("84f201d2ef04c89597d0398f094fa81c1fd077f4b211a91df57787cfaabff48d" default))))
(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-theme 'jujube)
(setq-default indent-tabs-mode nil)
(require 'haskell-mode)
(require 'auto-complete)
(require 'haskell-indent)
(autoload 'ghc-init "ghc" nil t)
;; Haskell-related configuration
(defun my-haskell-config ()
(turn-on-haskell-indent)
(auto-complete-mode)
(ghc-init)
(linum-mode)
(global-set-key (kbd "C-c =") 'haskell-indent-insert-equal)
(global-set-key (kbd "C-c |") 'haskell-indent-insert-guard)
(global-set-key (kbd "C-c .") 'haskell-indent-align-guards-and-rhs)
(global-set-key (kbd "C-c C-f") 'flymake-mode))
(custom-set-variables
'(haskell-mode-hook '(my-haskell-config)))
(menu-bar-mode -1)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(global-set-key (kbd "C-x <up>") 'windmove-up)
(global-set-key (kbd "C-x <down>") 'windmove-down)
(global-set-key (kbd "C-x <right>") 'windmove-right)
(global-set-key (kbd "C-x <left>") 'windmove-left)
(setq linum-format "%3d ")
(custom-set-faces
'(default ((t (:background "nil"))))
'(flymake-errline ((t (:background "black" :foreground "red" :weight bold))))
'(flymake-warnline ((t (:background "black" :foreground "brightcyan" :weight bold))))
'(proof-locked-face ((t (:background "color-234" :underline nil)))))
;; Coq-related configuration
(load-file "/home/vagrant/root/ProofGeneral/generic/proof-site.el")
;; Coffeescript-related configuration
(add-to-list 'load-path "~/.emacs.d/vendor/coffee-mode")
(require 'coffee-mode)
(setq whitespace-action '(auto-cleanup))
(setq whitespace-style '(trailing space-before-tab indentation empty space-after-tab))
(custom-set-variables '(coffee-tab-width 2))
(add-hook 'ruby-mode-hook (lambda () (linum-mode) (auto-complete-mode)))
(add-hook 'coffee-mode-hook (lambda () (linum-mode) (auto-complete-mode)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment