We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
cljr-slash
1 parent f5f44fd commit cd6b6fbCopy full SHA for cd6b6fb
clj-refactor.el
@@ -1956,6 +1956,11 @@ the alias in the project."
1956
(cljr--goto-closest-ns)
1957
(looking-at-p "(\\s-*in-ns")))
1958
1959
+(defun cljr--in-reader-literal-p ()
1960
+ (save-excursion
1961
+ (clojure-backward-logical-sexp 1)
1962
+ (looking-at-p "#")))
1963
+
1964
;;;###autoload
1965
(defun cljr-slash ()
1966
"Inserts / as normal, but also checks for common namespace shorthands to require.
@@ -1966,7 +1971,8 @@ form."
1971
(interactive)
1967
1972
(insert "/")
1968
1973
(unless (or (cljr--in-map-destructuring?)
1969
- (cljr--in-ns-above-point-p))
1974
+ (cljr--in-ns-above-point-p)
1975
+ (cljr--in-reader-literal-p))
1970
1976
(when-let (aliases (and cljr-magic-requires
1977
(not (cider-in-comment-p))
1978
(not (cider-in-string-p))
0 commit comments