summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2017-11-24 20:54:56 +0100
committerAlan Pearce2017-11-24 20:54:56 +0100
commit2fb03ec7e571944b66a625715c15a86714072ad9 (patch)
tree51d64eefeb6fb142935ea914b80ac20513bf124f /emacs
parent1ab37d2c9820d82d21b8b447b90beae665f145d4 (diff)
downloadnixfiles-2fb03ec7e571944b66a625715c15a86714072ad9.tar.lz
nixfiles-2fb03ec7e571944b66a625715c15a86714072ad9.tar.zst
nixfiles-2fb03ec7e571944b66a625715c15a86714072ad9.zip
Emacs: Configure eacl (and grep)
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/main.el29
1 files changed, 29 insertions, 0 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index e1d6435f..268f290d 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -457,6 +457,24 @@
   (interactive)
   (projectile-switch-project-by-name (car (split-string (shell-command-to-string "ghq list --full-path dotfiles")))))
 
+;;;;; Grep
+
+(use-package grep
+  :config (progn
+            (dolist (v '("node_modules"
+                         "bower_components"
+                         ".sass_cache"
+                         ".cache"
+                         ".npm"))
+              (add-to-list 'grep-find-ignored-directories v))
+            (dolist (v '("*.min.js"
+                         "*.bundle.js"
+                         "*.min.css"
+                         "*.lock"
+                         "package-lock.json"
+                         "*.log"))
+              (add-to-list 'grep-find-ignored-files v))))
+
 ;;;;; The Silver Searcher
 
 (use-package ag
@@ -1078,6 +1096,17 @@
 (use-package company-web
   :after company)
 
+;;;;; EACL
+
+;; Auto-complete lines by grepping the project.
+
+(use-package eacl
+  :bind (("C-c <tab>" . eacl-complete-line)
+         ("C-c C-;" . eacl-complete-statement)
+         ("C-c C-\]" . eacl-complete-snippet)
+         ("C-c C-/" . eacl-complete-tag)))
+
+
 ;;;; Dates & Times
 
 ;;;;; Calendar