conjure

:neovim:+:clj: https://github.com/Olical/conjure - If you're enjoying Conjure and want to say thanks: https://github.com/users/Olical/sponsorship :smile: (alt https://conjure.fun/discord)
2021-04-01T10:52:11.027100Z

2021-04-01T10:52:12.027200Z

2021-04-01T10:52:22.027300Z

2021-04-01T10:52:25.027400Z

2021-04-01T10:53:32.027500Z

dharrigan 2021-04-01T12:00:29.027900Z

You know this implement highlight evaluation, which is pretty darn awesome

dharrigan 2021-04-01T12:00:49.028400Z

do you think it's also a route to also highlighting when your cursor is inside a nested form?

dave 2021-04-01T14:25:57.029Z

I'm keen to try the eval highlighting, but I'm having trouble finding the new config option in the help text. :thinking_face:

Olical 2021-04-01T14:43:45.029100Z

Oh damn! I forgot it, aaaaa, it's g:conjure#highlight#enabled = v:true

2021-04-01T14:44:33.029300Z

Olical 2021-04-01T14:45:41.029600Z

Hmm I mean, maybe, but I don't know if that's something I would add to Conjure since it's really nuanced. Although I guess you could argue it's a feature of showing you what would be evaluated with one specific mapping? I think I'd prefer this in another plugin personally, feels like it's erring on feature creep out of the domain I wanna worry about? :thinking_face:

dharrigan 2021-04-01T14:46:38.029800Z

indeed, it would be neato as a plugin

dave 2021-04-01T16:04:21.030800Z

It works like a charm! Good stuff! 💯

dharrigan 2021-04-01T16:15:36.031600Z

latest neovim == 5?

dharrigan 2021-04-01T16:15:47.031900Z

I wonder when that's coming out....seems to be dragging on....

2021-04-01T19:13:53.033200Z

Noticing a light bug, not sure if it’s me / if ya’ll have seen this before. When I set up shadow: ConjureShadowSelect app Now, if I eval in a clj file, I get some errors:

; (err) ------ WARNING - :undeclared-var -----------------------------------------------                                                                                                                        
; (err)  Resource: <eval>:2:4                                                                                                                                                                                   
; (err)  Use of undeclared Var virtual-library.goodreads/pmap                                                                                                                                                   
; (err) --------------------------------------------------------------------------------                                                                                                                        
; (err)                                                                                                                                                                                                         
nil                                                                                                                                                                                                             
#'virtual-library.goodreads/import-csv!       
As thought it’s sending that file to shadow too. Is there some wrong I’m setting things up? Folder structure:
src/clj -> clj files
src/cljs -> cljs files

Olical 2021-04-05T14:35:37.048600Z

Have you added the src/clj and src/cljs dirs to your path? Those aren't built in directories, the only directory Clojure knows about is src and maybe test by default I think? I never use clj and cljs directories at the top level, but then I rarely mix clj+cljs in the same project.

Olical 2021-04-05T14:36:22.048800Z

Also if you're in a CLJS REPL and try to eval a clj file (so not cljc or clj) it won't work properly afaik

2021-04-06T20:40:22.049300Z

Hey Oliver! Indeed, let me give some context on what is happening: • I have both clj + cljs on the classpath • To run my project, ◦ I set up an nrepl ◦ Make two separate remote connections ▪︎ In one remote connection, I run the server ▪︎ In another, I kick off shadow ◦ This works fine ◦ From conjure’s perspective, any time I eval, I think it default goes to clj • But, if I run ◦ ConjureShadowSelect app ◦ Then, it sends all files to cljs (this, I am a bit vague on, as I don’t quite understand fully how shadow-cljs works) • Ideally, ◦ If it’s a “clj” file, it would send to the “clj” part of this repl, and if “cljs” it would send to the other part • But, if this is not supported, no problem ▪︎ In this case, is there a way to say the opposite of ConjureShadowSelect app? • (i.e to disable shadow, so conjure knows to send clj files to the right place again) I set up one remote nrepl connection. • This nrepl has both cljs and clj on the classpath • By default,

Olical 2021-04-07T11:04:32.049500Z

So you might need to adjust the shadow-cljs path too? Not sure how to do that, but I have a feeling shadow-cljs has it's own classpath config? (maybe not called a classpath)

Olical 2021-04-07T11:06:58.049700Z

A little background: When you connect to an nREPL it opens a "session" (the thing that Conjure represents as names of cat/dog breeds but they're just UUIDs that I'm adding a human representation to) Conjure has one session selected at a time, but your nREPL can have many sessions. (search in :h conjure-client-clojure-nrepl for the session mappings) When you shadow select, your current session becomes a ClojureScript session where evals are handled by shadow. You can open a new session that's plain clojure, then hop between sessions to hop between your clj and cljs evals.

