cursive
cursive copied to clipboard
Organize imports removes used namespaces on CLJC
Hello, I found an issue when using organize imports in cljc files. Here is an example:
(ns some-namespace
(:require [clojure.test :refer [deftest is]]))
#?(:cljs
(deftest some-test
(is (= 1 2))))
When I run organize imports, Cursive removes the :refer
parts because it considers it was not used (causing the code to break), but it is used, just not on CLJ. So seems like Cursive should be checking both clj and cljs separately, and only if any does not use it, then should it be removed.