For a ns named foo.bar.baz, baz or bar.baz would be idiomatic aliases.
For a newly created namespace foo.bar.baz, no other namespace will have aliased it yet, because it's new.
Yet, as a clj-refactor.el user, if I type e.g. baz <slash> i.e. cljr-slash, ideally I would get completions for inserting a foo.bar.baz :require libspec.
Task
Make namespace-aliases also return tentative Sierra-style aliases if:
they are not taken already by an existing alias
there exist files that would satisfy this alias (e.g. foo/bar/baz.clj exists)
and this file is not aliased in any dependent namespaces.
Context
https://stuartsierra.com/2015/05/10/clojure-namespace-aliases is a relatively popular pattern of aliasing.
For a ns named
foo.bar.baz
,baz
orbar.baz
would be idiomatic aliases.For a newly created namespace
foo.bar.baz
, no other namespace will have aliased it yet, because it's new.Yet, as a clj-refactor.el user, if I type e.g.
baz <slash>
i.e.cljr-slash
, ideally I would get completions for inserting afoo.bar.baz
:require libspec.Task
Make namespace-aliases also return tentative Sierra-style aliases if:
foo/bar/baz.clj
exists)n.b. a newly created ns may not be
load
ed yet.