- 
                Notifications
    You must be signed in to change notification settings 
- Fork 112
Open
Description
cljr-magic-require-namespaces doesn't currently allow specifying its intended context (:clj, :cljs).
This can easily cause incorrect suggestions for cljr-slash.
I'd suggest one of the following:
- Introduce new defcustom, e.g. cljr-jvm-magic-require-namespaces- This would be a list like '("clojure.java.io"), specifying which values ofcljr-magic-require-namespacesare intended for JVM clojure.
- Same for cljs
 
- This would be a list like 
- (Preferred) Allow cljr-magic-require-namespaces to also include lists
- Example difference:
 
(defcustom cljr-magic-require-namespaces
  '(("set"  . "clojure.set")
-   ("io"   . "clojure.java.io")
+   ("io"   "clojure.java.io" "clj")
+   ("io"   "foo.io" "cljs")
    ("str"  . "clojure.string")
    ("walk" . "clojure.walk")
    ("zip"  . "clojure.zip")))i.e. we could mix and match cons cells (("set"  . "clojure.set")) with lists having the extra property ("io"    "clojure.java.io" "clj").
Both approaches are intended to be backwards-compatible.
Notes on semantics
- There are two values that must be expressible: clj, cljs
- cljc would be a no-op (since by default, entries already are context-agnostic)
 
- A value such as "io" "clojure.java.io" "clj"is intended to mean "please only possibly suggest clojure.java.io if the filename is .clj"- It does not, however, mean "clojure.java.io is the only acceptable completion if the filename is .clj"
- refactor-nrepl is ultimately responsible for deciding what choice(s) will be offered.
 
Final decision
Metadata
Metadata
Assignees
Labels
No labels