Fork me on GitHub
#cider
<
2016-01-27
>
bozhidar14:01:07

we don’t treat any keyword specially in our indentation logic

bozhidar14:01:27

maybe you should show us an example about the nature of your problem?

isaac15:01:49

@nicola: I have the same question does cider switch nrepls automatically for clj/cljs projects based on file extension?

cichli15:01:01

@isaac: yes if you have a cljs repl active, it will use that for eval/completion/etc. in .cljs files

cichli15:01:21

(as of version 0.10.0 I think)

nicola15:01:58

@cichli: how does cider figure out which repl is cljs?

cichli15:01:16

Specifically the track-state middleware is what informs the client of which REPL (technically nREPL session) is CLJ/CLJS - https://github.com/clojure-emacs/cider-nrepl/blob/master/src/cider/nrepl/middleware/track_state.clj#L141-L142

nicola15:01:45

@cichli: my workflow - start nrepl for clj, start nrepl for cljs and in it start figwheel and start cljs (Piggieback), and it does not work with cider machinery - i.e. only one nrepl active - evals are sent to clj or to cljs and do not depend on file type.

isaac15:01:48

@cichli: my workflow: 1. boot launch clj repl 2. cider connected clj repl (in this case, I can only eval clj code) 3. start-cljs-repl at cider’s clj repl (in this case, I can only eval cljs code) my question: Is there any way make repl can eval both clj and cljs code according the file type?

nicola15:01:11

@isaac: you need two nrepls to work with clj and cljs

isaac15:01:04

two cider client or launch two repl

nicola15:01:43

launch two repls and connect to cider clients

nicola15:01:03

may be i'm wrong

nicola15:01:34

potentially i think it possible to run two repl servers in one java process, but that's another problem

cichli15:01:51

You can use cider-create-sibling-cljs-repl (with cider-cljs-lein-repl appropriately set) rather than manually creating two connections (although AFAIK what you’re trying should still work, provided you’re associating the connections with the right project, which I think CIDER does automatically now)

cichli15:01:21

You don’t ever need to run two nREPL servers; nREPL supports multiple concurrent sessions

isaac16:01:32

@cichli: follow your guide, I opened two cider connections. but I both clj and cljs file just use the same(the first opened) cider connections.

nicola18:01:27

@cichli i understand my problem, we use reagent template, where both clj & cljs are in the same project.clj