Fork me on GitHub

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


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


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


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


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


hmm maybe the parenthesis is matched further down the file ?


it's a new empty file


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


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


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


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?


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


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


ugly but works


@imre: That's not a bad idea!


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


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


but that goes through clojure.main


not nrepl


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


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


@cfleming: I don鈥檛 know if this is an IntelliJ problem or a Cursive one because I don鈥檛 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 鈥淪ynchronizing 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 鈥淪ynchronizing Leiningen 鈥..鈥 stuff it keeps wiping that line out. I鈥檓 just guessing with .iml file stuff, I don鈥檛 know much about IntelliJ. Is this a Cursive issue or an IntelliJ one? I鈥檓 using IntelliJ 15.0.3 Community Edition. Cursive 1.1.0-15.


@simax99: It鈥檚 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鈥檚 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.


@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.


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


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


@simax99: No, it does what you鈥檇 expect, it鈥檚 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.


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


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