Fork me on GitHub
#vim
<
2019-07-25
>
Chase00:07:33

it worked! Omg, it worked. You're a genius!

Chase00:07:39

Seriously my hero, man.

Chase00:07:46

I would have never figured that out.

Chase00:07:00

now I feel silly and bad for dominating this channel for 8 hours begging for your time

xi06:07:21

tpope is everyone's hero

samoleary07:07:29

thanks for the heads up dominicm and tpope! jrdoanes fork of vim-clojure-highlight with the suggested fix does the trick and the highlighting is working again. you're right about that lock-up when entering a buffer too, dominicm 😂 i haven't modified any plugins before, is it a straight forward enough job to get the highlight to be async?

dominicm07:07:17

@ssjoleary746 I had a quick look at the source yesterday I think that you would need to reimplement fireplace#evalparse to be async. @tpope it doesn't look like client.eval() has an async option. @ssjoleary746 lacking a client.eval, I'd probably reach for fireplace#message() as a fallback, and then use the g:fireplace#reader in the same way that fireplace#evalparse does.

tpope14:07:08

+1 to async fireplace#query (the correct name for fireplace#evalparse)

tpope14:07:07

fireplace#eval has a preamble for argument handling that could be extracted into a utility method and extended to handle a function ref argument

tpope17:07:10

okay fireplace#query() takes a callback, that's my parting gift

😎 4
dominicm19:07:13

@ssjoleary746 sounds like you can now act on making the highlight async 😉

🙌 4
dominicm19:07:26

@tpope really appreciate all the effort you've put into fireplace 🙂 I'm being quite lazy with replant and waiting for https://github.com/neovim/neovim/issues/10362 before I do the full migration. I'm excited for what can be built on these primitives now!

tpope20:07:22

is a timeout essential? sleep 1m in a while loop seems more than adequate if not

samoleary08:07:17

brilliant, thanks for the heads up. i'll have a poke around and see what comes of it 🤞

xi08:07:53

@tpope I used to be able to do *e after an eval threw an exception and get all the gory details. This doesn't work any more? I just get the #object[java.lang.ClassCastException ...] version now

xi08:07:38

Oh nvm, might be to do with the test runner in this project 😐

xi08:07:49

it's still working in my code

xi13:07:19

@olical I thought I'd try out Conjure at last but I'm having trouble getting it recognised. I've installed it with vim-plug and manually run bin/compile. But I still get the Conjure not compiled, please run bin/compile then conjure#init() or restart message. Any ideas please?

xi13:07:11

Running bin/compile gave me:

[Conjure] Preparing dependencies for runtime injection...
Downloading: traversy/traversy/0.5.0/traversy-0.5.0.pom from 
... a whole bunch of others ...
Downloading: com/google/code/gson/gson/2.2.4/gson-2.2.4.jar from 
retrieve dependencies and munge clojure source files
in RESOLVED-TREE mode, working on a resolved dependency tree
 [compliment "0.3.8"]
unzipping [ compliment  [ v0v3v8 ]]
  munge source files of compliment artifact on branch [] exposed false.

xi13:07:01

I noticed my classes/ was empty so I ran clojure -Sforce -A:compile --eval "(compile 'conjure.main)" from bin/compile and got:

Downloading: com/google/guava/guava/18.0/guava-18.0.jar from 
conjure.main

xi13:07:31

and now it works 🎉

xi13:07:08

oh apparently I need a .conjure.edn somewhere 😕

xi13:07:28

; conjure/out | Welcome to Conjure! (v0.22.0-0-g0cbb94a56f)
; conjure/out | Skipping :dev - can't connect
; conjure/err | No matching connections for /home/alee/.vim/bundle/conjure/foo.clj
; conjure/out | Skipping :dev - can't connect
; conjure/out | Skipping :jvm - can't connect
; conjure/out | Skipping :jvm - can't connect
; conjure/out | Skipping :node - can't connect
; conjure/out | Skipping :node - can't connect
; conjure/out | Skipping :browser - can't connect
; conjure/out | Skipping :browser - can't connect
; conjure/err | No matching connections for /home/alee/.vim/bundle/conjure/foo.clj
; conjure/err | No matching connections for /home/alee/.vim/bundle/conjure/foo.clj
(plus lack of output from the form I tried to eval)

xi13:07:46

I thought it was supposed to launch its own prepl but oh well

xi13:07:22

OK, the problem was that I was running from my conjure checkout, which includes a .conjure.edn that doesn't work for me

xi13:07:43

Ah this is starting to make more sense having revisited the blog post. I need to add a bit of code to start the prepl and still lein repl. Shame, I was hoping to get around having to manually start REPLs.

xi14:07:54

OK think I'm sorted now. Found the addendum for lein users. 🙂

Olical16:07:22

Glad you sorted it eventually! I'm sorry I couldn't help, I've been ill and moving flats over the last week so I haven't had any free time for side project stuff! Well done on working it out in the end. The concept of .conjure.edn is pretty alien because nobody else is doing it like that, I really like it personally (of course...). Trying to use Conjure from within it's source directory will create all sorts of weirdness since it thinks you're in development mode and trying to work on Conjure itself at that point 😬

xi14:07:46

No worries, I know you're usually super helpful. I persisted with the questions/writeup partly so you got the user journey

tungsten20:07:36

has anyone gotten fireplace + piggieback + lein-figwheel working recently? It remember I had problems with the nrepl namespace change a while back… but now on a new system I can’t connect to the browser repl. Have there been more suprises in this area?

tpope21:07:36

can confirm figwheel-main works on the latest fireplace. have not tried lein-figwheel

tungsten21:07:32

gotcha.. thanks… anything i can do help debug this? I am seeing this, which I cannot parse

Syntax error (ClassNotFoundException) compiling at (/private/var/folders/qs/tzcsbc9s5vb3mbvd2wnrdcgr0000gn/T/form-init98983630314155450.clj:1:29).
figwheel-api.repl-api

tungsten21:07:01

when running

:Piggieback (figwheel-api.repl-api/repl-env)
Trying to run this project: https://github.com/briangorman/hablamos

tungsten21:07:31

Not sure how to determine if this is a nrepl problem or something else…

tpope21:07:32

try requiring that namespace in your repl

tungsten21:07:18

hmm got it working with “lein figwheel” and manually connecting to repl. One problem I had was specifying “figwheel-api” instead of sidecar. Not sure why manually connecting from lein repl doesn’t work anymore… but not critical enough for me to debug

tungsten21:07:24

thanks for your help!

tpope21:07:21

if it's like main, repl-env doesn't start the env, just returns it. you have to call start the first time

markwoodhall12:07:20

I am seeing a similar issue with Piggieback (do (require '[figwheel-sidecar.repl-api]) (figwheel-sidecar.repl-api/repl-env)), I have called start already. This setup worked for quite a long time but doesn't anymore, is there anything I can do to debug?

tungsten15:07:49

one thing that could be causing issues is that you need to be in a cljs file when you attempt to send commands to the cljs repl I eventually got everything working yesterday…. its been a while for me

tpope15:07:45

clarify "doesn't anymore"

tpope15:07:09

note that (do (require 'foo.bar) (foo.bar/baz)) doesn't work unless foo.bar was previously required (thus defeating the purpose of including the require). but if you called start already that's not the root cause

markwoodhall16:07:46

Oh, thanks. Actually, if I remove the require then everything starts working again. Not sure how that worked for so long before and what made it stop.