Created
June 21, 2017 14:44
-
-
Save stuarth/7cd30d690dd58eeee9a45e3ca37ae57c to your computer and use it in GitHub Desktop.
stu emacs conf
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
| (setq mac-command-modifier 'meta) | |
| (scroll-bar-mode -1) | |
| (global-set-key (kbd "M-x") 'smex) | |
| (global-set-key (kbd "M-X") 'smex-major-mode-commands) | |
| (global-set-key (kbd "C-x b") 'ido-switch-buffer) | |
| (require 'ido) | |
| (ido-mode t) | |
| (flx-ido-mode) | |
| (require 'package) | |
| (add-to-list 'package-archives | |
| '("melpa-stable" . "http://stable.melpa.org/packages/") t) | |
| ;; (add-to-list 'package-archives | |
| ;; '("melpa" . "http://melpa.milkbox.net/packages/")) | |
| (package-initialize) | |
| (when (null package-archive-contents) | |
| (package-refresh-contents)) | |
| (defvar my-packages '(company | |
| paredit | |
| ;;clojure-mode | |
| ;;clojurescript-mode | |
| haskell-mode | |
| flx-ido | |
| smex | |
| less-css-mode | |
| rainbow-delimiters | |
| rainbow-identifiers) | |
| "Default packages") | |
| (dolist (p my-packages) | |
| (when (not (package-installed-p p)) | |
| (package-install p))) | |
| (require 'cider) | |
| (add-hook 'cider-mode-hook #'eldoc-mode) | |
| (setq cider-prefer-local-resources t) | |
| (global-company-mode) | |
| (add-hook 'cider-repl-mode-hook #'subword-mode) | |
| (add-hook 'cider-repl-mode-hook #'paredit-mode) | |
| (add-hook 'cider-repl-mode-hook #'rainbow-delimiters-mode) | |
| (setq backup-directory-alist `(("." . "~/.saves"))) | |
| (add-hook 'cider-repl-mode-hook 'subword-mode) | |
| (add-hook 'clojure-mode-hook 'subword-mode) | |
| (add-hook 'clojure-mode-hook 'paredit-mode) | |
| (add-hook 'cider-repl-mode-hook 'paredit-mode) | |
| ;; less | |
| (add-to-list 'auto-mode-alist '("\\.less\\'" . less-css-mode)) | |
| ;; pixie | |
| (add-to-list 'auto-mode-alist '("\\.pxi\\'" . clojure-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.pxi\\'" . rainbow-identifiers-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.pxi\\'" . paredit-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)) | |
| (add-to-list 'auto-mode-alist '("\\.cljc" . clojurec-mode)) | |
| (defun chomp (str) | |
| "Chomp leading and tailing whitespace from STR." | |
| (while (string-match "\\`\n+\\|^\\s-+\\|\\s-+$\\|\n+\\'" | |
| str) | |
| (setq str (replace-match "" t t str))) | |
| str) | |
| (global-company-mode) | |
| (setq save-interprogram-paste-before-kill nil) | |
| (global-undo-tree-mode 1) | |
| ;; haskell | |
| (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation) | |
| (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 | |
| ["#3F3F3F" "#CC9393" "#7F9F7F" "#F0DFAF" "#8CD0D3" "#DC8CC3" "#93E0E3" "#DCDCCC"]) | |
| '(custom-safe-themes | |
| (quote | |
| ("f5512c02e0a6887e987a816918b7a684d558716262ac7ee2dd0437ab913eaec6" "8db4b03b9ae654d4a57804286eb3e332725c84d7cdab38463cb6b97d5762ad26" default))) | |
| '(fci-rule-color "#383838") | |
| '(haskell-process-auto-import-loaded-modules t) | |
| '(haskell-process-log t) | |
| '(haskell-process-suggest-remove-import-lines t) | |
| '(haskell-process-type (quote cabal-repl)) | |
| '(nrepl-message-colors | |
| (quote | |
| ("#CC9393" "#DFAF8F" "#F0DFAF" "#7F9F7F" "#BFEBBF" "#93E0E3" "#94BFF3" "#DC8CC3"))) | |
| '(package-selected-packages | |
| (quote | |
| (rust-playground toml-mode yasnippet nand2tetris nand2tetris-assembler color-theme-solarized sass-mode yaml-mode cargo flycheck-rust racer rust-mode rustfmt php-mode markdown-mode zop-to-char zenburn-theme which-key volatile-highlights vkill undo-tree smex smartrep smartparens smart-mode-line scss-mode rainbow-identifiers rainbow-delimiters projectile paredit ov operate-on-number move-text magit less-css-mode json-mode js2-mode imenu-anywhere haskell-mode guru-mode grizzl god-mode gitignore-mode gitconfig-mode git-timemachine gist flycheck flx-ido expand-region exec-path-from-shell easy-kill dockerfile-mode discover-my-major diminish diff-hl csv-mode crux company cider browse-kill-ring beacon anzu ace-window))) | |
| '(pdf-view-midnight-colors (quote ("#DCDCCC" . "#383838"))) | |
| '(vc-annotate-background "#2B2B2B") | |
| '(vc-annotate-color-map | |
| (quote | |
| ((20 . "#BC8383") | |
| (40 . "#CC9393") | |
| (60 . "#DFAF8F") | |
| (80 . "#D0BF8F") | |
| (100 . "#E0CF9F") | |
| (120 . "#F0DFAF") | |
| (140 . "#5F7F5F") | |
| (160 . "#7F9F7F") | |
| (180 . "#8FB28F") | |
| (200 . "#9FC59F") | |
| (220 . "#AFD8AF") | |
| (240 . "#BFEBBF") | |
| (260 . "#93E0E3") | |
| (280 . "#6CA0A3") | |
| (300 . "#7CB8BB") | |
| (320 . "#8CD0D3") | |
| (340 . "#94BFF3") | |
| (360 . "#DC8CC3")))) | |
| '(vc-annotate-very-old-color "#DC8CC3")) | |
| (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))) | |
| ;; (require 'prelude-helm-everywhere) | |
| (setq helm-M-x-fuzzy-match t) | |
| ;; log cider msgs | |
| ;; (setq nrepl-log-messages t) | |
| (add-hook 'cider-repl-mode-hook | |
| (lambda () | |
| (define-key cider-repl-mode-map (kbd "C-c M-o") 'cider-repl-clear-buffer) | |
| (define-key cider-repl-mode-map (kbd "C-c M-l") 'cider-repl-switch-to-other))) | |
| (setq cider-repl-display-help-banner nil) | |
| (set-face-attribute 'default nil :family "Ubuntu Mono") | |
| (set-face-attribute 'default nil :height 110) | |
| ;;(set-default-font "Ubunto Mono") | |
| (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. | |
| ) | |
| (setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) | |
| (add-hook 'rust-mode-hook #'racer-mode) | |
| (add-hook 'racer-mode-hook #'eldoc-mode) | |
| (add-hook 'racer-mode-hook #'company-mode) | |
| (require 'rust-mode) | |
| (define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common) | |
| (setq company-tooltip-align-annotations t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment