Fork me on GitHub
#cider
<
2017-05-12
>
escherize00:05:01

I keep seeing references to the cider and cljfmt compatibility, but I can’t find a feature in cider or anything related to it. Does anyone have a link or a command or something similar?

benny05:05:03

Reposting here from #cljsrn in case I have better luck: Trying to get more familiar with REPL in general, but trying to figure out how to get completion to work with Cider when writing my RN app, any tips?

richiardiandrea05:05:24

@benny if you have company installed there should not be any problem

richiardiandrea05:05:56

Please keep in mind that ClojureScript completion is a bit more basic I think so your mileage may vary

benny05:05:14

not sure how in the world I missed that, thanks for pointing it out @richiardiandrea

benny05:05:27

just missed the auto-completion layer in spacemacs

richiardiandrea05:05:49

Ah ah yeah that can be the issue 😀

benny05:05:01

thanks again!

bozhidar07:05:49

@ccann I don't understand what exactly do you mean by this. 🙂

bozhidar07:05:14

@escherize There are a few cider-format commands that would use cljfmt to reformat the code. Unfortunately the resulting formatting might be different from what clojure-mode would produce, I've been wondering for a while whether this feature is useful or pointless and we should remove it.

kiemdoder13:05:03

I'm new to CIDER and Emacs and I'm struggling to find a way to move a file in CIDER/Emacs from one directory to another. How are files moved between directories?

escherize13:05:15

But both are configurable, so bending one to work like the other or bending both to work the same should be possible. I’ll have a look.

escherize13:05:29

would sure be nice to have indentation done right™

ccann14:05:42

@bozhidar for example schema’s defn function has a docstring argument just like clojure’s defn function, except that it gets the string face instead of the comment face applied

ccann14:05:06

I can screenshot if that’s helpful

ccann14:05:10

or open an issue on cider / clojure-mode

dpsutton14:05:13

why would it get a comment face if it's a docstring argument, which I'm assuming means its a string

ccann14:05:21

sorry, I wasn’t totally accurate: clojure.core/defn has a docstring argument and it gets the font-lock-doc-face and schema.core/defn has a docstring argument that has a font-lock-string-face

ccann14:05:19

doc face helps distinguish a docstring from a string the function cares about, IMO. it also helps visually parse whether you’ve accidentally put the docstring after the argument vector, which I see a lot

bozhidar15:05:08

Hmm, I thought we fixed this ages ago. What version of clojure-mode are you using?

ccann16:05:25

5.7.0-SNAPSHOT

macrobartfast22:05:59

I usually C-c C-k (cider-load-buffer) to evaluate a buffer's forms so that I can use them; my file became unwieldy so I put some functions in another file I :require; how do I 'load' the forms in the :required file so I can use them?

macrobartfast22:05:14

there may be something deeply wrong with my approach in general, as per usual.

dpsutton23:05:28

they should be there loaded for you. Traditionally, in your ns form you have a (:require [my.deps :as alias])) and then in the file you can use those exposed functions and vars by (alias/function-name ...)

dpsutton23:05:31

does this not work for you?

macrobartfast23:05:51

it doesn't ;-(

macrobartfast23:05:20

but I'm trying to duplicate it with a simpler :require'd file to try to isolate the issue.

macrobartfast23:05:49

I'll create a fresh project and see if I can reproduce this there. As I do that, though, I should mention that I'm :require'ing in file A to file B, calling functions from A in B, and evaluating them in B right in the buffer with C-c C-c (cider-eval-defun-at-point)... that should work, right?

macrobartfast23:05:30

it crossed my mind that cider-eval-defun-at-point might not work on functions that have been brought in or something.

macrobartfast23:05:56

ok, works fine in the new project I made. so something went wrong in my current project; I'll just create a project from scratch and bring code over. thanks for the help on this!