diff --git a/lib/process/clojure-runner.coffee b/lib/process/clojure-runner.coffee index 5f39183..a67e732 100644 --- a/lib/process/clojure-runner.coffee +++ b/lib/process/clojure-runner.coffee @@ -6,10 +6,10 @@ _ = require 'underscore' filteredEnv = _.omit process.env, 'ATOM_HOME', 'ATOM_SHELL_INTERNAL_RUN_AS_NODE', 'GOOGLE_API_KEY', 'NODE_ENV', 'NODE_PATH', 'userAgent', 'taskPath' -module.exports = (currentWorkingDir, clojurePath) -> +module.exports = (currentWorkingDir, clojurePath, args) -> callback = @async() - args = [ + args = args.concat([ "-e", "(do (require '[clojure.tools.nrepl.server :refer [start-server]]) @@ -17,7 +17,7 @@ module.exports = (currentWorkingDir, clojurePath) -> (println (str \"nREPL server started on port \" port \" on host 127.0.0.1\")) (println (str \"- nrepl://127.0.0.1:\" port))))", "-r" - ] + ]) # The nREPL port is extracted from the output of the REPL process. We could # look on the file system for the .nrepl-port file which is more standard diff --git a/lib/process/local-repl-process.coffee b/lib/process/local-repl-process.coffee index bd30beb..13d5a97 100644 --- a/lib/process/local-repl-process.coffee +++ b/lib/process/local-repl-process.coffee @@ -41,7 +41,8 @@ class LocalReplProcess # for one of the configuration files # build.boot (Boot) or # project.clj (Leiningen) or - # gradlew or gradlew.bat (Gradle) + # gradlew or gradlew.bat (Gradle) or + # deps.edn (Clojure tools.deps) parentDirectory = path.resolve(currentPath, "..") if currentPath != parentDirectory and limit < 100 @@ -120,7 +121,8 @@ class LocalReplProcess when "clojure" @process = Task.once ClojureRunner, path.resolve(projectPath), - atom.config.get('proto-repl.clojurePath').replace("/clj","") + atom.config.get('proto-repl.clojurePath').replace("/clj",""), + atom.config.get('proto-repl.clojureArgs').split(" ") # when "lein" then else @process = Task.once LeinRunner, diff --git a/lib/proto-repl.coffee b/lib/proto-repl.coffee index 81236e6..6d9f0fd 100644 --- a/lib/proto-repl.coffee +++ b/lib/proto-repl.coffee @@ -46,6 +46,10 @@ module.exports = ProtoRepl = description: 'The arguments to be passed to boot. For advanced users only.' type: 'string' default: "--no-colors dev repl --server wait" + clojureArgs: + description: 'The argument to be passed to clojure executable. For advanced users only.' + type: 'string' + default: "" gradleArgs: description: 'The arguments to be passed to gradle. For advanced users only.' type: 'string'