This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-09
Channels
- # announcements (2)
- # babashka (33)
- # beginners (122)
- # bristol-clojurians (1)
- # calva (6)
- # chlorine-clover (3)
- # cider (45)
- # clara (10)
- # clj-kondo (3)
- # cljsrn (17)
- # clojure (80)
- # clojure-dev (21)
- # clojure-europe (86)
- # clojure-italy (5)
- # clojure-japan (5)
- # clojure-losangeles (7)
- # clojure-nl (5)
- # clojure-portugal (3)
- # clojure-uk (31)
- # clojurescript (30)
- # conjure (4)
- # core-async (29)
- # cursive (20)
- # data-science (25)
- # datomic (7)
- # duct (17)
- # figwheel-main (73)
- # fulcro (23)
- # jobs-discuss (36)
- # juxt (5)
- # kaocha (2)
- # lambdaisland (6)
- # luminus (5)
- # malli (17)
- # mount (10)
- # music (7)
- # off-topic (16)
- # re-frame (30)
- # ring (17)
- # rum (1)
- # shadow-cljs (10)
- # spacemacs (10)
- # specmonstah (4)
- # sql (45)
- # tools-deps (21)
- # xtdb (20)
cider seems to be giving me type hint information about the method i'm calling on the java class. But can it give me the return type of the method?
i guess if i eval it, this in the information outputted
or i could call type on it
i would think that calling cider-java-doc on the symbol would give me the java docs if calling type on it and manually entering the type would work, but that doesn't seem to work in all cases.
is there a way to make sure that when switching to a repl buffer, it never replaces the buffer I'm currently on?
I'm not sure I undestand the pattern of the behaviour but often even if there already another window available it still replaces the one I'm on, which is never what I want to do
@andrea.crotti can you explain? not sure what you expect to happen. if you switch to a buffer, it replaces the buffer you are viewing. you can make a split and switch one of those buffers to the repl
well sometimes when I switch to the repl buffer it doesn't replace the buffer I'm on
would like to just enforce that behaviour somehow
just cider-switch-to-repl-buffer
ahh, cider-switch-to-repl-buffer
. i was thinking just colloqually of "switching to the repl buffer"
np my bad
yeah, it's off
though atm
I can dig a bit deeper
so maybe it should always display in a different widow but when for some reason it can't it will use the same window
Is there a variable I can use to tell sesman-start
which type of repl session I would like to start for a specific project? So instead of being prompted by a list of cider-jack-in-clj cider-jack-in-cljs ,,,
CIDER uses a variable value in the project .dir-locals.el and starts the appropriate repl session for the project.
I find sesman-start
easier to use than remembering keybindnigs for each cicer-jack-in-*
and cider-connect-*
sessions, although in some projects is always going to be the same type of repl session. Thank you.
My question might be smilar to what practicalli is asking about. At least in the same vein. I have a shadow-cljs project with a .dir-locals.el that contains
;; For Emacs users
;; simplifies commands need to start application via `cider-jack-in-cljs' by picking options here
;; rather then having to choose them at the command line.
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((clojurescript-mode
;; You use a shadow-cljs to build the project
;; This answers the question "which command should be used?"
(cider-preferred-build-tool . shadow-cljs)
;; This sets a default repl type and answers the question "select cljs repl type".
(cider-default-cljs-repl . shadow)
;; This tells shadow cljs what to build and should match a key in your shadow-cljs.edn
;; build map. e.g :builds {:<some-key> {...}}
;; pramas passed to shadow-cljs to start nrepl via cider-jack-in
(cider-shadow-default-options . ":app")))
Which put togehter some months back in order to simply my startup process. Now it seems running "cider-jack-in-cljs" and picking up that configuration isn't doing what i expect:
1. i get prompted for the command cli or shadow, when the .dir-local should take care of this.
2. upon selecting shadow-cljs it jsut seems to start the shadow server but not connect to it.
Any ideas welcome. I'll try to dig into this on the weekend.could the fact the project is a submodule somehow be causing an issue?
Are you running cider-jack-in while in a ClojureScript source buffer? If you aren't, those dir-locals won't get applied.
The submodule shouldn't a problem, as long as you're running jack-in from a file within it.
> Are you running cider-jack-in while in a ClojureScript source buffer? If you aren't, those dir-locals won't get applied. I believe i am. I'll try on a toy project so i can be more sure i understand the context though. Thanks for the reply.
how do i check if i'm in a clojurescript source buffer?
yea my buffer list says clojurescript
maybe shadow cljs changed something? Now the dir locals setup in the shadow docs works https://shadow-cljs.github.io/docs/UsersGuide.html#_simplify_startup_with_dir_local I recall before it didnt.
Is there a way to get CIDER evaluation (like cider-eval-last-sexp
) to play nicely with Clojurescript? I keep getting "No available JS runtime" message. I'm doing browser/Electron development with shadow-cljs
. I realize that evaluation relies on the "browser runtime" and needs to be loaded through an index.html
etc. But I'd like to know if there's anyway around this, it feels like I'm missing out on Clojure's best feature. Is everyone using Clojurescript just foregoing interactive evaluation in CIDER?
there certainly is in CIDER. i'm not sure how to get that working with electron. with browser it should be straight forward. cider-jack-in-cljs
and off you go
@dpsutton I think my issue was that I was using cider-connect-cljs
and I was seeing this: (ignore the obvious +2
error, problem persists even with that corrected).
I wanted to use cider-connect-cljs
because the error messages from shadow-cljs
format much better in my Terminal than in the CIDER repl. If there was a way to redirect the CIDER output into a seperate, well-formatted buffer (the way cider-inspect
does) I'd be a happy man.
Is this a known limitation of cider-connect-cljs
? I really thought it would be functionally the same as cider-jack-in-cljs
, just with the actual "process" being "hosted" outside of Emacs.
cider-jack-in-cljs
also only seemed to solve the problem with a browser project, not with an Electron project.
...and got it to work! Two things I found:
1. With Electron, there are two separate builds to think about for main
process and the renderer
process. I was selecting main
on cider-jack-in-cljs
, when I should have selected my renderer
build.
2. I needed to actually "refresh" the Electron "page". It wouldn't work right away. I suppose this makes sense now that I'm thinking about it, but I don't have a great mental model of how all these ClojureScript servers and compilers are working, so I'm finding that I can't really anticipate these problems before they happen.
@dpsutton Thanks for putting me on the right track. I really wouldn't have consider cider-jack-in-cljs
without your suggestion. I'd still love to know why cider-connect-cljs
won't work, to help improve the aforementioned mental model.
when you start up your own process and cider-connect to it, are you including the middleware that CIDER needs?
I am getting a little message at the top... clj-refactor and refactor-nrepl are out of sync. Their versions are 2.5.0 and n/a, respectively.
I can live with this. Now I'm wondering my cider-inspect
won't work... All is fine in my browser-based project, but in the electron one (with the above (+ 2 2)
example) I'm getting Inspector error for: 2
in the *cider-inspect*
pop-up window.
I know you said you don't know about the Electron workflow (starting to think I don't either...), and this has been enough to keep me going today, thank you!
@neil.hansen.31 anytime!