Fork me on GitHub
#cursive
<
2017-08-01
>
cfleming00:08:31

@rgdelato So there’s no way to use an external linter in Cursive right now, you’d have to use it externally from lein or something similar.

cfleming00:08:09

I’m not sure what Joker’s linter provides, but my understanding is that it provides similar checks to the ones Cursive does.

cfleming00:08:34

Cursive is actually still relatively limited in its checks, I have plans to add more but it’s in a long queue 🙂

cfleming00:08:59

If there’s something Joker does that you’re missing, I’d be interested to know about it.

rgdelato01:08:03

Ah, I see. Roman had tweeted this at me and it looks like I misunderstood what he meant: https://twitter.com/roman01la/status/892068553888813058

cfleming01:08:28

Ok, looks like he’s saying there that Cursive already does the same thing.

cfleming01:08:46

Cursive’s main problem is false positives due to macros.

rgdelato01:08:47

Joker has the same problem, but you can add macro names to a .joker file to exclude them. I guess Cursive also has a way to easily add exclusions?

cfleming01:08:27

So, not really, no - that’s actually a pretty hard problem. How does Joker handle that?

cfleming01:08:35

Actually, let me read the doc, one sec.

rgdelato01:08:25

anyway, sorry for the confusion, I was just trying to figure out what Roman was referring to

cfleming01:08:38

Ok, so that’s interesting. What it looks like the .joker file contains is a list of forms which are macro forms, and it then won’t warn you about those.

cfleming01:08:52

But that’s only solving part of the problem - say you have a new let like form, that will create new local bindings that the linter will also need to know about it, and there’s no good way that I can think of to communicate that.

cfleming01:08:50

Cursive handles the case described in the Joker doc like this: https://cursive-ide.com/userguide/macros.html

cfleming07:08:39

@paudo I’ll check the code and try to come up with a plan to diagnose that - I’ll let you know.

paudo07:08:02

So, I fixed it by deleting the IntelliJIDEA directories from Library/Application Support, Library/Caches, and Library/Preferences. Then I broke it again by re-importing my settings!

paudo08:08:03

Fixed it again by deleting Library/Preferences and then broke it again by importing all setttings except CursiveIde.

val_waeselynck08:08:19

Is there a way to prevent IDEA from freezing when entering big-ish commands in the REPL ?

val_waeselynck08:08:32

(like a few dozens LoC)

paudo08:08:26

@cfleming Importing just CursiveIde settings does not break it! I’m now going to import settings one by one until it breaks.

paudo08:08:58

Importing IntentionManager settings breaks it again. I can export just the IntentionManager settings and attach the jar to the GitHub issue.

paudo08:08:29

Actually this looks pretty straight-forward! intentionSettings.xml contains only the following:

paudo08:08:33

<application>
  <component name="IntentionManagerSettings">
    <ignoreAction name="Clojure/Resolution" />
  </component>
</application>

paudo08:08:21

Removing <ignoreAction name="Clojure/Resolution" /> fixes the issue. Not sure how I ended up with that!

cfleming08:08:47

@paudo That’s really weird. I’ll investigate that tomorrow.

cfleming08:08:49

What I suspect is happening is that when an item ends in “…”, it makes it look like you should expand the menu out to the right with the arrow. I’m not sure how to communicate that you need to select it with enter, but that that will lead to more actions.

cfleming08:08:38

Once the menu has been expanded out, there are some disable actions there that it’s probably easy to select by accident - I’ll see if I can make that happen tomorrow.

paudo08:08:15

That’s probably it alright. At least I know where to go if it happens again.

wilkerlucio19:08:37

is there a way to run a REPL command on file save?

cfleming22:08:29

@wilkerlucio In general, IntelliJ doesn’t have on-save actions, since it saves automatically at unpredictable times. But if you execute a REPL command, the files will be saved then.

cfleming22:08:37

What are you trying to achieve?