Fork me on GitHub
#cursive
<
2017-07-19
>
wilkerlucio01:07:05

@cfleming hello, not sure you saw this, I just updated IntelliJ for 2017.2, and now this is happening: https://www.dropbox.com/s/spf5hepegkvh5ud/Screenshot%202017-07-18%2022.27.23.png?dl=0

wilkerlucio01:07:20

not all of then, in my file only one of the defn got this, which is pretty weird

wilkerlucio01:07:20

wow, I just removed and then typed again, and now it's back to normal :face_with_rolling_eyes:

wilkerlucio01:07:39

ok, it happened again, with a different function, something seems odd about the arity detection

mfikes02:07:12

^ I’ve seen this arity stuff recently as well. If I wait a bit (half a minute), they clear out on their own.

zylox04:07:57

That seems bothersome. Especially if there is some analysis spinning in the background.

chrisbroome13:07:48

just got cursive up and running on IntelliJ CE last night. one that that's really bugging me is that it doesn't let me just type and bracket ()[] wherever I want. it's trying to be "smart" about what it does but it ends up making the user experience pretty frustrating.

chrisbroome13:07:40

for example, in order to insert a missing ) in the correct spot, I have to copy an existing ) and paste it in place instead of just being able to type )

chrisbroome13:07:26

I'm guessing it gets easier to use with time, but transitioning from any other editor (including other IntelliJ based editors), it's really counter-intuitive.

chrisbroome13:07:37

Is there a setting I can use to turn that "smart" behavior off?

sgerguri13:07:47

@chrisbroome In the bottom right corner there is “Paredit” (or “Parinfer”). If you click that and select “Structural Off” it will turn off this “smartness” and let you insert stuff wherever you want.

chrisbroome13:07:05

awesome thank you!

chrisbroome13:07:26

it was set to Paredit

sgerguri13:07:43

I find that if you’re doing structural editing you cannot really mess things up but I sometimes hit the backspace instead of killing an S-expression as well and occasionally mess things up.

sgerguri13:07:31

Mind you I also use IdeaVim so that adds to the complexity since Paredit does not really prevent you from x-ing a symbol (i.e., deleting a character in normal mode by hitting the “x” key).

chrisbroome13:07:53

lol yeah that would be "fun"

chrisbroome13:07:14

ESC d$... woops

sgerguri13:07:10

I think if you take the time (and it’s not a lot fortunately) to familiarise yourself with structural editing and learn the keybindings you’ll experience a massive productivity boost. That’s one of the awesome things of coding in a Lisp.

chrisbroome13:07:34

you're probably right

chrisbroome13:07:51

need to think more in data structures since that's what the language is defined in

zylox13:07:29

i think a pretty normal flow is to bind the hotkey for toggling structural editing and toggling to fix small issues, but for the most part stay in some structural form

zylox13:07:45

that being said, i don't do that. i do think its a good flow though

chrisbroome13:07:50

ah that would make sense

cfleming22:07:44

@wilkerlucio @mfikes That’s very strange. What’s odd is that it’s reporting the wrong arity (that form pretty clearly has args), if it were an indexing problem I’d expect the reported arity to be correct.

mfikes22:07:10

@cfleming Last time I saw it (earlier today), I first typed (defn) which starts off in an invalid state, and is properly marked as such. Then I proceeded to fill in the the function definition, but the markings stayed. My best guess is that I have other things running on my box, which are taking up sufficient CPU to delay background marking task. (My son has me rendering some 3D animations for him.) Otherwise, it might actually be the case that the background thread died. If I see it again, I’ll be sure to open the Event Log.

cfleming22:07:30

@mfikes Hmm, that could be - that seems pretty seriously delayed though, especially in the screenshot Wilker posted.

mfikes22:07:12

Yeah, I agree @cfleming. I’d be more satisfied if the root cause was a static analysis error earlier in the file that derailed things.

cfleming22:07:35

