clojure-complete
clojure-complete copied to clipboard
completion "contraction"
It is possible that a user has 'used (or 'aliased) in the current namespace another namespace, but is triggering completion with the fully qualified namespace (maybe he doesn't remember the namespace has been 'used or 'aliased, maybe he wants to "filter" the search to this particular namespace).
In that case, instead of suggesting the var's symbol as provided by the user, we could/should (?) suggest the bare symbol (resp. aliased symbol) :
example:
(ns 'user)
(require 'clojure.set)
(completions "clojure.set/un")
; => ( "clojure.set/union")
(require '[clojure.set :as set])
(completions "clojure.set/un")
; => ("set/union")
(use '[clojure.set :only [union]])
(completions "clojure.set/un")
; => ("union")
(completions "set/un")
; => ("union")