On Oct 11, 2012, at 4:15 PM, Sam Aaron wrote:
>
> On 8 Oct 2012, at 20:38, Chas Emerick <
ch...@cemerick.com> wrote:
>
>> You can do that already with this in project.clj:
>>
>> {:repl-options {:port XXXX}}
>>
>> `lein repl :headless` will start nREPL on port XXXX.
>>
>
> Awesome. Is there a way to make this global for all lein projects?
Sure, just drop the above into e.g. the :user profile in ~/.lein/profiles.clj:
{:user {:repl-options {:port XXXX}}}
Though, if you do this, you'll only be able to run one REPL at a time. A better solution might be to use an alias to turn on a profile that contains the preferred port and run a new REPL; this will allow you to run a REPL on the "standard" port easily while still being able to spin up other REPLs freely:
{:standard-repl {:repl-options {:port XXXX}}
:user {:aliases {"stdrepl" ["with-profile" "dev,user,standard-repl" "repl"]}}}
...then:
$ lein stdrepl
That'll only work if there's a project.clj in pwd, but hopefully that'll work for you. :-)
- Chas