Fork me on GitHub
#cider
<
2020-03-20
>
jumar09:03:06

I have big issues with cider repl buffer freezing very often. I suspect that in most cases it's related to larger chunks of output being written in the stdout (e.g. logs). I know about "clear repl buffer" but although I do that quite often it's not enough and even that doesn't help often. Can I somehow turn of all the formatting and have it only as a plain text? Or perhaps some other optimization that would help?

jumar20:03:22

Thanks, I've only set setq cider-font-lock-dynamically and cider-font-lock-max-length so far so maybe cider-repl-use-clojure-font-lock will help. But it's not clear from docs what it actually does; it seems that setting it to nil is actually worse (old behavior)?

practicalli-johnny10:03:59

Is it possible to set the default Clojure REPL type for a project in a project that has both a deps.edn and project.clj file? I tried to use a .dir-locals.el file, perhaps I didnt find the right value...

((clojure-mode . ((cider-repl-type . 'clojure-cli))))
I also tried
((clojure-mode . ((cider-jack-in-default . 'clojure-cli))))
I am restarting Emacs each time and it is asking me to load the .dir-locals.el each time. I am assuming either I have the wrong configuration or this feature is not available at present.

yuhan11:03:13

It might be a syntax error, I don't think the symbol is supposed to be quoted

yuhan11:03:45

Ah, it's the variable cider-preferred-build-tool

yuhan11:03:48

(found that out by grepping the source for the prompt "Which command should be used")

yuhan11:03:38

Also you don't have to restart Emacs to apply dir local variables, just refresh the buffer using M-x normal-mode

practicalli-johnny11:03:57

Finally, I found the right syntax... The build tool name is in double quotes

((clojure-mode . ((cider-preferred-build-tool . "clojure-cli"))))
I was only restarting because the darn thing wasn't working (it only takes 3 seconds to restart Spacemac on my machine, so no problem).

yuhan11:03:38

It's supposed to be a symbol per the docstring -

((clojure-mode . ((cider-preferred-build-tool . clojure-cli))))

yuhan11:03:52

but looks like it accepts strings too

practicalli-johnny11:03:30

It wasnt working as a symbol 😞 I see other settings are also using strings, eg. cider-clojure-cli-global-options so I'll stick with strings for now 🙂

practicalli-johnny11:03:34

Now to see if I can set the clojure repl type, i.e. to set the project to be a Clojure repl, rather than a ClojureScript or mixed repls... when using Sesman

bozhidar13:03:33

The preferred build tool is definitely supposed to be a symbol, btw.

practicalli-johnny15:03:24

@bozhidar the clojure-cli value didnt seem to work when I tried it as a symbol. I will try again and if it definately isnt working I'll raise an issue. Is there a variable I can use to set a project to use cider-jack-in-clj by default in the same way, for example when calling with sesman-start?

bozhidar15:03:28

I’ve never used sesman-start directly, so I’ll have to check what exactly does it call internally.

Felipe Marques17:03:59

Hi, I'm trying to use cider to navigate to java class definitions, but I'm not able to do it. I saw that I must put the source in the classpath. There is a way to configure cider or clojure-deps to do it automatically or per project.