about summary refs log tree commit diff
path: root/init
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-07-11T21·27+0200
committerVincent Ambo <github@tazj.in>2019-02-10T20·43+0100
commite0a8a6f35f3afbb838f3c3819d4bf9ca66e10d00 (patch)
tree534a314e45215d1f7ec3699c2f6a5ef22fd7b903 /init
parent5b32cd74c60ba02fde8a4e8b15b3ce603358d86c (diff)
feat(functions): Add function to start inferior Erlang via Nix
Diffstat (limited to 'init')
-rw-r--r--init/functions.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/init/functions.el b/init/functions.el
index c0169955a19a..019bf1646079 100644
--- a/init/functions.el
+++ b/init/functions.el
@@ -224,4 +224,11 @@ Including indent-buffer, which should not be called automatically on save."
          (last-window (car (seq-intersection right-windows bottom-windows))))
     (eq (current-buffer) (window-buffer last-window))))
 
+(defun inferior-erlang-nix-shell ()
+  "Start an inferior Erlang process from the root of the current
+  project."
+  (interactive)
+  (inferior-erlang
+   (format "nix-shell --command erl %s" (cdr (project-current)))))
+
 (provide 'functions)