clojure-complete icon indicating copy to clipboard operation
clojure-complete copied to clipboard

completions results sorted by "kind" ?

Open laurentpetit opened this issue 12 years ago • 0 comments

Consider the following command:

=> (pprint (completions "clojure.core"))
nil
("clojure.core"
 "clojure.core.ArrayChunk"
 "clojure.core.ArrayManager"
 "clojure.core.IVecImpl"
 "clojure.core.Vec"
 "clojure.core.VecNode"
 "clojure.core.VecSeq"
 "clojure.core.protocols"
 "clojure.core.protocols.InternalReduce")

first is a namespace, then some classes, then a namespace, then some classes

What do you think about having things sorted first by "kind", then by alphabetical name ?

kinds could be sorted as is: first namespaces then vars then classes then instance members then static members

e.g. having this behaviour instead:

=> (pprint (completions "clojure.core"))
nil
("clojure.core"
 "clojure.core.protocols"
 "clojure.core.ArrayChunk"
 "clojure.core.ArrayManager"
 "clojure.core.IVecImpl"
 "clojure.core.Vec"
 "clojure.core.VecNode"
 "clojure.core.VecSeq"
 "clojure.core.protocols.InternalReduce")

laurentpetit avatar Jun 16 '12 21:06 laurentpetit