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)
Aron 2020-07-27T13:52:40.046900Z

Is there some way to change the font size just in the hud? or introduce wrapping somehow? the first ~10 words are rarely enough for me to understand what's going on, clojure(script) errors are often very much written in a style which combines full information with full obscurity, even googling them fully doesn't always yield results, so having only part of it and then going for a hunt in the logs if I don't see it slows me down even more than my own newbishness.

Olical 2020-07-27T16:03:56.047400Z

I'm afraid not, no, vim has no concept whatsoever of font sizes. This is entirely down to your terminal or GUI. I highly doubt any of the GUI frontends let you do this either although I've never checked

Olical 2020-07-27T16:04:43.047600Z

You could set let g:conjure#log#hud#width = 1 maybe, that'd use the full width of your editor for the HUD which might help a little?

Olical 2020-07-27T16:04:53.047800Z

I tend to just open up the log in a tab quickly if there's a long line

Olical 2020-07-27T16:04:57.048Z

Or in a horizontal split

Olical 2020-07-27T16:05:37.048200Z

But yeah, I agree that lots of things fly off screen, it's not really the norm though, so the norm has been optimised for which is things that fit within ~80-100 characters (pretty printed data)

Olical 2020-07-27T16:06:22.048400Z

I could maybe add some text wrapping but that'll break all sorts of formatting which would suck. Especially if you're printing ASCII tables or something to stdout, I want to preserve your output exactly as it is.,

2020-07-27T17:03:43.048800Z

Is there a hook for processing errors planned? That would allow the user to print exceptions how they like. haha, am i asking the same question again 😄 do we just override some nrepl middleware?

2020-07-27T17:09:38.049Z

at the moment I'd really like to see the ex-data printed, if it exists -- for instance

Olical 2020-07-27T17:12:51.049300Z

Hooks through custom autocmds are on my radar

Olical 2020-07-27T17:12:56.049500Z

Output middleware... not so much

Olical 2020-07-27T17:13:10.049700Z

I think if nREPL can do it, I'd lean on that

Olical 2020-07-27T17:13:31.049900Z

But I'm being pulled in 100 different directions today so I just wanted to reply but there's other points to be made here!

2020-07-27T17:16:01.050100Z

sorry to pile on! your project is just so kick-ass!

Olical 2020-07-27T17:39:16.050300Z

Oh no not at all! It's a good question and I wanted to give it some kind of response just in case I forget to do so

Olical 2020-07-27T17:39:32.050500Z

I'm really hoping there's something that can be done in Clojure / nREPL land to make them pretty

Olical 2020-07-27T17:39:36.050700Z

Maybe even middleware :thinking_face:

Olical 2020-07-27T17:40:03.050900Z

Because I don't want to tackle getting that right atm, formatting errors without missing key info etc is HARD and I'd rather someone else did a project that specialised in that, if that makes sense?

💯 1
Olical 2020-07-27T17:40:15.051100Z

Otherwise I end up being a jack of all trades, master of none

Olical 2020-07-27T17:40:16.051300Z

😄

2020-07-27T19:22:23.051600Z

💯

Aron 2020-07-27T20:27:27.051800Z

I almost never have anything anywhere pretty printed, much less in the HUD, it's always just text. The one exception I remember seeing formatting is when I connect to the app. Otherwise it's just logs and text without any formatting. Or error messages from the logs. Very much not formatted, just in the middle of everything

penryu 2020-07-27T20:44:42.055800Z

Hi all! I've used conjure v2 for months happily, but I bumped the tag from v2.1.2 to v4.1.0 with vim-plug, and it is just showing it has having a pending update. Conjure is never loaded, regardless of the filetype (`.clj`) or presence of .nrepl-port. Even completely uninstalling and reinstalling the plugin doesn't resolve this. I feel like I'm missing something really basic.

penryu 2020-07-27T20:55:55.056600Z

I've looked at the vim-plug docs a few times, and found D to list the pending updates, but having trouble finding out how to APPLY them

penryu 2020-07-27T20:58:33.057300Z

I'm starting to think the "pending" updates are just changes on master that aren't in the tag. So that leaves me with "conjure just isn't loading"

penryu 2020-07-27T21:09:38.057900Z

And... now I'm questioning my own sanity... conjure only supports nrepl now? Nvm. Found the nrepl announcement in the v3 release.

Olical 2020-07-27T21:13:12.058100Z

:thinking_face: I've never seen vim-plug give this message, have you tried rm -rfing the repo vim-plug cloned?

Olical 2020-07-27T21:14:09.058400Z

You're not missing anything, if you have an nREPL port file it'll just connect the first time you open a Clojure file

Olical 2020-07-27T21:14:48.059300Z

Yeah, sorry, this'll be pretty jarring since I rewrote everything to fix several fundamental flaws that were causing bugs I couldn't fix (race conditions because Conjure was a combination of VimL and Clojure in another process)

penryu 2020-07-27T21:14:50.059500Z

I'm also confused because none of the :Conjure... commands are available. Let me check my installation again, and have a proper nrepl session going.

Olical 2020-07-27T21:15:15.060500Z

