IDE support?

16 views
Skip to first unread message

The Alchemist

unread,
Jun 7, 2023, 4:58:12 PM6/7/23
to Typed Clojure
I'm a huge user of IntelliJ, and I feel like IDE autocomplete is one of the main, if only, reasons I kinda miss typing.

Would it be difficult to write an IntelliJ plugin (or Calva add-on) to do this?  I think it would add immense value to users of typedclojure, malli, etc.

Thank you!

Ambrose Bonnaire-Sergeant

unread,
Jun 7, 2023, 6:33:10 PM6/7/23
to clojure-c...@googlegroups.com
Depends on the use-case. One of the challenges is that infix notation (like Java method chaining) is much more amenable to autocomplete than prefix notation (sexps).

What contexts are you hoping for autocompletion?

Ambrose

------- Original Message -------
--
You received this message because you are subscribed to the Google Groups "Typed Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure-core-ty...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clojure-core-typed/0f493f96-cc46-48c7-8fa2-7f6a22abed07n%40googlegroups.com.

The Alchemist

unread,
Jun 12, 2023, 2:23:35 PM6/12/23
to Typed Clojure
I agree you on the in-fix notation vs sexps bit.  

From a developer experience perspective, I feel like keyword assistance during map/associative destructuring and thread-last ops would be the most helpful as a base case.  (More difficult situations like lists of maps I'm leaving aside for now.)

e.g., using the example from the Clojure docs:

(def multiplayer-game-state {:joe {:class "Ranger" :weapon "Longbow" :score 100} :jane {:class "Knight" :weapon "Greatsword" :score 140} :ryan {:class "Wizard" :weapon "Mystic Staff" :score 150}}) (let [{{:keys [class weapon]} :joe} multiplayer-game-state]

(let [joe-weapon (->> multiplayer-game-state :joe :weapon]

This is pure Clojure, but I'm posting here because I think Typed Clojure, malli, etc. could improve this situation.

In Python, for example, I don't use the newish type declarations, but something it after I've written the function just to get some autocomplete.  (Is it "".ends_with?, .endswith?, ends_with), especially because I bounce around between Python, Ruby, and Clojure and I just can't remember, heh.
Reply all
Reply to author
Forward
0 new messages