summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--emacs.d/config/config-set-path.el9
-rw-r--r--emacs.d/config/fcuny-appearance.el22
-rw-r--r--emacs.d/config/fcuny-basic-settings.el38
-rw-r--r--emacs.d/config/fcuny-basic-settings.el~9
-rw-r--r--emacs.d/config/fcuny-common.el (renamed from emacs.d/config/config-lib.el)11
-rw-r--r--emacs.d/config/fcuny-company.el (renamed from emacs.d/modules/module-autocomplete.el)17
-rw-r--r--emacs.d/config/fcuny-darwin.el14
-rw-r--r--emacs.d/config/fcuny-dired.el15
-rw-r--r--emacs.d/config/fcuny-docker.el7
-rw-r--r--emacs.d/config/fcuny-editor.el55
-rw-r--r--emacs.d/config/fcuny-elisp.el13
-rw-r--r--emacs.d/config/fcuny-flyspell.el9
-rw-r--r--emacs.d/config/fcuny-go.el35
-rw-r--r--emacs.d/config/fcuny-ibuffer.el26
-rw-r--r--emacs.d/config/fcuny-json.el11
-rw-r--r--emacs.d/config/fcuny-magit.el29
-rw-r--r--emacs.d/config/fcuny-make.el9
-rw-r--r--emacs.d/config/fcuny-markdown.el (renamed from emacs.d/modules/module-markdown.el)9
-rw-r--r--emacs.d/config/fcuny-pants.el15
-rw-r--r--emacs.d/config/fcuny-paren.el13
-rw-r--r--emacs.d/config/fcuny-project.el (renamed from emacs.d/modules/module-ivy.el)52
-rw-r--r--emacs.d/config/fcuny-protobuf.el8
-rw-r--r--emacs.d/config/fcuny-puppet.el12
-rw-r--r--emacs.d/config/fcuny-python.el12
-rw-r--r--emacs.d/config/fcuny-rust.el24
-rw-r--r--emacs.d/config/fcuny-scala.el6
-rw-r--r--emacs.d/config/fcuny-shell.el (renamed from emacs.d/modules/module-shell.el)5
-rw-r--r--emacs.d/config/fcuny-thrift.el (renamed from emacs.d/modules/module-thrift.el)6
-rw-r--r--emacs.d/config/fcuny-vars.el35
-rw-r--r--emacs.d/config/fcuny-yaml.el9
-rw-r--r--emacs.d/init.el136
-rw-r--r--emacs.d/modules/module-appareance.el59
-rw-r--r--emacs.d/modules/module-c.el5
-rw-r--r--emacs.d/modules/module-codestyle.el18
-rw-r--r--emacs.d/modules/module-dired.el17
-rw-r--r--emacs.d/modules/module-docker.el14
-rw-r--r--emacs.d/modules/module-editing.el15
-rw-r--r--emacs.d/modules/module-flycheck.el11
-rw-r--r--emacs.d/modules/module-flyspell.el18
-rw-r--r--emacs.d/modules/module-general.el58
-rw-r--r--emacs.d/modules/module-git.el41
-rw-r--r--emacs.d/modules/module-go.el52
-rw-r--r--emacs.d/modules/module-hydra.el5
-rw-r--r--emacs.d/modules/module-ibuffer.el42
-rw-r--r--emacs.d/modules/module-java.el69
-rw-r--r--emacs.d/modules/module-javascript.el10
-rw-r--r--emacs.d/modules/module-json.el20
-rw-r--r--emacs.d/modules/module-lisp.el14
-rw-r--r--emacs.d/modules/module-make.el8
-rw-r--r--emacs.d/modules/module-pants.el28
-rw-r--r--emacs.d/modules/module-project.el63
-rw-r--r--emacs.d/modules/module-protobuf.el4
-rw-r--r--emacs.d/modules/module-puppet.el7
-rw-r--r--emacs.d/modules/module-python.el20
-rw-r--r--emacs.d/modules/module-rust.el18
-rw-r--r--emacs.d/modules/module-scala.el3
-rw-r--r--emacs.d/modules/module-toml.el3
-rw-r--r--emacs.d/modules/module-yaml.el5
58 files changed, 532 insertions, 766 deletions
diff --git a/emacs.d/config/config-set-path.el b/emacs.d/config/config-set-path.el
deleted file mode 100644
index a22416d..0000000
--- a/emacs.d/config/config-set-path.el
+++ /dev/null
@@ -1,9 +0,0 @@
-(paradox-require 'exec-path-from-shell)
-
-(when (memq window-system '(x mac ns))
-  (exec-path-from-shell-initialize)
-  (dolist (var '("GEM_HOME" "GEM_PATH" "MY_RUBY_HOME"))
-    (unless (getenv var)
-      (exec-path-from-shell-copy-env var))))
-
-(provide 'config-set-path)
diff --git a/emacs.d/config/fcuny-appearance.el b/emacs.d/config/fcuny-appearance.el
new file mode 100644
index 0000000..5c65374
--- /dev/null
+++ b/emacs.d/config/fcuny-appearance.el
@@ -0,0 +1,22 @@
+(eval-when-compile
+  (require 'use-package))
+
+;; Set default font.
+(set-face-attribute 'default nil :height 130 :weight 'normal :width 'normal)
+
+(use-package tool-bar
+  :config
+  (tool-bar-mode -1))
+
+(use-package scroll-bar
+  :config
+  (scroll-bar-mode -1))
+
+(use-package frame
+  :bind ("<s-return>" . toggle-frame-fullscreen)
+  :config
+  (blink-cursor-mode -1)
+  (when (eq system-type 'darwin)
+    (setq ns-use-native-fullscreen nil)))
+
+(provide 'fcuny-appearance)
diff --git a/emacs.d/config/fcuny-basic-settings.el b/emacs.d/config/fcuny-basic-settings.el
new file mode 100644
index 0000000..fe05241
--- /dev/null
+++ b/emacs.d/config/fcuny-basic-settings.el
@@ -0,0 +1,38 @@
+(eval-when-compile
+  (require 'use-package))
+
+;; set utf-8 as the default encoding
+(prefer-coding-system 'utf-8-unix)
+(set-terminal-coding-system 'utf-8)
+(set-keyboard-coding-system 'utf-8)
+
+;; alias yes-or-no to y-or-n
+(fset 'yes-or-no-p 'y-or-n-p)
+
+(setq auto-save-default nil)                   ;; don't auto save files
+(setq auto-save-list-file-prefix nil)          ;; no backups
+(setq create-lockfiles nil)                    ;; don't use a lock file
+(setq custom-file fcuny-custom-settings)       ;; where to save custom settings
+(setq inhibit-startup-message t)               ;; Skip the default splash screen
+(setq inhibit-startup-screen t)                ;; I don't want a startup screen
+(setq make-backup-files nil)                   ;; really no backups
+(setq minibuffer-message-timeout 0.5)          ;; How long to display an echo-area message
+(setq next-screen-context-lines 5)             ;; scroll 5 lines at a time
+(setq require-final-newline t)                 ;; ensure newline exists at the end of the file
+(setq ring-bell-function 'ignore)              ;; really no bell
+(setq tab-always-indent 'complete)             ;; when using TAB, always indent
+(setq visible-bell nil)                        ;; no bell
+
+(setq-default indent-tabs-mode nil)            ;; turn off tab indentation
+(setq-default cursor-type 'hbar)               ;; cursor is a horizontal bar
+
+;; size of the fringe
+(fringe-mode '(8 . 8))
+
+;; show column number in the mode line
+(setq column-number-mode t)
+
+;; Remap join-line to M-j where it's easier to get to.
+(global-set-key (kbd "M-j") 'join-line)
+
+(provide 'fcuny-basic-settings)
diff --git a/emacs.d/config/fcuny-basic-settings.el~ b/emacs.d/config/fcuny-basic-settings.el~
new file mode 100644
index 0000000..2dab7f0
--- /dev/null
+++ b/emacs.d/config/fcuny-basic-settings.el~
@@ -0,0 +1,9 @@
+;; set utf-8 as the default encoding
+(prefer-coding-system 'utf-8-unix)
+(set-terminal-coding-system 'utf-8)
+(set-keyboard-coding-system 'utf-8)
+
+;; alias yes-or-no to y-or-n
+(fset 'yes-or-no-p 'y-or-n-p)
+
+(provide 'fcuny-basic-settings)
diff --git a/emacs.d/config/config-lib.el b/emacs.d/config/fcuny-common.el
index 8896d2f..61a2829 100644
--- a/emacs.d/config/config-lib.el
+++ b/emacs.d/config/fcuny-common.el
@@ -1,4 +1,3 @@
-;; rename a buffer
 (defun fc/rename-this-buffer-and-file ()
   "Renames current buffer and file it is visiting."
   (interactive)
@@ -17,16 +16,14 @@
                (set-buffer-modified-p nil)
                (message "File '%s' successfully renamed to '%s'" name (file-name-nondirectory new-name))))))))
 
-
-;; predicate for checking style only on python files
 (defun fc/check-source-p ()
   "Finds if the current python file is in the `source' repository."
   (and (executable-find "check.pex")
        (buffer-file-name)
        (string-match "src/source/.*\.py$" (buffer-file-name))))
 
-(defun fc/check-gcp-puppet-p ()
-  "Finds if the current file is in GCP's puppet repository."
-  (string-match "gcp-puppet-manifest/.*$" (buffer-file-name)))
+(defun fc/check-work-machine-p ()
+  "Returns t if this is a work machine"
+  (string-match "tw-mbp.*" (system-name)))
 
-(provide 'config-lib)
+(provide 'fcuny-common)
diff --git a/emacs.d/modules/module-autocomplete.el b/emacs.d/config/fcuny-company.el
index abbf162..62e06de 100644
--- a/emacs.d/modules/module-autocomplete.el
+++ b/emacs.d/config/fcuny-company.el
@@ -1,5 +1,8 @@
+(eval-when-compile
+  (require 'use-package))
+
 (use-package company
-  :commands company-mode
+  :ensure t
   :diminish company-mode
   :config
   (global-company-mode)
@@ -11,14 +14,4 @@
         company-tooltip-align-annotations t
         company-require-match nil))
 
-(use-package lsp-mode
-  :config
-  (setq lsp-response-timeout 10))
-
-(use-package lsp-ui
-  :init
-  (add-hook 'lsp-mode-hook 'lsp-ui-mode))
-
-(use-package company-lsp)
-
-(provide 'module-autocomplete)
+(provide 'fcuny-company)
diff --git a/emacs.d/config/fcuny-darwin.el b/emacs.d/config/fcuny-darwin.el
new file mode 100644
index 0000000..fbc95e7
--- /dev/null
+++ b/emacs.d/config/fcuny-darwin.el
@@ -0,0 +1,14 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package exec-path-from-shell
+  :if (memq window-system '(mac ns))
+  :ensure t
+  :config
+  (exec-path-from-shell-initialize)
+  (if (fc/check-work-machine-p)
+      (dolist (var '("GEM_HOME" "GEM_PATH" "MY_RUBY_HOME"))
+        (unless (getenv var)
+          (exec-path-from-shell-copy-env var)))))
+
+(provide 'fcuny-darwin)
diff --git a/emacs.d/config/fcuny-dired.el b/emacs.d/config/fcuny-dired.el
new file mode 100644
index 0000000..8c64c1f
--- /dev/null
+++ b/emacs.d/config/fcuny-dired.el
@@ -0,0 +1,15 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package dired
+  :defer t
+  :bind ("C-x C-d"  . dired)
+  :init
+  (setq-default dired-dwim-target t)
+  (setq dired-recursive-deletes 'always)
+  (setq dired-recursive-copies 'always)
+
+  (let ((gls (executable-find "/opt/twitter/bin/gls")))
+    (when gls (setq insert-directory-program gls))))
+
+(provide 'fcuny-dired)
diff --git a/emacs.d/config/fcuny-docker.el b/emacs.d/config/fcuny-docker.el
new file mode 100644
index 0000000..7ed7b0b
--- /dev/null
+++ b/emacs.d/config/fcuny-docker.el
@@ -0,0 +1,7 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package dockerfile-mode
+  :ensure t)
+
+(provide 'fcuny-docker)
diff --git a/emacs.d/config/fcuny-editor.el b/emacs.d/config/fcuny-editor.el
new file mode 100644
index 0000000..75baa4f
--- /dev/null
+++ b/emacs.d/config/fcuny-editor.el
@@ -0,0 +1,55 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package bookmark
+  :custom
+  (bookmark-default-file fcuny-bookmarks-dir)
+  (bookmark-save-flag 1))
+
+(use-package autorevert
+  :config
+  (global-auto-revert-mode t))
+
+(use-package midnight
+  :config
+  (midnight-mode t))
+
+(use-package autorevert
+  :config
+  (setq global-auto-revert-non-file-buffers t)
+  (setq auto-revert-verbose nil)
+  (global-auto-revert-mode t))
+
+(use-package recentf
+  :config
+  (setq recentf-save-file (expand-file-name "var/recentf" user-emacs-directory)))
+
+(use-package server
+  :if window-system
+  :init
+  (add-hook 'after-init-hook 'server-start))
+
+(use-package hl-line
+  :config
+  (global-hl-line-mode t))
+
+(use-package tramp
+  :custom
+  (tramp-default-method "ssh")
+  (tramp-persistency-file-name (expand-file-name "var/tramp" user-emacs-directory)))
+
+(use-package whitespace
+  :custom
+  (whitespace-style '(face trailing))
+  (show-trailing-whitespace t)
+  :hook (whitespace-mode))
+
+(use-package ispell
+  :ensure t
+  :config
+  (use-package flyspell-correct-ivy :ensure t)
+  (when (executable-find "aspell")
+    (setq ispell-program-name "aspell"
+          ispell-list-command "--list")))
+
+(provide 'fcuny-editor)
diff --git a/emacs.d/config/fcuny-elisp.el b/emacs.d/config/fcuny-elisp.el
new file mode 100644
index 0000000..118eb5b
--- /dev/null
+++ b/emacs.d/config/fcuny-elisp.el
@@ -0,0 +1,13 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package lisp-mode
+  :bind
+  (("C-c C-e" . eval-buffer)
+   ("C-c C-r" . eval-region)))
+
+(use-package eldoc
+  :ensure t
+  :hook (emacs-lisp-mode-hook))
+
+(provide 'fcuny-elisp)
diff --git a/emacs.d/config/fcuny-flyspell.el b/emacs.d/config/fcuny-flyspell.el
new file mode 100644
index 0000000..fe26768
--- /dev/null
+++ b/emacs.d/config/fcuny-flyspell.el
@@ -0,0 +1,9 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package flyspell
+  :ensure t
+  :hook ((text-mode-hook . flyspell-mode)
+         (prog-mode-hook . flyspell-prog-mode)))
+
+(provide 'fcuny-flyspell)
diff --git a/emacs.d/config/fcuny-go.el b/emacs.d/config/fcuny-go.el
new file mode 100644
index 0000000..14acbe4
--- /dev/null
+++ b/emacs.d/config/fcuny-go.el
@@ -0,0 +1,35 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package go-mode
+  :ensure t
+  :init
+  (progn
+    (defun fcuny-go-set-tab-width ()
+      (setq-local tab-width 2))
+    (add-hook 'go-mode-hook 'fcuny-go-set-tab-width))
+
+  :config
+  (use-package go-eldoc
+    :config
+    (add-hook 'go-mode-hook 'go-eldoc-setup))
+
+  (use-package gotest :ensure t)
+
+  (use-package go-guru :ensure t)
+
+  (use-package go-imports :ensure t)
+
+  (use-package golint :ensure t)
+
+  (use-package go-projectile :ensure t)
+
+  (use-package company-go
+    :ensure t
+    :init
+    (progn
+      (setq company-go-show-annotation t))
+    :config
+    (add-hook 'go-mode-hook (lambda() (add-to-list 'company-backends 'company-go)))))
+
+(provide 'fcuny-go)
diff --git a/emacs.d/config/fcuny-ibuffer.el b/emacs.d/config/fcuny-ibuffer.el
new file mode 100644
index 0000000..b949c87
--- /dev/null
+++ b/emacs.d/config/fcuny-ibuffer.el
@@ -0,0 +1,26 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package ibuffer
+  :ensure t
+  :bind ("C-x C-b" . ibuffer))
+
+(use-package flycheck
+  :ensure t
+  :config
+  (progn
+    (add-hook 'prog-mode-hook 'flycheck-mode)
+    (setq flycheck-highlighting-mode 'lines)
+    (setq flycheck-check-syntax-automatically '(mode-enabled save))
+    (setq flycheck-checkers (delq 'emacs-lisp-checkdoc flycheck-checkers))
+    (if (fc/check-work-machine-p)
+      (flycheck-define-checker fc/twitter-source-check
+        "A syntax checker for python source code in Source, using `check.pex'"
+        :command ("check.pex" source)
+        :error-patterns ((error line-start (id (1+ nonl)) ":ERROR" (1+ nonl) ":" line (message) line-end)
+                         (warning line-start (id (1+ nonl)) ":WARNING" (1+ nonl) ":" line (message) line-end))
+        :predicate fc/check-source-p
+        :modes (python-mode))
+      (add-to-list 'flycheck-checkers 'fc/twitter-source-check))))
+
+(provide 'fcuny-ibuffer)
diff --git a/emacs.d/config/fcuny-json.el b/emacs.d/config/fcuny-json.el
new file mode 100644
index 0000000..91c682b
--- /dev/null
+++ b/emacs.d/config/fcuny-json.el
@@ -0,0 +1,11 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package json-mode
+  :ensure t
+  :config
+  (setq json-reformat:indent-width 2)
+  (if (fc/check-work-machine-p)
+    (add-to-list 'auto-mode-alist '("\\.workflow$" . json-mode))))
+
+(provide 'fcuny-json)
diff --git a/emacs.d/config/fcuny-magit.el b/emacs.d/config/fcuny-magit.el
new file mode 100644
index 0000000..b78398c
--- /dev/null
+++ b/emacs.d/config/fcuny-magit.el
@@ -0,0 +1,29 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package magit
+  :mode (("differential-update-comments" . git-commit-mode)
+         ("new-commit"                   . git-commit-mode))
+  :bind (("C-x g s" . magit-status)
+         ("C-x g b" . magit-checkout))
+  :init
+  (progn
+    (setq magit-completing-read-function 'ivy-completing-read))
+
+  :config
+  (progn
+    (global-git-commit-mode)
+
+    ;; I don't care about other VC backend for work
+    (if (fc/check-work-machine-p)
+      (setf vc-handled-backends nil
+            vc-follow-symlinks t))
+
+    (use-package git-commit :ensure t)
+
+    (add-hook 'magit-log-edit-mode-hook
+              #'(lambda ()
+                  (set-fill-column 72)
+                  (flyspell-mode)))))
+
+(provide 'fcuny-magit)
diff --git a/emacs.d/config/fcuny-make.el b/emacs.d/config/fcuny-make.el
new file mode 100644
index 0000000..1218f7a
--- /dev/null
+++ b/emacs.d/config/fcuny-make.el
@@ -0,0 +1,9 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package make-mode
+  :ensure t
+  :config
+  (add-hook 'makefile-mode-hook (lambda () (setq-local tab-width 2))))
+
+(provide 'fcuny-make)
diff --git a/emacs.d/modules/module-markdown.el b/emacs.d/config/fcuny-markdown.el
index af34933..7387a0d 100644
--- a/emacs.d/modules/module-markdown.el
+++ b/emacs.d/config/fcuny-markdown.el
@@ -1,10 +1,13 @@
+(eval-when-compile
+  (require 'use-package))
+
 (use-package markdown-mode
-  :commands (markdown-mode gfm-mode)
-  :mode (("\\.md\\'"       . gfm-mode)
+  :ensure t
+  :mode (("\\.md\\'" . gfm-mode)
          ("\\.markdown\\'" . gfm-mode))
   :init (setq markdown-command "pandoc -f markdown_github -c https://goo.gl/OVmlwT --self-contained"
               markdown-header-scaling 't)
   :config
   (add-hook 'gfm-mode-hook 'visual-line-mode))
 
-(provide 'module-markdown)
+(provide 'fcuny-markdown)
diff --git a/emacs.d/config/fcuny-pants.el b/emacs.d/config/fcuny-pants.el
new file mode 100644
index 0000000..3ed1ef1
--- /dev/null
+++ b/emacs.d/config/fcuny-pants.el
@@ -0,0 +1,15 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package pants
+  :load-path (lambda () (expand-file-name  "github.com/fcuny/pants.el/" fcuny-path-workspace))
+  :custom
+  (pants-completion-system 'ivy)
+  (pants-source-tree-root (expand-file-name "git.twitter.biz/source" fcuny-path-workspace))
+  (pants-bury-compilation-buffer t)
+  (pants-extra-args "-q")
+  :bind (("C-c b" . pants-find-build-file)
+         ("C-c r" . pants-run-binary)
+         ("C-c t" . pants-run-test)))
+
+(provide 'fcuny-pants)
diff --git a/emacs.d/config/fcuny-paren.el b/emacs.d/config/fcuny-paren.el
new file mode 100644
index 0000000..db6bdeb
--- /dev/null
+++ b/emacs.d/config/fcuny-paren.el
@@ -0,0 +1,13 @@
+(eval-when-compile
+  (require 'use-package))
+
+;; auto close bracket, parenthesis insertion
+(electric-pair-mode 1)
+
+(use-package paren
+  :custom
+  (show-paren-delay 0)
+  :config
+  (show-paren-mode 1))
+
+(provide 'fcuny-paren)
diff --git a/emacs.d/modules/module-ivy.el b/emacs.d/config/fcuny-project.el
index 8259921..c94c40b 100644
--- a/emacs.d/modules/module-ivy.el
+++ b/emacs.d/config/fcuny-project.el
@@ -1,9 +1,9 @@
-(require 'config-package)
-
-(use-package swiper)
+(eval-when-compile
+  (require 'use-package))
 
 (use-package counsel
-  :bind*
+  :ensure t
+  :bind
   (("M-x"     . counsel-M-x)
    ("C-s"     . counsel-grep-or-swiper)
    ("C-x C-f" . counsel-find-file)
@@ -11,17 +11,16 @@
    ("C-c f"   . counsel-git)
    ("C-c s"   . counsel-git-grep)
    ("C-c /"   . counsel-ag))
-
+  :custom
+  (counsel-find-file-at-point t)
   :config
-  (setq counsel-find-file-at-point t))
-
-(use-package counsel-projectile)
+  (use-package swiper :ensure t)
+  (use-package counsel-projectile :ensure t))
 
 (use-package ivy
+  :ensure t
   :diminish (ivy-mode . "")
-
   :bind ("C-c m" . ivy-switch-project)
-
   :config
   (ivy-mode 1)
   (setq ivy-use-virtual-buffers t
@@ -51,6 +50,35 @@
      ("c" projectile-compile-project "Compile project")
      ("r" projectile-remove-known-project "Remove project(s)"))))
 
-(use-package ivy-hydra)
+(use-package projectile
+  :ensure t
+  :diminish projectile-mode
+  :bind-keymap ("C-c p" . projectile-command-map)
+
+  :init
+  (add-hook 'after-init-hook #'projectile-mode)
+
+  :config
+  (setq projectile-switch-project-action 'projectile-dired
+        projectile-enable-caching t
+        projectile-completion-system 'ivy
+        projectile-known-projects-file (expand-file-name "var/projectile-bookmarks.eld" user-emacs-directory)
+        projectile-cache-file (expand-file-name "var/projectile.cache" user-emacs-directory)
+        projectile-globally-ignored-directories (append fcuny-projects-ignored-dirs
+                                                        projectile-globally-ignored-directories)
+        projectile-globally-ignored-files (append 
+                                                  projectile-globally-ignored-files)))
+
+(use-package ag
+  :ensure t
+  :bind (:map ag-mode-map
+              ("p" . compilation-previous-error)
+              ("n" . compilation-next-error)
+              ("N" . compilation-next-file)
+              ("P" . compilation-previous-file))
+  :custom
+  (ag-highlight-search t)
+  (ag-reuse-buffers t)
+  (ag-reuse-window t))
 
-(provide 'module-ivy)
+(provide 'fcuny-project)
diff --git a/emacs.d/config/fcuny-protobuf.el b/emacs.d/config/fcuny-protobuf.el
new file mode 100644
index 0000000..a2dedb4
--- /dev/null
+++ b/emacs.d/config/fcuny-protobuf.el
@@ -0,0 +1,8 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package protobuf-mode
+  :ensure t
+  :mode ("\\.proto$" . protobuf-mode))
+
+(provide 'fcuny-protobuf)
diff --git a/emacs.d/config/fcuny-puppet.el b/emacs.d/config/fcuny-puppet.el
new file mode 100644
index 0000000..4a7eb10
--- /dev/null
+++ b/emacs.d/config/fcuny-puppet.el
@@ -0,0 +1,12 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package puppet-mode
+  :ensure t
+  :mode ("\\.pp\\'" . puppet-mode)
+  ;:hook (flycheck-mode)
+  :config
+  (if (fc/check-work-machine-p)
+    (setq flycheck-puppet-lint-rc fcuny-path-puppet-linter-svn)))
+
+(provide 'fcuny-puppet)
diff --git a/emacs.d/config/fcuny-python.el b/emacs.d/config/fcuny-python.el
new file mode 100644
index 0000000..16b4cc1
--- /dev/null
+++ b/emacs.d/config/fcuny-python.el
@@ -0,0 +1,12 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package python
+  :ensure t
+  :mode (("\\.py$" . python-mode)
+         ("^BUILD$" . python-mode)
+         ("\\.aurora$" . python-mode))
+  :custom (python-indent-offset 2)
+  :hook (eldoc-mode))
+
+(provide 'fcuny-python)
diff --git a/emacs.d/config/fcuny-rust.el b/emacs.d/config/fcuny-rust.el
new file mode 100644
index 0000000..8b3fe49
--- /dev/null
+++ b/emacs.d/config/fcuny-rust.el
@@ -0,0 +1,24 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package rust-mode
+  :ensure t
+  :config
+
+  (use-package toml-mode :ensure t)
+
+  (use-package racer :ensure t)
+
+  (use-package company-racer :ensure t)
+
+  (use-package cargo
+    :ensure t
+    :hook ((rust-mode . cargo-minor-mode)
+           (rust-mode . eldoc-mode)
+           (rust-mode . race-mode))
+    :custom
+    (compilation-ask-about-save nil)
+    (rust-format-on-save t)
+    (rust-rustfmt-bin "/Users/fcuny/.cargo/bin/rustfmt")))
+
+(provide 'fcuny-rust)
diff --git a/emacs.d/config/fcuny-scala.el b/emacs.d/config/fcuny-scala.el
new file mode 100644
index 0000000..cfadbd6
--- /dev/null
+++ b/emacs.d/config/fcuny-scala.el
@@ -0,0 +1,6 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package scala-mode :ensure t)
+
+(provide 'fcuny-scala)
diff --git a/emacs.d/modules/module-shell.el b/emacs.d/config/fcuny-shell.el
index 684c029..01fb075 100644
--- a/emacs.d/modules/module-shell.el
+++ b/emacs.d/config/fcuny-shell.el
@@ -1,3 +1,6 @@
+(eval-when-compile
+  (require 'use-package))
+
 (use-package sh-script
   :mode ("bashrc" . sh-mode)
   :config
@@ -7,4 +10,4 @@
   (add-hook 'sh-mode-hook 'set-sh-mode-indent)
   (add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p))
 
-(provide 'module-shell)
+(provide 'fcuny-shell)
diff --git a/emacs.d/modules/module-thrift.el b/emacs.d/config/fcuny-thrift.el
index 604810c..9bfa497 100644
--- a/emacs.d/modules/module-thrift.el
+++ b/emacs.d/config/fcuny-thrift.el
@@ -1,6 +1,10 @@
+(eval-when-compile
+  (require 'use-package))
+
 (use-package thrift
+  :ensure t
   :mode ("\\.thrift\\'" . thrift-mode)
   :config
   (setq thrift-indent-level 2))
 
-(provide 'module-thrift)
+(provide 'fcuny-thrift)
diff --git a/emacs.d/config/fcuny-vars.el b/emacs.d/config/fcuny-vars.el
new file mode 100644
index 0000000..cc19201
--- /dev/null
+++ b/emacs.d/config/fcuny-vars.el
@@ -0,0 +1,35 @@
+(defvar fcuny-path-home (getenv "HOME")
+  "Path to the user's home directory.")
+
+(defvar fcuny-path-workspace (expand-file-name "workspace" fcuny-path-home)
+  "Path to the workspace.")
+
+(defvar fcuny-path-git-twitter (expand-file-name "git.twitter.biz" fcuny-path-workspace)
+  "Path to twitter's git repositories.")
+
+(defvar fcuny-path-git-github (expand-file-name "github.com" fcuny-path-workspace)
+  "Path to github's git repositories.")
+
+(defvar fcuny-path-svn-twitter (expand-file-name "svn.twitter.biz" fcuny-path-workspace)
+  "Path to twitter's SVN repositories.")
+
+(defvar fcuny-path-puppet-linter-svn (expand-file-name "twitter-ops/utilities/puppet/.puppet-lint.rc"
+                                                       fcuny-path-svn-twitter)
+  "Path to the linter's configuration for twitter-ops.")
+
+(defvar fcuny-path-emacs-var (expand-file-name "var" user-emacs-directory)
+  "Path to some files for Emacs.")
+
+(defvar fcuny-path-emacs-elpa (expand-file-name "elpa" fcuny-path-emacs-var)
+  "Path to elpa's local files.")
+
+(defvar fcuny-projects-ignored-dirs '(".git" ".svn" "target" "elpa")
+  "Ignore the following directories when browsing with projectile.")
+
+(defvar fcuny-bookmarks-dir (expand-file-name "bookmarks" fcuny-path-emacs-var)
+  "Path to save the bookmarks")
+
+(defvar fcuny-custom-settings (expand-file-name "emacs-custom.el" fcuny-path-emacs-var)
+  "Path to emacs custom variables.")
+
+(provide 'fcuny-vars)
diff --git a/emacs.d/config/fcuny-yaml.el b/emacs.d/config/fcuny-yaml.el
new file mode 100644
index 0000000..7d9ca87
--- /dev/null
+++ b/emacs.d/config/fcuny-yaml.el
@@ -0,0 +1,9 @@
+(eval-when-compile
+  (require 'use-package))
+
+(use-package yaml-mode
+  :ensure t
+;;  :hook (flycheck-mode)
+  :mode ("\\.ya?ml\\'" . yaml-mode))
+
+(provide 'fcuny-yaml)
diff --git a/emacs.d/init.el b/emacs.d/init.el
index 7966f4c..37094a4 100644
--- a/emacs.d/init.el
+++ b/emacs.d/init.el
@@ -1,32 +1,6 @@
-;; If this is not commented, Emacs will overwrite this configuration file
-;; on load time.
-;; (package-initialize)
-
 ;; Initialise the package system first of all.
-(package-initialize)
-
-(defvar fcuny-path-home (getenv "HOME")
-  "Path to the user's home directory.")
-
-(defvar fcuny-path-workspace (expand-file-name "workspace" fcuny-path-home)
-  "Path to the workspace.")
-
-(defvar fcuny-path-git-twitter (expand-file-name "git.twitter.biz" fcuny-path-workspace)
-  "Path to twitter's git repositories.")
-
-(defvar fcuny-path-git-github (expand-file-name "github.com" fcuny-path-workspace)
-  "Path to github's git repositories.")
-
-(defvar fcuny-path-svn-twitter (expand-file-name "svn.twitter.biz" fcuny-path-workspace)
-  "Path to twitter's SVN repositories.")
-
-(defvar fcuny-path-puppet-linter-svn (expand-file-name "twitter-ops/utilities/puppet/.puppet-lint.rc"
-                                                       fcuny-path-svn-twitter)
-  "Path to the linter's configuration for twitter-ops.")
-
-(defvar fcuny-path-puppet-linter-gcp (expand-file-name "gcp-puppet-manifests/.puppet-lint-rc"
-                                                       fcuny-path-git-twitter)
-  "Path to the linkter's configucation for gcp-puppet-manifests.")
+(require 'package)
+(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
 
 (defvar fcuny-path-emacs-var (expand-file-name "var" user-emacs-directory)
   "Path to some files for Emacs.")
@@ -34,78 +8,52 @@
 (defvar fcuny-path-emacs-elpa (expand-file-name "elpa" fcuny-path-emacs-var)
   "Path to elpa's local files.")
 
-(defvar fcuny-projects-ignored-dirs
-  '(".git" ".svn" "target"
-    "elpa"))
-
-(defvar fcuny-projects-ignored-files
-  '(".DS_Store"
-    "*.pyc"
-    "*.jar"
-    "*.zip" "*.tar.gz" "*.tgz" "*.gz"
-    "TAGS"))
-
 ;; where to store the packages
 (setq package-user-dir fcuny-path-emacs-elpa)
 
-(require 'package)
-(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
-
 ;; initialize it
 (package-initialize)
 
-;; we install packages using the `use-package' module
-(require 'use-package)
-
-(setq use-package-always-ensure t)
-
-;; Skip the default splash screen.
-(setq inhibit-startup-message t)
+(defun fcuny/init-load-path ()
+  "Load custom configurations."
+  (let* ((before load-path)
+         (config-dir (expand-file-name "config" user-emacs-directory)))
+    (dolist (path (append (list config-dir)))
+      (add-to-list 'load-path path)
+      (add-to-list 'Info-default-directory-list path))))
 
-(add-to-list 'load-path (expand-file-name "config" user-emacs-directory))
-(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory))
+(fcuny/init-load-path)
 
-(dolist (sub (list
-              (replace-regexp-in-string "/" "-" (symbol-name system-type))
-              (symbol-name window-system)
-              (replace-regexp-in-string "\\..*" "" (system-name))))
-  (load (concat "module-" sub) t))
-
-(load "config-lib")
-(load "config-set-path")
-
-(load "module-general")
-(load "module-appareance")
-(load "module-hydra")
-(load "module-editing")
-(load "module-codestyle")
-
-(load "module-ibuffer")
-(load "module-git")
-(load "module-dired")
-(load "module-ivy")
-(load "module-project")
-(load "module-flycheck")
-(load "module-flyspell")
-(load "module-autocomplete")
-
-(load "module-make")
-(load "module-pants")
-
-(load "module-c")
-(load "module-docker")
-(load "module-go")
-(load "module-java")
-(load "module-json")
-(load "module-lisp")
-(load "module-protobuf")
-(load "module-puppet")
-(load "module-python")
-(load "module-rust")
-(load "module-scala")
-(load "module-shell")
-(load "module-thrift")
+(require 'use-package)
 
-(load "module-markdown")
-(load "module-toml")
-(load "module-yaml")
+(use-package fcuny-vars)
+(use-package fcuny-basic-settings)
+(use-package fcuny-common)
+(use-package fcuny-appearance)
+(use-package fcuny-darwin)
+
+(use-package fcuny-editor)
+(use-package fcuny-paren)
+(use-package fcuny-ibuffer)
+(use-package fcuny-dired)
+(use-package fcuny-project)
+
+(use-package fcuny-company)
+(use-package fcuny-magit)
+(use-package fcuny-pants)
+(use-package fcuny-flyspell)
+
+(use-package fcuny-elisp)
+(use-package fcuny-go)
+(use-package fcuny-python)
+(use-package fcuny-rust)
+(use-package fcuny-shell)
+(use-package fcuny-scala)
+(use-package fcuny-make)
+(use-package fcuny-puppet)
+
+(use-package fcuny-docker)
+(use-package fcuny-json)
+(use-package fcuny-thrift)
+(use-package fcuny-protobuf)
+(use-package fcuny-markdown)
diff --git a/emacs.d/modules/module-appareance.el b/emacs.d/modules/module-appareance.el
deleted file mode 100644
index 7d3d05a..0000000
--- a/emacs.d/modules/module-appareance.el
+++ /dev/null
@@ -1,59 +0,0 @@
-;; I don't want a startup screen
-(setq inhibit-startup-screen t)
-
-;; fullscreen
-(global-set-key (kbd "<s-return>") 'toggle-frame-fullscreen)
-
-;; disable tool bar and the scroll bar
-(dolist (mode '(tool-bar-mode scroll-bar-mode))
-  (when (fboundp mode) (funcall mode -1)))
-
-;; Set default font.
-(set-face-attribute 'default nil :height 130 :weight 'normal :width 'normal)
-
-;; no bell
-(setq visible-bell nil)
-(setq ring-bell-function 'ignore)
-
-;; don't use native full screen on OS-X
-(when (eq system-type 'darwin)
-  (setq ns-use-native-fullscreen nil))
-
-;; highlight current line
-(global-hl-line-mode 1)
-
-;; cursor is a horizontal bar
-(setq-default cursor-type 'hbar)
-
-;; no blinking cursor
-(blink-cursor-mode -1)
-
-;; size of the fringe
-(fringe-mode '(8 . 8))
-
-;; frame title
-(setq frame-title-format '( "%f" " [" (:eval mode-name) "]"))
-
-;; show parenthesis
-(show-paren-mode +1)
-
-;; show column number in the mode line
-(setq column-number-mode t)
-
-;; unclutter the modeline
-(use-package diminish)
-
-(use-package rich-minority)
-
-(use-package smart-mode-line
-  :init
-  (setq sml/theme 'light
-        sml/shorten-directory t
-        sml/shorten-modes t
-        sml/no-confirm-load-theme t
-        sml/name-width 40
-        sml/mode-width 'full)
-  :config
-  (sml/setup))
-
-(provide 'module-appareance)
diff --git a/emacs.d/modules/module-c.el b/emacs.d/modules/module-c.el
deleted file mode 100644
index e1e848c..0000000
--- a/emacs.d/modules/module-c.el
+++ /dev/null
@@ -1,5 +0,0 @@
-(use-package google-c-style
-  :commands
-  (google-set-c-style))
-
-(provide 'module-c)
diff --git a/emacs.d/modules/module-codestyle.el b/emacs.d/modules/module-codestyle.el
deleted file mode 100644
index 05369a7..0000000
--- a/emacs.d/modules/module-codestyle.el
+++ /dev/null
@@ -1,18 +0,0 @@
-(setq show-paren-delay 0)
-
-;; turn off tab indentation
-(setq-default indent-tabs-mode nil)
-
-;; when saving the file, ensure a newline exists at the end of the file
-(setq require-final-newline t)
-
-(use-package whitespace
-  ;; highlight white spaces
-  :config
-  (setq whitespace-style '(face trailing))
-  (add-hook 'prog-mode-hook 'whitespace-mode))
-
-(add-hook 'prog-mode-hook
-          (lambda () (setq show-trailing-whitespace t)))
-
-(provide 'module-codestyle)
diff --git a/emacs.d/modules/module-dired.el b/emacs.d/modules/module-dired.el
deleted file mode 100644
index 6879da9..0000000
--- a/emacs.d/modules/module-dired.el
+++ /dev/null
@@ -1,17 +0,0 @@
-(require 'config-package)
-
-;; Keep dired buffers updated when the file system changes.
-(setq global-auto-revert-non-file-buffers t)
-(setq auto-revert-verbose nil)
-
-;; (setq dired-omit-files
-;;       (concat dired-omit-files "\\|^.DS_Store$\\|^.projectile$\\|^.git$\\|^.svn")))
-
-(let ((gls "/opt/twitter/bin/gls"))
-  (if (file-exists-p gls)
-      (setq insert-directory-program gls
-	    dired-listing-switches "-aBhl --group-directories-first")))
-
-(global-set-key (kbd "C-x C-d") 'dired)
-
-(provide 'module-dired)
diff --git a/emacs.d/modules/module-docker.el b/emacs.d/modules/module-docker.el
deleted file mode 100644
index ba9cd57..0000000
--- a/emacs.d/modules/module-docker.el
+++ /dev/null
@@ -1,14 +0,0 @@
-(require 'config-package)
-
-(use-package dockerfile-mode
-  :bind (:map dockerfile-mode-map
-              ("C-z" . hybrdo-docker/body)))
-
-(defhydra hydra-docker (:hint nil :exit t)
-"
-^Command^
-_b_: build"
-  ("b" dockerfile-build-buffer)
-  ("q" nil "quit" :color blue))
-
-(provide 'module-docker)
diff --git a/emacs.d/modules/module-editing.el b/emacs.d/modules/module-editing.el
deleted file mode 100644
index a49e856..0000000
--- a/emacs.d/modules/module-editing.el
+++ /dev/null
@@ -1,15 +0,0 @@
-(require 'config-package)
-
-;; auto close bracket, parenthesis insertion
-(electric-pair-mode 1)
-
-;; Remap join-line to M-j where it's easier to get to.
-(global-set-key (kbd "M-j") 'join-line)
-
-;; configuration for tramp
-(use-package tramp
-  :config
-  (setq tramp-default-method "ssh"
-        tramp-persistency-file-name (expand-file-name "var/tramp" user-emacs-directory)))
-
-(provide 'module-editing)
diff --git a/emacs.d/modules/module-flycheck.el b/emacs.d/modules/module-flycheck.el
deleted file mode 100644
index 3e2116c..0000000
--- a/emacs.d/modules/module-flycheck.el
+++ /dev/null
@@ -1,11 +0,0 @@
-(require 'config-package)
-
-(use-package flycheck
-  :config
-  (progn
-    (add-hook 'prog-mode-hook 'flycheck-mode)
-    (setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
-    (setq flycheck-highlighting-mode 'lines)
-    (setq flycheck-check-syntax-automatically '(mode-enabled save))))
-
-(provide 'module-flycheck)
diff --git a/emacs.d/modules/module-flyspell.el b/emacs.d/modules/module-flyspell.el
deleted file mode 100644
index 957e1df..0000000
--- a/emacs.d/modules/module-flyspell.el
+++ /dev/null
@@ -1,18 +0,0 @@
-(use-package ispell
-  :config
-  (setq ispell-program-name "aspell"
-        ispell-list-command "--list"))
-
-(use-package flyspell-correct-ivy
-  :bind
-  (:map flyspell-mode-map
-        ("C-;" . flyspell-correct-previous-word-generic)))
-
-(use-package flyspell
-  :commands (spell-checking/change-dictionary)
-  :init
-  :config
-  (add-hook 'text-mode-hook 'flyspell-mode)
-  (add-hook 'prog-mode-hook 'flyspell-prog-mode))
-
-(provide 'module-flyspell)
diff --git a/emacs.d/modules/module-general.el b/emacs.d/modules/module-general.el
deleted file mode 100644
index c68c3dc..0000000
--- a/emacs.d/modules/module-general.el
+++ /dev/null
@@ -1,58 +0,0 @@
-;; set utf-8 as the default encoding
-(prefer-coding-system 'utf-8-unix)
-(set-terminal-coding-system 'utf-8)
-(set-keyboard-coding-system 'utf-8)
-
-;; alias yes-or-no to y-or-n
-(fset 'yes-or-no-p 'y-or-n-p)
-
-;; where to save the bookmarks
-(setq bookmark-default-file (expand-file-name "var/bookmarks" user-emacs-directory)
-      bookmark-save-flag 1)
-
-;; reload the buffer when a file changes
-(global-auto-revert-mode 1)
-
-;; clean old buffers at midnight
-(use-package midnight
-  :config
-  (midnight-mode t))
-
-;; scroll 5 lines at a time
-(setq next-screen-context-lines 5)
-
-;; when using TAB, always indent
-(setq tab-always-indent 'complete)
-
-;; don't auto save files
-(setq auto-save-default nil)
-
-;; I really don't want backup files
-(setq auto-save-list-file-prefix nil
-      make-backup-files nil)
-
-;; How long to display an echo-area message when the minibuffer is active.
-(setq minibuffer-message-timeout 0.5)
-
-;; don't use a lock file
-(setq-default create-lockfiles nil)
-
-;; where to save custom settings
-(setq custom-file (expand-file-name "var/emacs-custom.el" user-emacs-directory))
-
-
-;; automatically revert the buffer if the content changed on disk
-(use-package autorevert :diminish auto-revert-mode)
-
-
-;; configuration for recentf, to interact with recent files
-(use-package recentf
-  :config
-  (setq recentf-save-file (expand-file-name "var/recentf" user-emacs-directory)))
-
-(use-package server
-  :diminish (server-buffer-clients . " #")
-  :config
-  (add-hook 'after-init-hook 'server-start))
-
-(provide 'module-general)
diff --git a/emacs.d/modules/module-git.el b/emacs.d/modules/module-git.el
deleted file mode 100644
index 0c281cc..0000000
--- a/emacs.d/modules/module-git.el
+++ /dev/null
@@ -1,41 +0,0 @@
-(defhydra hydra-magit (:color blue :hint nil :columns 3)
-  "magit"
-  ("RET" magit-visit-thing "visit magit things at point")
-  ("s" magit-status "status")
-  ("d" magit-diff "diff")
-  ("c" magit-commit "commit")
-  ("C" magit-commit-amend "commit-amend")
-  ("r" magit-rebase-interactive "rebase-interactive")
-  ("m" magit-merge "merge")
-  ("l" magit-log-current "log")
-  ("q" nil "exit"))
-
-(use-package magit
-  :mode (("differential-update-comments" . git-commit-mode)
-         ("new-commit"                   . git-commit-mode))
-
-  :bind (("C-c g" . hydra-magit/body)
-         ("C-x g s" . magit-status)
-         ("C-x g b" . magit-checkout))
-
-  :init
-  (progn
-    (setq magit-completing-read-function 'ivy-completing-read))
-
-  :config
-  (progn
-    (global-git-commit-mode)
-    (use-package git-commit :ensure t :defer t)
-    (add-hook 'magit-mode-hook
-              (lambda()
-                (setq mode-name "⎇")))
-    (add-hook 'magit-log-edit-mode-hook
-              #'(lambda ()
-                  (set-fill-column 72)
-                  (flyspell-mode)))))
-
-;; I don't care about any frontend other than magit
-(setf vc-handled-backends nil
-      vc-follow-symlinks t)
-
-(provide 'module-git)
diff --git a/emacs.d/modules/module-go.el b/emacs.d/modules/module-go.el
deleted file mode 100644
index 0869af7..0000000
--- a/emacs.d/modules/module-go.el
+++ /dev/null
@@ -1,52 +0,0 @@
-(use-package go-mode
-  :mode (("\\.go\\'" . go-mode))
-  :bind (:map go-mode-map
-              ("C-z" . hydra-go/body))
-  :init
-  (progn
-    (defun fcuny-go-set-tab-width ()
-      (setq-local tab-width 2))
-    (add-hook 'go-mode-hook 'fcuny-go-set-tab-width))
-
-  :config
-  (progn
-    (add-hook 'before-save-hook 'gofmt-before-save)))
-
-(use-package go-eldoc
-  :config
-  (add-hook 'go-mode-hook 'go-eldoc-setup))
-
-(use-package gotest)
-
-(use-package go-guru)
-
-(use-package go-imports)
-
-(use-package golint)
-
-(use-package go-projectile)
-
-(use-package company-go
-  :init
-  (progn
-    (setq company-go-show-annotation t))
-
-  :config
-  (add-hook 'go-mode-hook (lambda() (add-to-list 'company-backends 'company-go))))
-
-(defhydra hydra-go (:hint nil :exit t)
-"
-^Command^      ^Imports^       ^Doc^
-^-------^------^-------^-------^---^
-_r_: run      _ig_: goto       _d_: doc at point
-              _ia_: add
-^  ^          _ir_: remove
-"
-  ("r" go-run-main)
-  ("d" godoc-at-point)
-  ("ig" go-goto-imports )
-  ("ia" go-import-add)
-  ("ir" go-remove-unused-imports)
-  ("q" nil "quit" :color blue))
-
-(provide 'module-go)
diff --git a/emacs.d/modules/module-hydra.el b/emacs.d/modules/module-hydra.el
deleted file mode 100644
index 0b569c2..0000000
--- a/emacs.d/modules/module-hydra.el
+++ /dev/null
@@ -1,5 +0,0 @@
-(require 'config-package)
-
-(use-package hydra)
-
-(provide 'module-hydra)
diff --git a/emacs.d/modules/module-ibuffer.el b/emacs.d/modules/module-ibuffer.el
deleted file mode 100644
index f914069..0000000
--- a/emacs.d/modules/module-ibuffer.el
+++ /dev/null
@@ -1,42 +0,0 @@
-(require 'config-package)
-
-(use-package ibuffer
-  :bind ("C-x C-b" . ibuffer)
-  :init
-  (setq-default ibuffer-eliding-string "…")
-  (setq ibuffer-show-empty-filter-groups nil
-        ibuffer-formats '((mark modified read-only " "
-                                (name 30 30 :left :elide)
-                                " "
-                                (size 9 -1 :right)
-                                " "
-                                (mode 16 16 :left :elide)
-                                " " filename-and-process)
-                          (mark " "
-                                (name 16 -1)
-                                " " filename))
-        ibuffer-saved-filter-groups
-        (quote (("default"
-                 ("dired"  (mode . dired-mode))
-                 ("elisp"  (mode . emacs-lisp-mode))
-                 ("emacs"  (or (name . "^\\*.*\\*$") (mode . fundamental-mode)))
-                 ("go"     (mode . go-mode))
-                 ("java"   (mode . java-mode))
-                 ("json"   (mode . json-mode))
-                 ("lisp"   (mode . lisp-mode))
-                 ("magit"  (mode . magit-mode))
-                 ("puppet" (mode . puppet-mode))
-                 ("python" (mode . python-mode))
-                 ("repl"   (name . "repl"))
-                 ("ruby"   (mode . ruby-mode))
-                 ("rust"   (mode . rust-mode))
-                 ("sh"     (mode . sh-mode))
-                 ("text"   (mode . text-mode))))))
-
-  (add-hook 'ibuffer-mode-hook  ;; organise by filter-groups
-            '(lambda ()
-               (ibuffer-auto-mode 1)
-               (setq mode-name "≣")
-               (ibuffer-switch-to-saved-filter-groups "default"))))
-
-(provide 'module-ibuffer)
diff --git a/emacs.d/modules/module-java.el b/emacs.d/modules/module-java.el
deleted file mode 100644
index 33351fb..0000000
--- a/emacs.d/modules/module-java.el
+++ /dev/null
@@ -1,69 +0,0 @@
-(require 'config-package)
-
-(use-package autodisass-java-bytecode)
-
-(use-package meghanada
-  :defer t
-
-  :commands meghanada-mode
-
-  :init
-  (add-hook 'java-mode-hook
-            (lambda()
-              (google-set-c-style)
-              (google-make-newline-indent)
-              (meghanada-mode t)
-              (smartparens-mode t)
-              (rainbow-delimiters-mode t)
-              (highlight-symbol-mode t)))
-
-  :config
-  (setq meghanada-server-remote-debug t
-        meghanada-use-company t
-	meghanada-use-flycheck t
-	meghanada-auto-start t
-        meghanada-server-install-dir (expand-file-name "var/meghanada" user-emacs-directory))
-  (meghanada-install-server)
-
-  :bind
-  (:map meghanada-mode-map
-        ("C-S-t" . meghanada-switch-testcase)
-        ("M-r" . meghanada-reference)
-        ("M-t" . meghanada-typeinfo)
-        ("C-z" . hydra-meghanada/body)))
-
-(defhydra hydra-meghanada (:hint nil :exit t)
-"
-^Edit^                           ^Tast or Task^
-^----^---------------------------^------------^
-_f_: meghanada-compile-file      _m_: meghanada-restart
-_c_: meghanada-compile-project   _t_: meghanada-run-task
-_o_: meghanada-optimize-import   _j_: meghanada-run-junit-test-case
-_s_: meghanada-switch-test-case  _J_: meghanada-run-junit-class
-_v_: meghanada-local-variable    _R_: meghanada-run-junit-recent
-_i_: meghanada-import-all        _r_: meghanada-reference
-_g_: magit-status                _T_: meghanada-typeinfo
-_q_: exit
-"
-  ("f" meghanada-compile-file)
-  ("m" meghanada-restart)
-
-  ("c" meghanada-compile-project)
-  ("o" meghanada-optimize-import)
-  ("s" meghanada-switch-testcase)
-  ("v" meghanada-local-variable)
-  ("i" meghanada-import-all)
-
-  ("g" magit-status)
-
-  ("t" meghanada-run-task)
-  ("T" meghanada-typeinfo)
-  ("j" meghanada-run-junit-test-case)
-  ("J" meghanada-run-junit-class)
-  ("R" meghanada-run-junit-recent)
-  ("r" meghanada-reference)
-
-  ("q" exit)
-  ("z" nil "leave"))
-
-(provide 'module-java)
diff --git a/emacs.d/modules/module-javascript.el b/emacs.d/modules/module-javascript.el
deleted file mode 100644
index 4a3693d..0000000
--- a/emacs.d/modules/module-javascript.el
+++ /dev/null
@@ -1,10 +0,0 @@
-(use-package graphql-mode)
-
-(use-package js2-mode
-  :mode (("\\.js$" . js2-mode))
-  :config
-  (setq-default
-   js2-mode-indent-ignore-first-tab t
-   js-indent-level 2))
-
-(use-package rjsx-mode)
diff --git a/emacs.d/modules/module-json.el b/emacs.d/modules/module-json.el
deleted file mode 100644
index aa34a3e..0000000
--- a/emacs.d/modules/module-json.el
+++ /dev/null
@@ -1,20 +0,0 @@
-(require 'config-package)
-
-(use-package json-mode
-  :mode "\\.json$|\\.workflow$'"
-
-  :config
-  (setq json-reformat:indent-width 2)
-
-  :bind (:map json-mode-map
-              ("C-z" . hydra-json/body)))
-
-(defhydra hydra-json (:hint nil :exit t)
-"
-^Command^
-_f_: format
-"
-  ("f" json-reformat-region)
-  ("q" nil "quit" :color blue))
-
-(provide 'module-json)
diff --git a/emacs.d/modules/module-lisp.el b/emacs.d/modules/module-lisp.el
deleted file mode 100644
index 11f6823..0000000
--- a/emacs.d/modules/module-lisp.el
+++ /dev/null
@@ -1,14 +0,0 @@
-(require 'config-package)
-
-(require 'eldoc)
-
-(add-hook 'emacs-lisp-mode-hook (lambda()
-                                  (setq mode-name "λ")))
-
-(add-hook 'emacs-lisp-mode-hook 'eldoc-mode)
-(add-hook 'lisp-interaction-mode-hook 'eldoc-mode)
-
-(define-key emacs-lisp-mode-map (kbd "C-c C-e") 'eval-buffer)
-(define-key emacs-lisp-mode-map (kbd "C-c C-r") 'eval-region)
-
-(provide 'module-lisp)
diff --git a/emacs.d/modules/module-make.el b/emacs.d/modules/module-make.el
deleted file mode 100644
index 5735670..0000000
--- a/emacs.d/modules/module-make.el
+++ /dev/null
@@ -1,8 +0,0 @@
-(require 'config-package)
-
-(use-package make-mode
-  :config
-  (add-hook 'makefile-mode-hook (lambda ()
-                                  (setq-local tab-width 2))))
-
-(provide 'module-make)
diff --git a/emacs.d/modules/module-pants.el b/emacs.d/modules/module-pants.el
deleted file mode 100644
index 579c298..0000000
--- a/emacs.d/modules/module-pants.el
+++ /dev/null
@@ -1,28 +0,0 @@
-(require 'config-package)
-
-(use-package pants
-  :load-path (lambda () (expand-file-name  "github.com/fcuny/pants.el/" fcuny-path-workspace))
-
-  :config
-  (setq pants-completion-system 'ivy
-        pants-source-tree-root (expand-file-name "git.twitter.biz/source" fcuny-path-workspace)
-        pants-bury-compilation-buffer t
-        pants-extra-args "-q")
-
-  :bind (("C-c b" . pants-find-build-file)
-         ("C-c r" . pants-run-binary)
-         ("C-c t" . pants-run-test)
-         ("C-c h" . hydra-pants/body)))
-
-(defhydra hydra-pants (:hint nil :exit t)
-"
-^Command^
-_g_: go to build
-_b_: build a binary
-_t_: run the tests
-"
-  ("g" pants-find-build-file)
-  ("b" pants-run-binary)
-  ("t" pants-run-test))
-
-(provide 'module-pants)
diff --git a/emacs.d/modules/module-project.el b/emacs.d/modules/module-project.el
deleted file mode 100644
index 9f635ed..0000000
--- a/emacs.d/modules/module-project.el
+++ /dev/null
@@ -1,63 +0,0 @@
-(defhydra hydra-projectile-other-window (:color teal :columns 2)
-  "projectile-other-window"
-  ("f"  projectile-find-file-other-window        "file")
-  ("g"  projectile-find-file-dwim-other-window   "file dwim")
-  ("d"  projectile-find-dir-other-window         "dir")
-  ("b"  projectile-switch-to-buffer-other-window "buffer")
-  ("q"  nil                                      "cancel" :color blue))
-
-(defhydra hydra-projectile (:color teal :columns 4)
-  "Projectile"
-  ("a"   projectile-ag "ag")
-  ("b"   projectile-switch-to-buffer "switch to buffer")
-  ("c"   projectile-invalidate-cache "invalidate cache")
-  ("d"   projectile-find-dir "find dir")
-  ("s-f" projectile-find-file "find file")
-  ("ff"  projectile-find-file-dwim "find file dwim")
-  ("fd"  projectile-find-file-in-directory "find file in dir")
-  ("g"   projectile-regenerate-tags "regenerate tags")
-  ("fg"  projectile-find-tag "find tag")
-  ("i"   projectile-ibuffer "ibuffer")
-  ("K"   projectile-kill-buffers "kill buffers")
-  ("m"   projectile-multi-occur "multi occur")
-  ("s-p" projectile-switch-project "switch project")
-  ("s"   projectile-switch-project "switch project")
-  ("r"   projectile-recentf "recent file")
-  ("x"   projectile-remove-known-project "remove project")
-  ("X"   projectile-cleanup-known-projects "cleanup project")
-  ("z"   projectile-cache-current-file "cache current file")
-  ("`"   hydra-projectile-other-window/body "other window")
-  ("q"   nil "cancel" :color blue))
-
-(use-package projectile
-  :diminish projectile-mode
-  :bind-keymap ("C-c p" . projectile-command-map)
-  :bind (("M-p" . hydra-projectile/body))
-
-  :init
-  (add-hook 'after-init-hook #'projectile-mode)
-
-  :config
-  (setq projectile-switch-project-action 'projectile-dired
-        projectile-enable-caching t
-        projectile-completion-system 'ivy
-        projectile-known-projects-file (expand-file-name "var/projectile-bookmarks.eld" user-emacs-directory)
-        projectile-cache-file (expand-file-name "var/projectile.cache" user-emacs-directory)
-        projectile-globally-ignored-directories (append fcuny-projects-ignored-dirs
-                                                        projectile-globally-ignored-directories)
-        projectile-globally-ignored-files (append fcuny-projects-ignored-files
-                                                  projectile-globally-ignored-files)))
-
-(use-package ag
-  :commands (counsel-ag ag)
-  :bind (:map ag-mode-map
-              ("p" . compilation-previous-error)
-              ("n" . compilation-next-error)
-              ("N" . compilation-next-file)
-              ("P" . compilation-previous-file))
-  :config
-  (setq ag-highlight-search t
-        ag-reuse-buffers t
-        ag-reuse-window t))
-
-(provide 'module-project)
diff --git a/emacs.d/modules/module-protobuf.el b/emacs.d/modules/module-protobuf.el
deleted file mode 100644
index 892cb0d..0000000
--- a/emacs.d/modules/module-protobuf.el
+++ /dev/null
@@ -1,4 +0,0 @@
-(use-package protobuf-mode
-  :mode ("\\.proto$" . protobuf-mode))
-
-(provide 'module-protobuf)
diff --git a/emacs.d/modules/module-puppet.el b/emacs.d/modules/module-puppet.el
deleted file mode 100644
index 025965b..0000000
--- a/emacs.d/modules/module-puppet.el
+++ /dev/null
@@ -1,7 +0,0 @@
-(use-package puppet-mode
-  :mode ("\\.pp\\'" . puppet-mode)
-  :init (add-hook 'puppet-mode-hook 'flycheck-mode)
-  :config
-  (setq flycheck-puppet-lint-rc "/Users/fcuny/workspace/svn.twitter.biz/twitter-ops/utilities/puppet/.puppet-lint.rc"))
-
-(provide 'module-puppet)
diff --git a/emacs.d/modules/module-python.el b/emacs.d/modules/module-python.el
deleted file mode 100644
index 4b2a27c..0000000
--- a/emacs.d/modules/module-python.el
+++ /dev/null
@@ -1,20 +0,0 @@
-(setq python-indent-offset 2)
-(add-hook 'python-mode-hook 'eldoc-mode t)
-
-(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
-(add-to-list 'auto-mode-alist '("\\.BUILD\\'" . python-mode))
-(add-to-list 'auto-mode-alist '("\\.aurora\\'" . python-mode))
-
-;;; errors are reported like this:
-;;; E241:ERROR   <file name>:<line> <message>
-(flycheck-define-checker source-check
-  "A syntax checker for python source code in Source, using `check.pex'"
-  :command ("check.pex" source)
-  :error-patterns ((error line-start (id (1+ nonl)) ":ERROR" (1+ nonl) ":" line (message) line-end)
-                   (warning line-start (id (1+ nonl)) ":WARNING" (1+ nonl) ":" line (message) line-end))
-  :predicate fc/check-source-p
-  :modes (python-mode))
-
-(add-to-list 'flycheck-checkers 'source-check)
-
-(provide 'module-python)
diff --git a/emacs.d/modules/module-rust.el b/emacs.d/modules/module-rust.el
deleted file mode 100644
index b99416f..0000000
--- a/emacs.d/modules/module-rust.el
+++ /dev/null
@@ -1,18 +0,0 @@
-(use-package rust-mode)
-
-(use-package racer)
-
-(use-package cargo
-  :hook (rust-mode . cargo-minor-mode)
-  :config
-  (add-hook 'rust-mode-hook 'racer-mode)
-  (add-hook 'rust-mode-hook 'eldoc-mode)
-  (setq compilation-ask-about-save nil
-        rust-format-on-save t
-        rust-rustfmt-bin "/Users/fcuny/.cargo/bin/rustfmt")
-  ;; Automatically re-run compilation command on manual save inside a project.
-  ;; Will do nothing if a compilation hasn't been manually triggered
-  ;; in the past.
-  :diminish cargo-minor-mode)
-
-(provide 'module-rust)
diff --git a/emacs.d/modules/module-scala.el b/emacs.d/modules/module-scala.el
deleted file mode 100644
index 374c581..0000000
--- a/emacs.d/modules/module-scala.el
+++ /dev/null
@@ -1,3 +0,0 @@
-(use-package scala-mode)
-
-(provide 'module-scala)
diff --git a/emacs.d/modules/module-toml.el b/emacs.d/modules/module-toml.el
deleted file mode 100644
index 01b60c2..0000000
--- a/emacs.d/modules/module-toml.el
+++ /dev/null
@@ -1,3 +0,0 @@
-(use-package toml-mode)
-
-(provide 'module-toml)
diff --git a/emacs.d/modules/module-yaml.el b/emacs.d/modules/module-yaml.el
deleted file mode 100644
index 14ccc89..0000000
--- a/emacs.d/modules/module-yaml.el
+++ /dev/null
@@ -1,5 +0,0 @@
-(use-package yaml-mode
-  :init (add-hook 'yaml-mode-hook 'flycheck-mode)
-  :mode ("\\.ya?ml\\'" . yaml-mode))
-
-(provide 'module-yaml)