This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-24
Channels
- # announcements (5)
- # beginners (184)
- # calva (32)
- # cider (29)
- # clj-kondo (1)
- # cljdoc (29)
- # cljsrn (6)
- # clojure (44)
- # clojure-dev (36)
- # clojure-europe (9)
- # clojure-italy (18)
- # clojure-losangeles (1)
- # clojure-nl (3)
- # clojure-spec (7)
- # clojure-uk (30)
- # clojure-ukraine (1)
- # clojuredesign-podcast (8)
- # clojurescript (65)
- # code-reviews (21)
- # core-async (25)
- # cursive (51)
- # data-science (3)
- # datascript (2)
- # datomic (25)
- # emacs (14)
- # events (1)
- # figwheel-main (3)
- # fulcro (3)
- # graalvm (5)
- # jackdaw (17)
- # kaocha (14)
- # luminus (5)
- # off-topic (17)
- # pathom (7)
- # pedestal (2)
- # re-frame (71)
- # reagent (25)
- # shadow-cljs (83)
- # spacemacs (31)
- # sql (92)
- # tools-deps (23)
- # vim (102)
- # xtdb (5)
@chase-lambert so the problem was before that if you typed clojure.core/
then coc.nvim wouldn't re-ask for completions, so I didn't get the chance to return everything that's in clojure.core
. Now upon typing the /
character, it will refresh.
does anyone use vim-fireplace
along with vim-clojure-static
and vim-clojure-highlight
for syntax highlighting? either my eyes are playing up or some symbols aren't being coloured like they were before
are there alternatives, for better or for worse?
I might have stopped using vim-clojure-highlight actually. I got a bit frustrated with the lock-up when I entered a buffer.
vim-clojure-highlight perhaps is using a changed fireplace api, it could probably use an update to be async too.
it was relying on fireplace internals that changed https://github.com/tpope/vim-fireplace/issues/341
@dominicm I was able to get coc.nvim
updated and can confirm it's refreshing fine with /
. Thanks again!
So should I get rid of vim-clojure-static
and vim-clojure-highlight
then because I also use them with vim-fireplace
? Or is this just a temporary breakage? If I should delete, what alternative do you folks suggest for good clojure syntax highlighting?
when trying to connect to a running nrepl (started through shadow-cljs) I'm getting this error: Fireplace: invalid connection string ''
as soon as I input :Connect<CR>
any clues what I'm doing wrong? I was able to get this hooked in no problem a few months ago.
I have cider-nrepl
and cider/piggieback
in my dependencies like I did last time. This is a reagent tutorial I'm going through.
I actually have the same issue when just trying to connect to a running nrepl in a different project using lein repl
. I don't have the problem if I start lein repl
before going to my source file, then it just automatically connects but this isn't an option with shadow-cljs (that I know of) so I have to be able to manually connect.
but I'm having the same problem with just normal lein repl
if trying to connect manually rather than having it automatically do it like I normally do. Both have the cider/cider-nrepl
dependencies
the error message is a little weird but :Connect
isn't a mind reader, you need to give it an argument
the automatic connection only works for .nrepl-port
. i don't know anything about shadow-cljs.edn
but we don't have an edn parser so there's probably not much we can do there
hmmm. from memory, I used to hit :Connect
it would ask me to choose something (I think it was choose host like "nrepl" or something) and then enter the the port number. let me find what I'm supposed to feed it as an argument.
Yeah doing :Connect
with the port # provided by lein repl
works fine. Unfortunately it doesn't work like it used to for shadow-cljs anymore. With the prompt you had, we must have just gotten fortunate that it automatically worked fine for shadow-cljs (which is just using nrepl as far as I can tell). Unfortunately I bought a crazy expensive reagent and re-frame tutorial and shadow-cljs seems to be where the cljs folks are moving to so I have to find a different solution.
It's unfortunate that we have to learn lein
deps.edn
and shadow-cljs
(and maybe boot
) these days.
Clojure repl and tooling can be amazing but I swear I spend half my development time getting all the tooling working right together.
The latter. That method worked fine with manually connecting to a lein repl (which your hunch is correct, I would never really do)
With this shadow-cljs project when I run that command my repl shows this error:
[2019-07-24 12:37:11 - SEVERE] Unhandled REPL handler exception processing message {:id ae40bfe8-e180-4ad0-33de-ceb5d15054f3, :op classpath}
java.lang.IllegalArgumentException: No implementation of method: :send of protocol: #'nrepl.transport/Transport found for class: clojure.tools.nrepl.transport.FnTransport
re: vim-clojure-highlight: FWIW, i removed this plugin from my vimrc ages ago and i haven't noticed any impact whatsoever. i think enough of it is baked into vim itself that i'm not sure what the plugin actually provides beyond that anymore
vim-clojure-static provides the regular highlighting and is baked into vim now. vim-clojure-highlight would query nrepl for the methods available in your namespace and highlight all of them
@chase-lambert does it work on an older version of fireplace? if it does i can probably figure out what went wrong
you might want to try 66b738b4978885d4d673ac50d660e6bc2ae42b4f (the first commit with async support) and the commit right before it
yeah, it worked a few months ago but I'm not sure how to do older versions. but what if something has changed with shadow-cljs too though?
ahhh. I'm a vim-plug
guy myself. should I maybe ask the shadow-cljs channel if anyone there is a vim/fireplace user?
does this look like an example of what I should try?
" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
you can just navigate into ~/.vim/bundle/name-of-plugin
and check out a different commit
ok, you guys are going to kill me. turns out cider nrepl has changed their whole dependency thing so the github I was using was wrong. They use this now: https://clojars.org/nrepl/versions/0.6.0
I love clojure for it's stability! I didn't think to recheck all these things after being gone for only a few months.
Now I can't get the cljs repl connected with piggieback. I swear if you help me with that I will leave you alone for a long, long time!
I used to do :Piggieback :app
and it just connected for me. It gives me this error though:
ClassNotFoundException cider.piggieback java.net.URLClassLoader.f
indClass (URLClassLoader.java:471)
This is the info the shadow-cljs repl tells me as far as ports and such:
shadow-cljs - HTTP server for :app available at
shadow-cljs - server version: 2.3.30
shadow-cljs - server running at
shadow-cljs - socket repl running at localhost:37547
shadow-cljs - nREPL server started on port 3333
shadow-cljs - watching build :app
if I do :Piggieback :app
like I used to to connect to this project it tells me that classnotfound exception
I don't actually know where I can do that. shadow-cljs doesn't give me a repl when I start it. I start it with npm run dev
. It starts the nrepl and such and watches for changes for hot reloading.
ugh. sorry about all this. all this shit just worked last time. not sure what I've done to get it all convoluted.
well I do get something different now:
IllegalStateException Can't change/establish root binding of: *cljs-repl-env* with set cl
ojure.lang.Var.set (Var.java:223)
but I also don't know what (cider.piggieback/cljs-repl :app)
would do. usually you pass a function
ok. I appreciate all your help. Not sure what changed. Unfortunately the tutorial starts by cloning a decently large repo. Last time all I changed was his proto repl dependency (I'm not using Atom dammit!) to cider nrepl and piggieback and it all worked. I'm going to have to go a different route. It's a freaking $250 tutorial too...smh
I mean as I used to put :Piggieback :app
but now what should I be putting? Was that command changed?
well, now I get this:
λ ~/.vim/plugged/vim-fireplace : git checkout 66b738b4978885d4d673ac50d660e6bc2ae42b4f
fatal: reference is not a tree: 66b738b4978885d4d673ac50d660e6bc2ae42b4f
I'm going to throw my computer out the window. This is getting silly, going to take a step back. I've spent 4 hours on this. I really do appreciate all your time. Clojure tooling is just too f'ing brittle for me sometimes (yet it's probably all my fault)
this issue mentions passing :id-of-build
to piggieback which sounds like your :app
thing https://github.com/thheller/shadow-cljs/issues/62
this comment implies you get that error if the piggieback middleware isn't available https://github.com/duct-framework/duct/issues/21#issuecomment-160036385
this is what I'm trying to get set up. All I did was delete out the Atom proto repl dependency and put in the cider-nrepl and piggieback one's in.
(shadow.cljs.devtools.api/nrepl-select
from https://github.com/thheller/shadow-cljs/wiki/Cider seems to work
I'm wondering if I'm missing something obvious in my config. https://pastebin.com/K7dDqBxh