Fork me on GitHub

I have two subdirectories under the src directory: MyProject/src/MyProject and MyProject/src/utils and the utils one isn't getting picked up. I am using lein, and it says it is using lein from the correct directory which stores the project.clj file (the top MyProject directory). It works fine from a manually-launched lein repl, but not from atom.


So I just closed the Clojure REPL window and now I'm wondering how I can get it back 😄 toggling it brings up a new window but it doesn't have the same "state" as in no previous evaluations and no connection


(I started an nREPL port manually and connected to it if that matters)


Also one general concern: when connecting to a REPL proto repl reloads and potentially loads namespaces that I haven't loaded but that are on the classpath. In this case it tried to load+run my migrations which failed because the DB wasn't running.


This problem has occurred in another project I'm involved with as well where it was solved like this: (if you should consider changing that behavior)


You can disable the automatic refresh when the REPL starts in the settings.


For the time being when you close the REPL it closes the connection.


@jasongilman ah that's cool. Still changing the default to only refresh already loaded namespaces seems sensible to me.


Yeah I didn't know you could do that.


Is that something that could be manually setup in user.clj?


Really excited to see Atom getting better and better. Tried it again and again and really wanted to use it but the indentation issue just was a blocker.


@martinklepsch: Did you get past your indentation issues?


@jasongilman yeah, with the help of your Atom setup Gist. Using the paredit thing now.


Cool, I'll be back later. I have to head out.


Btw, this loading indicator when evaluating stuff that takes longer is super cool 👍


I like that too. That's a feature from contributor @carocad


I have an atom noobie question: I’ve tried finding project that use atom (electron) to run web apps inside atom. Like a browser tab. I’m interested in this for the same statement @jasongilman made at the conj: separation between program development and output is undesirable. Especially devtools seem to be in the wrong app (the browser) instead of the editor. And why the divide, anyway? Devtools should be in your editor, you want the debugger in your editor, you want to see breakpoints there, and the program output. And it seems that electron should be able to do all of that?


And what about inline devcards?


@puzzler: you asked "Have you tried leaving parinfer in paren mode?"... but I don't know what that means or how to do it. Perhaps you could spell it out?


I'm trying to get a lein repl going for an existing project. I've discovered developer mode and setting a project directory. My project has the proto-repl dependency. I find if the project.clj is the current file I can get a local repl going (rather than the default one). I'm getting the message Starting REPL with lein in /home/chris/IdeaProjects/advent-of-code. In this advent-of-code directory there is a user.clj file. Perhaps that's the wrong place for it, because as the repl is starting up it gives an error with the cause 'Could not locate user__init.class or user.clj on classpath'. This setup worked with IDEA. I'll experiment with the project directory now...


Stuck - tried putting user.clj in various places to no avail. Even changed permissions to 777 just in case that's the reason this file can't be found.


I fixed the problem. Noticed that project.clj has :source-paths ["dev/server"]. So I put user.clj in there. It seems that somehow IDEA was less strict about this.


try simply :source-paths [”dev”] @cjmurphy


thanks, will do simple_smile


@lspector Parinfer has two modes, "Indent mode" and "Paren mode". In ProtoREPL, you can toggle by clicking on the place where it displays the mode at the bottom. I'm not sure how you'd toggle in Nightcode, but there is likely a way to do it. In any case, indent mode is probably the mode that annoys you, in which it tries to infer the parens from the indenting. If you toggle over to the other mode, it lets you do whatever you want with the parens and adjusts the indenting to match the parens, which is likely what you want.


It takes a while to get used to it but I like indent mode for most work and switching to paren mode when pasting in code. There are keybindings you can see in the Parinfer package settings


@puzzler: Ah! What I had been missing was even simpler but that led me to it -- I was in Plain Text mode and had to switch to Clojure by clicking on the mode in the lower right corner. I just hadn't noticed that. Now command-shift-i re-indents, which is exactly what I wanted. So that's great. FWIW I definitely don't want what you're calling "indent mode," which I think of as "parinfer," and I also don't want what I've seen called "strict paredit mode," where it prevents you from adding/deleting brackets in some places. I assume the "strict" switch in the mode line is about the latter, and is the lambda switch about the former? In any event, I find that I generally get what I consider reasonable behavior with the lambda lit up and the "strict" not lit up... which is good, but I also find that when I play with these and also type (including mismatched brackets) I get

Uncaught TypeError: Cannot read property 'start' of undefined
Show Stack Trace
This is likely a bug in Atom. You can help by creating an issue. Please explain what actions triggered this error.


If I type (de I get a popup offering completion of def and defn. Nice. But if I select defn, for example, it does't just autocomplete to defn, if inserts a template for an entire definition. In addition, it puts this definition in an extra set of parentheses, giving:

((defn name
Is this intentional? Typing (co and autocompleting conj works as I'd expect, but (if does the same nested template thing as (defn. I see a mix of these behaviors with other things I try, and nothing at all for some core functions like filter.