Fork me on GitHub
#cursive
<
2020-10-19
>
onetom03:10:46

im trying to use net.sf.jtidy/jtidy {:mvn/version "r938"}, but in (:import (org.w3c.tidy Tidy)) it's marked as unresolved. is it possible that it's caused by the :mvn/version starting with a letter instead of a number?

cfleming04:10:48

Shouldn’t be, I don’t think. Check in File-&gt;Project Structure to see if a library was created, and if it’s attached to your module correctly.

👍 3
Oliver George03:10:46

What's the intellij repl command to find something in the repl history. E.g. "<ctrl-r>(def db @re<tab>" to find the last full command with that string in it.

onetom04:10:18

Cmd-Opt-E on macOS action name is Search REPL History

Oliver George04:10:17

Was hoping for something more like bash command completion but greatly appreciated anway

onetom04:10:06

u can still type anything in that dialog and that filters the list by fuzzy searching whatever u typed

onetom04:10:26

just like in most intellij tool windows or dialog boxes or popups

cfleming04:10:58

RIght, that view should narrow down on typing, if it doesn’t (or doesn’t do what you expect) let me know.

Oliver George04:10:05

Will do. It's sluggish but I've been playing with a large chunk data. I suspect I'll need a fresh history to see it working well.

Oliver George04:10:32

@cfleming do you think IntelliJ will ever have a repl comprable to the chrome console (richer ways to drill into data...)

cfleming04:10:45

Yep, I’ve been working on a data browser, and that should be available at some point soon for inline evaluation in the editor, as well as possibly in the REPL output too.

Oliver George04:10:13

That sounds quite exciting

cfleming04:10:38

I’m quite excited 🙂

cfleming04:10:01

I have a bunch of different changes on the go, they should all be in there over the coming months.

AJ Jaro13:10:36

I have a CLJC namespace that I want to “Find Usages” for. When I command click or use the context menu, it does not display any references for CLJS usages of that namespace. However, when I “Find Usages” for any functions in that namespace it works as expected. Cursive version: 1.9.4-eap6-2019.3

AJ Jaro13:10:25

The same situation occurs with this version: 1.9.4-eap6-2020.2

cfleming01:10:48

Hmm, I’ll check that - CLJC is still a bit funky unfortunately.

octahedrion14:10:30

a weird thing happened the other day, I don't know what I did but suddenly "send top form to REPL" changed its behaviour, normally I can be anywhere in a form that's inside a comment form and go send-top-form-to-REPL and it will send the top form but not the parent comment form to the REPL, but now it changed to send (comment (my-top-form...)) to the REPL. Restarting IntelliJ fixed it but I don't know why it did it

cfleming01:10:22

That can happen if IntelliJ decides to index at the time you’re sending the form - I’ve been meaning to add a workaround for that.

octahedrion09:10:34

uh indexing I wish IntelliJ wouldn't be quite so keen to index all the time

d5p19:10:08

what setting controls soft-wrap in the repl? i want it completely disabled and from what i can see it is, but it always auto-enables when an output line is long enough

cfleming01:10:04

It should be controlled by the soft-wrap icon in the REPL toolbar - is that not working? I’m pretty sure this never happens to me.

d5p01:10:58

yeah it’s strange, I have it turned off via the icon in the toolbar, but it turns itself on when one of my output lines is long enough , i haven’t determined the exact length that makes it turn on but it’s rather frustrating

d5p05:10:25

hi @cfleming, to easily reproduce this it seems once an output line is over 100000 chars it turns on soft-wrap automatically , i.e (println (repeat 50000 "x")) , do you know of any intellij internals that might be setting this limit? can’t see any settings anywhere

cfleming05:10:14

@U0HJCPF3J Looks like https://youtrack.jetbrains.com/issue/IDEA-138523, there’s a property you can set using Help-&gt;Edit Custom Properties…

cfleming05:10:17

> You can disable it by setting editor.soft.wrap.force.limit to a very large value (longer than any lines you work with), but you’ll most probably get a worse performance, so it’s a tradeoff for now.

d5p05:10:07

ahh thanks!

manutter5119:10:12

Looks like there’s a *print-right-margin* var you might be bumping into?

manutter5119:10:51

That would be a Clojure thing not a cursive thing, so cursive setting won’t affect it.

katox08:10:18

It would be really cool if cursive REPL could change this setting so the pprint would respect the REPL window width automatically.

lread19:10:50

Even though my fingers have gotten used to spacemacs, I am finding Cursive is the bomb when doing Java interop. So nice to be able to dig deep into those Java objects! Thanks for Cursive @cfleming!

18
cfleming01:10:04

Thanks for the kind words! I’m glad it’s helpful. I’m planning to document all the interop functionality, it’s not all very discoverable right now.

j23:10:38

I'm getting a "Run Configuration Error: No modules containing clojure.main found" when I try to add a run configuration. Can someone help?

cjmurphy00:10:03

Have a look in File/Project Structure and you may find your project has no JDK defined for it.

j00:10:51

Thanks @U0D5RN0S1! That's the first thing I checked. I also made sure that all my new default projects has a JDK defined.

cjmurphy00:10:44

And Modules / Dependencies has a has a Module SDK?

j00:10:04

Yes, I just checked, and it's set to the Project SDK

cjmurphy00:10:38

Invalidate Caches and Restart?

j00:10:51

Just did it, and still the same result. I'm trying to use deps.edn to setup the run configuration instead of lein. I have the simplest deps.edn file right now. Not sure if it's relevant

{:deps {}}

cjmurphy00:10:58

Usually you right click on it and 'Add as Clojure Deps project'. But you would want a better file than that...

j00:10:24

oh! where do I right click?

j00:10:26

Oh! That worked! Thanks @U0D5RN0S1! i didn't know about that step!

j00:10:42

Do I have to do that every time I make a new project?

cfleming00:10:28

@U419CTSQN How did you create that project?

cjmurphy00:10:07

Yes a deps.edn project. Else you can add the xml file under .idea yourself. But no need these days...

j00:10:09

I made a new folder, then opened it with intellij. Ahh. I think that might've been my mistake

cfleming00:10:00

Right, at some point you need to let Cursive know that you want this to be a deps project using whichever deps.edn. If you just open an empty project then you’ll get… an empty project 🙂

j00:10:04

Thank so much again @U0D5RN0S1. I'll make sure to create all my project via the the new project wizard next time

j00:10:36

Lol, yeah. I feel really dumb facepalm

cfleming00:10:00

Don’t feel dumb, IntelliJ is huge and confusing if you’re not used to it.

cfleming00:10:30

And in particular it works a bit differently to more file-based things like Emacs, VSCode or whatever.

cfleming00:10:37

Since it’s more project-based.

cjmurphy00:10:43

Ha. No worries. Yes setup things can be tough sometimes.

j00:10:01

Yes, I see that now. I'm coming from vscode, so that was a learning experience. Thanks again! 😄

j00:10:47

thanks @cfleming as well! 😄

👍 5