I’d be interested to know if either of you have errors in your log when it happens (Help-&gt;Show log in Finder…)

mfikes22:07:08

Cool. I’ll check there if it happens again.

wilkerlucio22:07:48

sure, if I get that again I'll get the log

mfikes22:07:18

A few days ago I went through a period of 2 or 3 days where IntelliJ and/or Cursive was completely locking up every 2 to 3 hours, and I had to force kill it. Those problems have since gone away. (I changed nothing to make it arrive, and nothing to make it go away.)

wilkerlucio22:07:42

@mfikes are you on IntelliJ 2017.2?

wilkerlucio22:07:19

ok, just a guess, because I started seeing the issue after upgrading yesterday, but might be a coincidence

wilkerlucio22:07:46

@cfleming unrelated question: today I added a dependency that was installed via lein install (not a deployed one), but when I try to compile my JS it's not finding the dependency, I noticed this dependency is not on the classpath on launch, but it is present at the External Libraries when I look there, you have an idea what can be going wrong here?

wilkerlucio22:07:32

also, compiling via terminal works fine, just when launching from cursive it's missing

mfikes22:07:06

@cfleming I see quite a few of these

2017-07-19 11:16:00,235 [  38653]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: core.cljs 
2017-07-19 11:16:00,235 [  38653]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: core.cljs 
2017-07-19 11:16:00,236 [  38654]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: core.cljs 
2017-07-19 11:16:00,236 [  38654]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: state.cljs 
2017-07-19 11:16:00,236 [  38654]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: state.cljs 
2017-07-19 11:16:00,236 [  38654]   WARN - tectAndAdjustIndentOptionsTask - Indent detection is too long for: state.cljs 

cfleming22:07:59

@mfikes A few users have reported the slowdown issue, and I believe it’s due to the indexes being slow for CLJS interop. I have a fix for that as part of a longer project to improve that side of things, it should be out soon. Hopefully that helps.

cfleming22:07:21

@wilkerlucio Does lein classpath show it?

cfleming22:07:55

@mfikes Are those the ClojureScript core files?

mfikes22:07:08

Some of them were

cfleming22:07:08

They’re pretty big, which might be why the indent detection times out.

mfikes22:07:08

I ignored the ClojureScript ones (they are a little unfair to Cursive), but the ones I pasted above are not, they are small ones from my own code.

cfleming22:07:31

@wilkerlucio If you look at your Project Structure (Cmd-;), and then look at your module, is that lib in your deps?

wilkerlucio22:07:41

the files on my machine on the issue were small, but my home machine (where I got the arity issue) is currently being slow in general, and for some reason IntelliJ was constantly using 200% of my CPU (even I was not doing anything with it)

cfleming22:07:09

@mfikes Do those files contain interop? If you were experiencing this interop problem the other day, that might have caused it too.

cfleming22:07:29

@wilkerlucio I wonder if that is the CLJS indexing issue too.

mfikes22:07:15

@cfleming The files I’m working on have a decent amount of React Native interop calls as well as quite a few #js literals

cfleming22:07:31

@mfikes @wilkerlucio If you’d like to try out the CLJS change, go to the plugin repo here: https://plugins.jetbrains.com/plugin/8090-cursive, then click on “dev” to see the dev channel, and download the 1.6.1-snapshot2 build corresponding to your IntelliJ version.

wilkerlucio22:07:42

@cfleming interesting, when I checked my modules, it had 2 different modules, one of then was missing the library

mfikes22:07:57

Cool. I’ll give it a try.

cfleming22:07:02

@wilkerlucio Hmm, that is strange. Is this a lein project?

cfleming22:07:21

Did you have modules like module and module_1?

wilkerlucio22:07:45

module-1 to be more precise

cfleming22:07:09

Somewhere recently something broke in the lein importing, and sometimes modules get duplicated. If you remove the duplicate (module-1) and refresh, hopefully that might help.

wilkerlucio22:07:15

ha, after removing the one with bad dependencies it's now working again