Olical 2021-04-07T11:08:04.049900Z

The alternative approach is to use :helpgrep ConjureClientState

Olical 2021-04-07T11:09:30.050100Z

Then set up an autocmd in your vim so that on buf enter you look at the current file path then set the state string to clj or cljs, for example, each time you set the client state you get a kind of parallel universe of Conjure, so you can have one variant enabled while in the clj dir and another in the cljs dir. Each of which can have their own connections or sessions.

Olical 2021-04-07T11:10:18.050300Z

I don't have a code snippet for this, but an autocmd that checks your current file's dir and sets the ConjureClientState is enough to flip your state back and forth. It's very simple so that it's flexible and you can fit into your own workflow / constraints.

Olical 2021-04-07T11:11:01.050500Z

augroup conjure_set_state_key_on_dir_changed
  autocmd!
  autocmd DirChanged * execute "ConjureClientState " . getcwd()
augroup END
From the help text

emilaasa 2021-04-01T20:34:28.033500Z

Yeah it's been going on for a while. maybe this one works; 18 aur/neovim-nightly-bin 0.5.0+dev+1194+gc20ae3aad-1

emilaasa 2021-04-01T20:34:36.033700Z

seems pretty bleeding edge 😛

dharrigan 2021-04-01T20:34:51.033900Z

Ah, I'll stay away from 5.0 until it's released 😄

dharrigan 2021-04-01T20:35:00.034200Z

4 is pretty darn good 😄

emilaasa 2021-04-01T20:35:07.034500Z

chicken 😛

dharrigan 2021-04-01T20:35:13.034700Z

🐔

emilaasa 2021-04-01T20:35:59.034900Z

3 weeks with Conjure now at the new job, everything works great and I basically just took your dotfiles

emilaasa 2021-04-01T20:36:14.035100Z

wee!

dharrigan 2021-04-01T20:36:37.035300Z

oh, you're most welcome. I'm glad it helped. A starting point.

emilaasa 2021-04-01T20:37:17.035500Z

Yep, works really well. I'm actually a bit surprised that I don't miss the smartness of IDEA / Cursive

emilaasa 2021-04-01T20:37:54.035700Z

It has some overhead too all that fancy stuff

dharrigan 2021-04-01T20:39:37.035900Z

Once you get into the flow, using clojure with vim + conjure is very condusive to being very productive

dharrigan 2021-04-01T20:40:04.036100Z

I find I concentrate now more on the namespace, with a few interactions. Allows me to keep focused on what I'm trying to do.

dharrigan 2021-04-01T20:40:26.036300Z

and eval'ing inside the buffer is so handy

emilaasa 2021-04-01T20:40:28.036500Z

Yeah exactly, doesn't really help (it hinders) to scatter your attention all over the place.

dharrigan 2021-04-01T20:41:06.036700Z

and thanks to the recent addition of eval'ing and placing the results of that eval as a comment beside the form/def, lets me see what each part does

emilaasa 2021-04-01T20:41:06.036900Z

I like it a lot, been using eval at mark a lot too

dharrigan 2021-04-01T20:41:23.037100Z

I use eval mark to, normally to restart my state 🙂

emilaasa 2021-04-01T20:42:49.037300Z

I just did about 3 years heavy go / rust programming and this env is so much better 😛

dharrigan 2021-04-01T20:43:52.037500Z

I flip betwen kotlin and clojure programming. I always feel a sense of liberation coming back to Clojure

dharrigan 2021-04-01T20:44:10.037700Z

I do like Kotlin, and it pays my bills 🙂 But I much pefer Clojure 🙂

emilaasa 2021-04-01T20:44:30.037900Z

Yeah it works, still you're pushed into some kind of TDDish thing even to get some feedback

emilaasa 2021-04-01T20:44:57.038100Z

Having a look at some actual data can be a hassle 😃

emilaasa 2021-04-01T20:45:24.038300Z

I think Kotlin is cool and I did use it a alot a few years ago with jetbrains products

dharrigan 2021-04-01T20:45:53.038500Z

We use it at work for all backend stuff, so having to do it too. I find it very nice.

emilaasa 2021-04-01T20:46:24.038700Z

Anyway got to go to bed now but thanks for being a poweruser and actually writing your stuff down 🙂

emilaasa 2021-04-01T20:46:36.038900Z

It helps!

dharrigan 2021-04-01T20:48:30.039100Z

you're most welcome. Oh, I don't consider myself a poweruser. I'm certainly very much a beginner too. As the saying goes, I'm standing on the shoulders of giants.

dharrigan 2021-04-01T20:48:34.039300Z

ttfn!

dharrigan 2021-04-01T20:48:35.039500Z

.