Skip to content

Please add support for lein's {:repl-options {:init (form)}} configuration option #106

@coventry

Description

@coventry

It would be great if putting something like the following in ~/.lein/profiles.clj

{:user {:repl-options {:init (load-file "/path/to/replrc.clj")}}} 

worked for "lein ritz-nrepl" the same way it does for "lein repl". It's handy for adding utility functions to the default repl namespace.

In case it's relevant, here is my full ~/.lein/profiles.clj

{:user
 {:plugins [[lein-ritz "0.7.0"]
            [lein-cljsbuild "0.3.2"]
            [lein-marginalia "0.7.1"]]
  :dependencies [[ritz/ritz-nrepl-middleware "0.7.0"]
                 ;;[rplevy/contrib-repl "0.1.2"]
                 [org.clojure/java.classpath "0.2.0"]
                 ]
  :repl-options {:nrepl-middleware
                 [ritz.nrepl.middleware.javadoc/wrap-javadoc
                  ritz.nrepl.middleware.simple-complete/wrap-simple-complete
                  ;; contrib-repl.middleware/add-contrib-deps
                  ]
                 :init
                 ;; (println "here we are in" *ns*)
                 ;; Any utility functions for the repl namespace can
                 ;; go in the file referenced here
                 (load-file "/home/coventry/.lein/replrc.clj")

}}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions