Skip to content

Instantly share code, notes, and snippets.

@iperdomo
Created May 4, 2020 15:04
Show Gist options
  • Save iperdomo/e910bd5c70e35044dd1b54044377751c to your computer and use it in GitHub Desktop.
Save iperdomo/e910bd5c70e35044dd1b54044377751c to your computer and use it in GitHub Desktop.
diff --git a/backend/.dir-locals.el b/backend/.dir-locals.el
index c995d58e..4aa605f9 100644
--- a/backend/.dir-locals.el
+++ b/backend/.dir-locals.el
@@ -1,20 +1,5 @@
-;; using docker-compose up, we loose the cider ability to navigate definitions with `C - .` due the source of current (docker) nrepl is under a different path `/app/src` instead of akvo-lumen local git repo
-;; so the trick is to replace docker source paths by user-local-paths.
-((nil . ((eval . (defun to-local-paths (info)
- "adapt src and .m2 docker paths to local paths"
- (let* ((file (nrepl-dict-get info "file"))
- (res-0 (progn
- (replace-regexp-in-string "/app/" (clojure-project-dir) file))))
- (replace-regexp-in-string "/root/.m2/"
- (concat (getenv "HOME") "/.m2/")
- res-0))))
- (eval . (defun cider--jump-to-loc-from-info (info &optional other-window)
- ""
- (let* ((line (nrepl-dict-get info "line"))
- (file (to-local-paths info))
- (name (nrepl-dict-get info "name"))
- ;; the filename might actually be a REPL buffer name
- (buffer (cider--find-buffer-for-file file)))
- (if buffer
- (cider-jump-to buffer (if line (cons line nil) name) other-window)
- (error (concat "No source location..." file)))))))))
+((nil . ((cider-ns-refresh-before-fn . "reloaded.repl/suspend")
+ (cider-ns-refresh-after-fn . "reloaded.repl/resume")
+ (cider-default-cljs-repl . "(do (dev) (go) (cljs-repl))")
+ (cider-path-translations . (("/app" . "/home/ivan/w/akvo/akvo-lumen/backend")
+ ("/home/akvo/.m2" . "/home/ivan/.m2"))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment