Fork me on GitHub
#cursive
<
2023-01-12
>
simongray10:01:49

How can I make Cursive indent Rum macros properly?

greg10:01:22

I noticed that if I require clojure.core with :refer lots of symbols is highlighted. Possibly a bug. Have a look at the screenshots. I'm using Idea 2022.3.1 (IU-223.8214.52) & Cursive 1.12.7-2022.3.

cfleming09:01:38

Looks like a bug, yeah - could you file an issue for that, please?

👍 2
imre09:01:22

OOC why do you require clojure.core?

imre09:01:08

as opposed to using (:refer-clojure ...)

cfleming04:01:51

Yes, probably a better question I should have asked would be: what are you trying to achieve with that? Since clojure.core symbols are usually all referred anyway.

greg10:01:10

Tbh possibly I added it by mistake, what I realised when @U08BJGV6E pointed it out, still, acting like the previous refer (in this case the implicit refer of clojure.core) is cancelled, therefore highlighting all symbols from the first one, doesn't reflect how clojure namespace works. Another example:

(ns dev-client.test
  (:require
   [clojure.set :refer [union]]
   [clojure.set :refer [intersection]]))

(union #{:a :b} #{:a})
(intersection #{:a :b} #{:a})
Despite an error of duplicated require it is working example, but Cursive highlights the symbols required in the first refer line.

greg10:01:11

If something should be highlighted or suggested (eg. via IntelliJ inspections) is "redundant refer" or "duplicated refer".

2
greg11:01:08

> Looks like a bug, yeah - could you file an issue for that, please? I opened the issue here: https://github.com/cursive-ide/cursive/issues/2761