Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make namespace-aliases aware of new files #369

Closed
vemv opened this issue Feb 15, 2022 · 0 comments · Fixed by #370
Closed

Make namespace-aliases aware of new files #369

vemv opened this issue Feb 15, 2022 · 0 comments · Fixed by #370
Assignees

Comments

@vemv
Copy link
Member

vemv commented Feb 15, 2022

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 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.
  • an opt-in option was passed.

n.b. a newly created ns may not be loaded yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant