Fork me on GitHub
#cursive
<
2020-08-13
>
gibb06:08:02

REPL Commands bound to shortcuts are pretty sweet!

gibb06:08:46

Can I access my own REPL commands in the cursive.actions list somehow? I remember looking a big text file with cursive actions for making ideavim bindings but I can't seem to remember where I found it..

gibb06:08:13

map <leader>x :action :cursive.actions.paredit/kill-sexp<CR> Something like that but instead cursive.actions.MyREPLCommand ?

gibb06:08:55

Ah :actionlist is what I was looking for..

cjsauer13:08:39

Was your REPL action in that list? I was attempting to do this as well and couldn’t find it.

gibb04:08:31

Nope the REPL command does not show up there, I did not find a way to bind it to a vim shortcut.

misha08:08:12

just wanted to share that unbalanced " in comments breaks parinfer's smart mode:

(let [] ;
  {:a 1
   :b 2})

;tab second line:
(let [] ;"
     {:a 1
   :b 2}) 

;vs expected:
(let [] ;
     {:a 1
      :b 2})
but then found disclaimer: https://shaunlebron.github.io/parinfer/#inserting-quotes opieop

misha08:08:32

I hope mentioning it will save some time and sanity for somebody with a suddenly broken smart mode in a large ns

pmallett20:08:18

I have a deps alias with the following.

:dev {:extra-paths ["dev/src" "dev/resources"]
                       :extra-deps  {environ                     {:mvn/version "1.1.0"}
                                     org.clojure/tools.namespace {:mvn/version "0.2.11"}
                                     org.clojure/tools.nrepl     {:mvn/version "0.2.12"}
                                     reloaded.repl               {:mvn/version "0.2.4"}}
                       :main-opts   ["-i" "dev/src/foobar/user.clj"
                                     "-e" "(in-ns,'foobar.user)"]}
The main-opts works when I start a repl from the command line.
clj -A:dev -r
But it does not work when I use nREPL in Cursive run config.

pmallett20:08:16

load the file and switch to the ns. Similar to this in leiningen.

:repl-options   {:init-ns foobar.user}

salam21:08:37

what does your run configuration look like?

katox22:08:25

Cursive ignores the -m part of deps. Which is good in a way because it only supports -A