So now everything is Lua (compiled from a lisp), runs within Neovim's process and is basically the same UX but refactored

penryu 2020-07-27T21:15:59.061900Z

No worries! I remember you being concerned with some fundamental issues, and am glad the nrepl issues got ironed out.

Olical 2020-07-27T21:16:12.062300Z

I'm reaaaaly sorry about having this as a potentially unpleasant surprise. I promise the new version is much better in basically every way, it'll just take a sec to get accustom.

🙏 1
Olical 2020-07-27T21:16:32.063Z

There's no config to learn, every config value is just let g:conjure#..., so hopefully there's nothing to learn really

Olical 2020-07-27T21:16:34.063200Z

Mappings are the same

Olical 2020-07-27T21:17:09.064Z

Everything is nREPL with optional CIDER now, but that experience is just so much better. I tried my best to make prepl work, but it was just too much duct tape for my liking in the end. Now we have shadow-cljs + full completion support 😄

👍 1
Olical 2020-07-27T21:17:26.064400Z

Also it supports multiple lisps as a core design principal 🙂

😄 1
Olical 2020-07-27T21:17:57.065100Z

I think that's all of the main things covered 😅 but yeah, I just hope it's not too much of a bad surprise. I've been really busy on the project

Olical 2020-07-27T21:19:08.065200Z

:thinking_face: you don't need the install compile script now either

Olical 2020-07-27T21:19:11.065400Z

That might be causing you issues!

Olical 2020-07-27T21:19:14.065600Z

And preventing the update

Olical 2020-07-27T21:19:31.065800Z

It's all compiled for you, no JVM involved at all, it's just Lua in the repo

penryu 2020-07-27T21:20:08.066Z

verified that :PlugClean is correctly removing the entire git clone. and I've removed the do: 'bin/compile' bit too.

Olical 2020-07-27T21:20:25.066200Z

I'd imagine that was the culprit

penryu 2020-07-27T21:21:33.066500Z

sorry, I meant, I did that when I bumped to v4.1.0. I haven't had it the tag was bumped. I was gonna try re-adding it until you said it's no longer required.

penryu 2020-07-27T21:22:22.066700Z

I'm still not completely convinced I didn't mess something up in my install. I'll run through the paces again, aware of the major prepl->nrepl change. Maybe that'll help.

Olical 2020-07-27T21:24:09.067600Z

Oh! I see!

penryu 2020-07-27T21:24:11.067800Z

I'm just really glad all the multiple lisps got sorted out. looking forward to the clj+cljs

Olical 2020-07-27T21:24:17.067900Z

And sorry to drop prepl->nrepl onyou

Olical 2020-07-27T21:24:22.068100Z

I promise it's for the best

penryu 2020-07-27T21:25:00.068300Z

Not a problem at all! I should have read the release notes before bumping 2 major versions. 😅

penryu 2020-07-27T21:52:24.071Z

Update: • Yes, if I remove the tag entirely, vim-plug will pull master and after update, will show "Already up to date" • If I use a tag, vim-plug status will just show "OK", and "pending updates" will be the commits in master downstream from the tag • nvim is still not loading conjure at all, even after a full clean of the plug checkout. commands like :ConjureRefresh are not defined; :Con<tab> just lists 'confirm', 'const', and 'continue'

penryu 2020-07-27T21:55:00.072700Z

So pending updates mystery is solved, and not the culprit. For some reason, conjure just isn't being loaded/sourced? Gonna do a verbose startup to see where it's going wrong. Entirely possible it's a problem on my side.

penryu 2020-07-27T22:08:06.077100Z

@olical Yep, all me, and I'm sorry for the noise! Somewhere along the line my vim->`nvim` symlink got lost, and the built-in /usr/bin/vim has been playing doppelganger, and the has('nvim') in plugin/conjure.vim was rightly returning false. Many apologies @olical! I'll fire up :ConjureSchool and start reaping the benefits of all your work! 🙏

🎉 1
penryu 2020-07-27T22:13:10.078900Z

Just as a matter of curiosity, do other people do the same, and still type vim when you want neovim? Or have you retrained your fingers to type nvim?

Olical 2020-07-27T22:26:18.079200Z

I use nvim and this 🙂 https://asciinema.org/a/39054

penryu 2020-07-28T09:51:07.087100Z

I settled on alias vim='echo you mean v; false', which I found out also helps when I try to tab complete filenames... because it doesn't.

👍 1
penryu 2020-07-27T22:38:35.079400Z

Brute force finger re-education. Nice. 🙂

Olical 2020-07-27T22:49:16.079600Z

I should've shocked myself each time or something 😅

Olical 2020-07-27T22:49:43.079800Z

Worked eventually

nate 2020-07-27T22:57:07.080400Z

hey @olical would you be open to re-adding in the folding of long results?

Olical 2020-07-28T07:58:27.085700Z

Yep! Of course! I have it on my list still, I'll give it a little hammock time today, maybe over my first haircut since COVID-19 👀

nate 2020-07-28T13:25:00.088200Z

Awesome, thank you.

Chase 2020-07-27T23:14:45.080500Z

I just alias v to nvim and get real lazy with it

👍 1