This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-16
Channels
- # aleph (2)
- # announcements (1)
- # beginners (162)
- # calva (16)
- # cider (37)
- # cljdoc (9)
- # cljs-dev (2)
- # cljsrn (3)
- # clojure (86)
- # clojure-dev (17)
- # clojure-europe (3)
- # clojure-houston (1)
- # clojure-italy (6)
- # clojure-nl (3)
- # clojure-spec (10)
- # clojure-uk (20)
- # clojuredesign-podcast (15)
- # clojurescript (7)
- # data-science (14)
- # datascript (1)
- # datomic (5)
- # emacs (8)
- # figwheel-main (8)
- # fulcro (25)
- # graalvm (1)
- # jobs (10)
- # jobs-discuss (4)
- # keechma (14)
- # leiningen (2)
- # off-topic (31)
- # onyx (1)
- # other-languages (4)
- # pathom (4)
- # pedestal (1)
- # re-frame (20)
- # remote-jobs (4)
- # shadow-cljs (25)
- # sql (6)
- # tools-deps (15)
- # vim (18)
- # xtdb (9)
Encouraged by the comments here, I decided to give Kitty a try. So far it seems great and very snappy even with fonts with ligatures, but there's one detail I can't seem to figure out how to set up - movement by word using option+arrowkey (I'm on Mac OS) using option+f/option+b. More specifically, I can get these to work on the shell itself, by setting up the bindings in zshrc, but not on the Clojure REPL launched via Leiningen or Boot - in the REPL launched by the clj command they do work. In the Lein/Boot REPL, the option-arrow combinations print "3D" (left) or "3C" (right) on the screen, option+f gives "ƒ" and option+b "›". The same is true for other REPLs (like the Python shell) as well.
Since the Leiningen and Boot REPLs are launched by Bash, I tried adding the said settings to first /etc/bashrc
and then to /etc/profile
too. Like this:
bind '"^[[1;3C": forward-word'
bind '"^[[1;3D": backward-word'
As a result the commands work in the Bash shell itself but still not in the REPL. Any ideas how to solve this?This got finally solved. I created a ~/.inputrc
file with the following in it:
"3C": forward-word
"3D": backward-word
For some reason the REPL received the key combinations in that form - plus, I couldn't figure out how to bind them in my ~/.zshrc
. Whatever, glad to be bangin' out some parentheses for a change.The difference to the basic repl is that here it prints [1;3D
instead of 3D
when I try to move leftwards by word :thinking_face:
bindkey '^F' up-line-or-beginning-search
bindkey '^G' down-line-or-beginning-search
bindkey '\e[A' up-line-or-beginning-search
bindkey '\e[B' down-line-or-beginning-search
Hi. I posted this in #beginners but I’m cross posting here in case it’s editor specific.
I cannot seem to get my work environment going. I’m not sure what I’m doing wrong or even what channel to ask about it. I’m using fireplace to connect to cider-nrepl through vim, with a clj based project. Weird things have started happening. I’ve tried a bunch of things but the state right now is that I start the repl server with
clj -Sdeps '{:deps {cider/cider-nrepl {:mvn/version "0.21.1"} }}' -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"
as instructed on the cider-nrepl site. I connect with vim using :Connect.
The first time I try to connect, I get an error: Vim(return):E15: Invalid Expression:
. The second time I try, it seems to work.
After I connect, I try to evaluate a simple expression - (+ 1 2)
. The terminal with the nrepl server prints a stack trace:
nREPL server started on port 52195 on host localhost -
Exception in thread "nRepl-session-588832b7-43c8-4260-8324-0a14383dac6c" java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at nrepl.transport$bencode$fn__427.invoke(transport.clj:116)
at nrepl.transport.FnTransport.send(transport.clj:41)
at nrepl.middleware.print$send_nonstreamed.invokeStatic(print.clj:159)
at nrepl.middleware.print$send_nonstreamed.invoke(print.clj:138)
at nrepl.middleware.print$printing_transport$reify__818.send(print.clj:174)
at cider.nrepl.middleware.track_state$make_transport$reify__3988.send(track_state.clj:214)
at nrepl.middleware.caught$caught_transport$reify__853.send(caught.clj:58)
at nrepl.middleware.interruptible_eval$evaluate$fn__909.invoke(interruptible_eval.clj:123)
at clojure.main$repl$fn__9095.invoke(main.clj:460)
at clojure.main$repl.invokeStatic(main.clj:458)
at clojure.main$repl.doInvoke(main.clj:368)
at clojure.lang.RestFn.invoke(RestFn.java:1523)
at nrepl.middleware.interruptible_eval$evaluate.invokeStatic(interruptible_eval.clj:79)
at nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:55)
at nrepl.middleware.interruptible_eval$interruptible_eval$fn__916$fn__920.invoke(interruptible_eval.clj:142)
at clojure.lang.AFn.run(AFn.java:22)
at nrepl.middleware.session$session_exec$main_loop__1017$fn__1021.invoke(session.clj:171)
at nrepl.middleware.session$session_exec$main_loop__1017.invoke(session.clj:170)
at clojure.lang.AFn.run(AFn.java:22)
at java.lang.Thread.run(Thread.java:745)
After that though, I can evaluate the simple expression just fine, and the result prints in the editor.
It feels like I spend 3 days struggling with tooling for every 1 day writing code. 😞OK, I updated fireplace, and now when I try to :Connect
I get an error: Fireplace: invalid connection string ''