clojure-emacs / refactor-nrepl

nREPL middleware to support refactorings in an editor agnostic way
Eclipse Public License 1.0
255 stars 69 forks source link

Implement "suggest" option for the `namespace-aliases` op #370

Closed vemv closed 2 years ago

vemv commented 2 years ago

Fixes https://github.com/clojure-emacs/refactor-nrepl/issues/369

I've tried it over my local clj-refactor.el copy and it works smoothly and quickly, aided by the usual measures we take for performance (parallelism, caching)

The gist of the feature is that if I create a new namespace called my.prefix.foo, then in another ns I'll be able to type foo <slash>, and cljr-slash will insert a my.prefix.foo :as foo libspec.

prefix.foo would also work, i.e. both foo and prefix.foo are suggested aliases for my.prefix.foo.

Other minor tweaks also included in the PR, one per commit.

vemv commented 2 years ago

This one has worked well for me over the last few days.

PR can be reviewed