Fork me on GitHub
#cider
<
2018-06-27
>
hagmonk16:06:47

anyone know how to enable the "new" parinfer smart mode? do I need a special package or is it bundled into cider?

justinbarclay16:06:22

Pretty sure the Emacs implementation of parinfer doesn’t have smart mode, I know the maintainer of the package was working on it a few months back, but he’s been radio silent for awhile.

mattly17:06:49

You might want to ask about it in #parinfer

hagmonk19:06:15

It's never clear to me what parts of this Cider pulls in itself, which is what prompted me to ask here. I was using Spacemacs, but nowadays Doom Emacs, both of which I think explicitly include clojure-mode and cider at the very least

dpsutton19:06:29

> ;; Version: 0.18.0-snapshot > ;; Package-Requires: ((emacs "25") (clojure-mode "5.7.0") (pkg-info "0.4") (queue "0.1.1") (spinner "1.7") (seq "2.16"))

dpsutton19:06:44

lists it right at the top of cider-el

dpsutton19:06:00

these are the dependencies

hagmonk19:06:38

huh, does use-package parse the comment to figure that out? I had no idea

dpsutton19:06:10

i believe those are meaningful but i'm not sure whether its emacs or package system or somewhere else

dpsutton19:06:24

ah i remember something in emacs breaking on parsing those at one point. so emacs cares

dpsutton19:06:33

but that might be because package.el is part of emacs now

hagmonk19:06:01

I guess file scope overrides are a thing, and they are formatted similarly …

dpsutton19:06:50

i don't follow

hagmonk19:06:03

I was just reminded that "yes, there are other places in emacs where comments are interpreted and influence the runtime"

hagmonk19:06:08

Which feels pretty gross, but hey

dpsutton19:06:04

have you seen the C code?

dpsutton19:06:12

only time i've seen comments be meaningful

dpsutton19:06:05

DEFUN ("set-buffer", Fset_buffer, Sset_buffer, 1, 1, 0,
       doc: /* Make buffer BUFFER-OR-NAME current for editing operations.
BUFFER-OR-NAME may be a buffer or the name of an existing buffer.
See also `with-current-buffer' when you want to make a buffer current
temporarily.  This function does not display the buffer, so its effect
ends when the current command terminates.  Use `switch-to-buffer' or
`pop-to-buffer' to switch buffers permanently.
The return value is the buffer made current.  */)

dpsutton19:06:20

that's a literal comment in C code that makes the journey through compilation

hagmonk19:06:01

I didn't know C macros could wrap comments like that. What foul magick …

justinbarclay19:06:34

Yeah thats always been my thought when looking into emacs internals “This feels gross, but hey…”

hagmonk19:06:20

and that reminds me I need to check in and see how the remacs project is coming along

hagmonk19:06:58

recent commits! last time I tried to use it, I didn't get very far, but that was more than 6 months ago

Garrett Hopper20:06:43

Is there a .dir-locals.el-friendly way to make clojure-cli projects use an alias from deps.edn for clj and cljs repls? Ideally the cljs would be a separate alias.

dehli20:06:09

Is there any way to run clojurescript tests within cider?

dehli20:06:46

I saw https://cider.readthedocs.io/en/latest/clojurescript/ say that it's not supported, but I was wondering if there were any workarounds

Garrett Hopper20:06:47

Alright, cider-clojure-cli-global-options seems to do the trick.

dehli22:06:39

So running tests isn't as big of a deal right now for me 🙂 I could just run them outside of cider.. but i'm having issues getting pprint working in cljs. Anyone know if that's supported? Edit: Seems like right after I ask I figure it out... just had to require cljs.pprint

bozhidar22:06:14

@dehli You can just run the tests in the REPL, as you’d normally do without CIDER.

bozhidar22:06:16

What’s not supported is running those tests via cider-test commands, as the underlying functionality hasn’t been ported to ClojureScript yet.

bozhidar22:06:49

> huh, does use-package parse the comment to figure that out? I had no idea

bozhidar22:06:15

package.el parses this, not use-package. use-package is just a convenient macro to work with package.el packages.

dehli22:06:40

Ohhh, that's awesome news! 🙂 For some reason doing cider-jack-in-cljs doesn't seem to load the files in my test directory. I'll see if there's a configuration I'm missing

bozhidar22:06:47

cider-jack-in-cljs doesn’t load anything. 🙂 You have to evaluate each namespace yourself your use one of the commands for loading all files in a project.

bozhidar22:06:27

We don’t load projects on jack-in automatically, as they might have some nasty side-effects, associated with evaluating the source code.

dehli22:06:45

Ahh, thanks for the explanation! When I run cider-load-buffer from a file in src it can import all the requires. For some reason when I do the same from a file in test it says that it could not locate the namespace of a file I have under the test directory.

bozhidar22:06:38

Hmm, that’s odd. It shouldn’t be CIDER-related.

dehli22:06:39

Well it's not really that it's from src or test, it's that the file I'm requiring lives in test

dehli22:06:20

Thanks! It must be something wrong with my classpath

bozhidar22:06:29

Yeah, probably. Likely some issue from the way the project is setup?

dehli22:06:39

Ya, I'm using deps.edn and I don't specify test in there anywhere. I'll keep digging. Thanks for your help and all the work you do with cider!

mgrbyte09:06:12

doing the same (deps.edn) - probably need to add "test" to :paths there

dehli12:06:20

Thanks! That's what I ended up doing 🙂

bozhidar22:06:27

You’re welcome!