Spacemacs clojure mode auto-inserts requires in ns declarations

Has anyone else noticed that spacemacs clojure mode automatically inserts requires in ns declarations as you write? Example:

    [foo.baz :as baz]))
  TYPING THIS SLASH RESULTS IN [foo.user :as user] BEING ADDED TO (:require [...])

Does anybody know how to disable this behaviour? Is it Spacemacs related, or is it a Cider option? I cannot find any documentation on it in either project.

It looks like something related to clj-refactor. Could you try disabling clj-refactor-mode and see if it is still happening?

1 Like

On Slack @benedek pointed out that this feature can be disabled with

(setq cljr-magic-requires nil)

More details are in the clj-refactor docs.

Thanks, I had simply failed to find the proper clj-refactor docs it seems. Setting to ´:prompt´ as the documentation suggests does not seem to work, but setting it to ´nil´ does disable it, so I am happy.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.