cursive-ide / cursive

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

Autocomplete adds new require when it should use a preexisting alias #1858

Open kennyjwilli opened 6 years ago

kennyjwilli commented 6 years ago

Example code:

(ns my.foo
  (:require
    [clojure.spec.alpha :as spec]))

(s/def )

When you start typing the s/def Cursive will have the autocomplete dropdown appear. But if you hit enter on any of the options, it will add a new line to the :require that looks like [clojure.spec.alpha :as s] when it should just change the s/def to spec/def given the namespace is already aliased.

pbaille commented 6 years ago

+1