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

completion "contraction"

Open laurentpetit opened this issue 12 years ago • 0 comments

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")

laurentpetit avatar Jun 15 '12 20:06 laurentpetit