This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (7)
- # aws-lambda (1)
- # beginners (161)
- # cider (19)
- # cljsjs (5)
- # cljsrn (30)
- # clojure (80)
- # clojure-korea (2)
- # clojure-new-zealand (8)
- # clojure-russia (73)
- # clojure-sanfrancisco (1)
- # clojure-spec (14)
- # clojure-uk (12)
- # clojurescript (84)
- # cursive (7)
- # defnpodcast (8)
- # dirac (16)
- # events (2)
- # garden (7)
- # hoplon (178)
- # off-topic (2)
- # om (58)
- # om-next (2)
- # onyx (21)
- # pedestal (1)
- # planck (15)
- # protorepl (32)
- # re-frame (31)
- # untangled (1)
- # yada (5)
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
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: https://github.com/hashobject/perun/pull/104/commits/4251802e36c720a2680d298f2789b0d2744a51c0 (if you should consider changing that behavior)
@jasongilman ah that's cool. Still changing the default to only refresh already loaded namespaces seems sensible to me.
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.
@jasongilman yeah, with the help of your Atom setup Gist. Using the paredit thing now.
Btw, this loading indicator when evaluating stuff that takes longer is super cool 👍
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?
@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.
@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 /Users/leespector/.atom/init.coffee:57 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
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:
Is this intentional? Typing
((defn name [params] body))
conjworks as I'd expect, but
(ifdoes 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