cursive-ide / cursive

Cursive: The IDE for beautiful Clojure code
581 stars 7 forks source link

CLJC completions are 'ambiguous' #1132

Open sfnelson opened 8 years ago

sfnelson commented 8 years ago
screen shot 2015-11-02 at 4 10 09 pm

Cursive's CLJC support doesn't identify that symbols defined and used in CLJC files resolve to the same source file, so it offers two possible resolutions. This causes Quick Help and Parameters intentions to fail, and cause Jump to Definition to show a popup, as shown above.

Cursive should be able to identify that the symbols resolve to the same source location via two different routes, and over a single completion.

(Example uses schema.core, from prismatic/schema)

danielcompton commented 8 years ago

I wonder if puts on architect hat\ there should be three modes that Cursive can be resolving in: clj, cljs, and cljc. When in a cljc file and not in a reader conditional block, then it would be in cljc mode, and resolve all other vars reachable in cljc mode. When in a cljs reader conditional block inside a cljc file, it would be in cljs mode, and only resolve cljs or cljc vars.

danielcompton commented 8 years ago

This also shows up when jumping to a namespace:

screenshot of intellij idea 19-05-16 9-53-54 am
cursive-ide commented 8 years ago

@danielcompton That's more or less what I'm planning to do, but it's somewhat trickier than that. But that's my intention, yes.

katox commented 4 years ago

Any updates to this issue? Cursive still shows all cljc namespaces twice in the navigation.