Fork me on GitHub
#cursive
<
2016-02-02
>
michael_at_sosupper11:02:53

Hi all. Question. I have a very simple new file (ns whatever (:require [clojure.java.jdbc :as sql]) , and I'm not able to close the ns form with )

michael_at_sosupper11:02:16

Structural editing I assume is preventing me, even though proper structure would have a closing ) for the ns form.

michael_at_sosupper11:02:37

even doing the shift/command/O is being silently denied

val_waeselynck11:02:51

@michael_at_sosupper: bottom -right - look for Structural:On and click

michael_at_sosupper11:02:05

Right, I could disable it. But why should I have to?

val_waeselynck11:02:49

hmm maybe the parenthesis is matched further down the file ?

michael_at_sosupper11:02:57

it's a new empty file

michael_at_sosupper11:02:18

it's either a bug, or some "feature" which I don't understand 😕

imre12:02:46

you probably have overwritten a ) with something else or copy-pasted (:require [clojure.java.jdbc :as sql] from another file?

doddenino13:02:06

A bit OT, but is IDEA ultimate license subscription only? Or can I pay for it once and use it forever without updates?

rauh14:02:29

So I'm staring an nREPL with "Run nREPL with Leiningen" and then do a load-file to start figwheel on top of it. Works except that I can't send any command at the REPL prompt. It just hangs. The browser never receives a websocket frame about it. The exact same procedure works at the command line. Thoughts? How do I start fighweel when I absolutely need to use leiningen profiles?

imre14:02:07

what I did was I made the default project config how figwheel needed it and then created a :no-figwheel profile to nil out the details that only figwheel needs

imre14:02:31

that way whenever I don't need figwheel I can just run other lein tasks with that profile on

imre14:02:48

ugly but works

rauh15:02:16

@imre: That's not a bad idea!

rauh15:02:41

I might go that way. I'm currently trying the fighweel +nrepl way described in their wiki but nothing works at all...... ;(

imre15:02:06

I think they have a section on their wiki specifically for Cursive users

imre15:02:17

but that goes through clojure.main

imre15:02:20

not nrepl

rauh15:02:02

Yeah I wish I could just specify ANY command and use that REPL.

rauh15:02:19

Ugh, just got it working. Piggieback middleware wasn't applied since I had an exception (wrong :main). Now it works and I only deal with remote nREPLs in Cursive. No more problems. fingers crossed

simax9920:02:03

@cfleming: I don’t know if this is an IntelliJ problem or a Cursive one because I don’t know where one ends and the other starts. My problem is, I keep marking a directory (CLJC) as a source root in my project. I have CLJ and CLJS folders marked as source roots and when the project opens the icons for all 3 folders look fine but after I see “Synchronizing Leiningen projects” etc on the IntelliJ status bar the icon for CLJC folder reverts back to the standard folder icon - and it stops my project from building. I have to remember to Mark Directory as Sources Root every time I open the project. I had a poke around in the .iml file and noticed the following lines: <sourceFolder url="file://$MODULE_DIR$/src/clj" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/cljs" isTestSource="false" /> So I added another for my CLCJ folder <sourceFolder url="file://$MODULE_DIR$/src/cljc" isTestSource="false" /> But after the “Synchronizing Leiningen …..” stuff it keeps wiping that line out. I’m just guessing with .iml file stuff, I don’t know much about IntelliJ. Is this a Cursive issue or an IntelliJ one? I’m using IntelliJ 15.0.3 Community Edition. Cursive 1.1.0-15.

cfleming21:02:26

@simax99: It’s not either, really. The idea is that when you manage your project with leiningen, when you sync Cursive will update all your config to match what’s specified in the project.clj. The Maven integration works the same way. So what you need to do is add that directory as a source directory in your project.clj, and Cursive will mark it as such when it syncs.

cfleming21:02:35

@michael_at_sosupper: Yes, normally once the file gets unbalanced, you have to disable structural editing temporarily. Another workaround is just to cut and paste a closing paren where you need it.

cfleming21:02:10

I’m assuming that your unbalanced parens are the result of a cut and paste - I’m planning functionality to make that harder to do.

simax9921:02:50

@cfleming: Great, thanks that did the trick. So what does Mark as source root in IntelliJ mean. Does it relate to VCS?

cfleming21:02:19

@simax99: No, it does what you’d expect, it’s just that it gets overwritten in managed projects (lein, maven etc). This is so that if your project.clj or pom changes (i.e. you remove something as a source root in that file) the changes will be correctly propagated to the project.

cfleming21:02:56

If your project were a plain IntelliJ project rather than a managed one, you’d use that to manually specify your sources.

simax9921:02:52

@cfleming: Ah, ok. Thanks for the explanation. All good now.