Fork me on GitHub
#conjure
<
2020-05-19
>
Olical14:05:08

https://asciinema.org/a/331770 three languages in one session 😄

martinklepsch16:05:51

That floating window fuzzy finder thing? I’ve been using fzf.vim for this but floating seems nice. Kind of want something like that for :Gcommit too now 😛

Olical16:05:54

That's vim-clap and I'm a BIG fan

Olical16:05:08

I use lazygit in a floating terminal too

martinklepsch16:05:44

Interesting. Can’t quite imagine the lazygit UI in the same floating thing (too small?) but would love to see how you use it

dave18:05:44

it's also possible to configure vim-fzf to use a floating window. i have it set up that way and i find it really nice

dave18:05:01

floating clap and lazygit above also look great!

Olical14:05:11

Janet is working well!

Olical14:05:22

Help text exists, feel free to give it a whirl on develop!

martinklepsch16:05:33

With the new nREPL :ns stuff I’m getting an error when doing ConjureEval (user/thing) because it’s trying to evaluate that from within the file I have currently open (which isn’t loaded)

Olical16:05:43

Ah, that's annoying. The problem is 90% of the time you want your ConjureEval to be in the context of your current buffer (if you wanted to call a function you could see on screen, for example)

Olical16:05:06

You can set b:conjure_context to something else, but that's kind of a last resort for buffers with really weird ns forms or something.

martinklepsch16:05:23

True. Another situation where this is breaking is when I’m evaluating something from a file without a ns declaration

Olical16:05:44

I guess the ideal scenario is for :ns stuff to not die when the namespace doesn't exist. Which I'm not sure how to solve :thinking_face:

martinklepsch16:05:59

I could imagine that maybe this also breaks some bb nREPL stuff since often scripts don’t have a namespace

Olical16:05:12

That's nREPL that's throwing that error, it doesn't give me a chance to make the namespace. I have to perform an eval before your one to check if the ns exists which sucks.

Olical16:05:32

If you don't have a namespace it should just eval without setting it?

Olical16:05:00

Maybe I need to retry evals without a namespace if the namespace doesn't exist?

martinklepsch16:05:00

; eval (current-form): (require 'icebreaker.server.functions)                                                                                    ;Namespace not found: -publics

Olical16:05:25

Oh wait, that's picking up something that isn't a ns form

martinklepsch16:05:25

I have no idea why it would think -publics is the NS 😄

Olical16:05:35

Because of ns-publics

Olical16:05:37

Which is very bad

Olical16:05:40

I need to fix that expression

martinklepsch16:05:56

Yeah, was just gonna say

Olical16:05:24

Which might help buffers without a namespace

Olical16:05:49

But I need to think of some way around namespaces not existing. It sucks that :ns doesn't let you opt out of that error and say "just eval anyway"

Olical16:05:46

Pushed a fix to develop for the ns pattern.

Olical16:05:00

I had %s* and I wanted %s+, of course

Olical16:05:09

The "this ns doesn't exist" one is harder

Olical16:05:12

But important

Olical16:05:31

Thought of a way around the ns chicken and egg problem too 😄 gimmie a minute and I'll have it up

Olical16:05:51

Okay, pushed to develop. It should now detect non-namespaced buffers properly and also handle the chicken and egg problem of namespace definition.

Olical17:05:09

Thank you for letting me know about it!

nate18:05:37

Is it possible to set up a mapping that makes the log show up on the bottom or right by default? I've tried map ,lo :botright :lua require('conjure.log')['vsplit']()<cr> and that doesn't seem to work

nate18:05:19

if I set splitbelow, that works, but I don't know how I feel about toggling it globally

dharrigan19:05:54

you could perhaps have an autocommand that sets it per file type?

nate20:05:34

hm, interesting idea

Olical10:05:57

Hmm, it's worth considering, I'll add a todo item to look into a setting for this.

Olical17:05:30

Pushed a change to develop that allows you to force botright for the log window. So it'll always take up the full height or width and always appear on the far right or at the bottom. This is off by default but can be turned on by setting :ConjureConfig log.botright? true

nate17:05:33

awesome! I'll check it out!

nate17:05:22

this is perfect, thank you!

Olical18:05:49

Yay! I'll release it soon along with the {} and [] pair eval

nate18:05:31

I think I'll try it on globally and see if that works

rgm19:05:07

is it possible namespace metadata is confusing conjure? I have a (ns ^:figwheel-no-load my-project.predictions ,,,) and <localleader>eb is giving me ; Namespace not found: ^:figwheel-no-load in the log.

Olical20:05:12

Yes, this is 100% a problem with Conjure and I need to fix that now, similar to what @U050TNB9F reported today. I'll get on this ASAP.

Olical20:05:02

I'm using a regular expression to parse this stuff so it's prone to issues. I'll adjust it to ignore things that start with hat maybe? Although you can also set metadata with a map, right? That'll be hard to spot...

rgm20:05:15

I mean, don’t panic. Now that I know what it is I can just remove it for a bit.

Olical20:05:27

I don't think I've ever set metadata on a namespace :thinking_face: so it's something that slipped my mind.

Olical20:05:07

Oh it's okay, I'll hop on it tomorrow, no stress. I'm sorry about the issue though, it's a bummer to get tripped up by that sort of thing, I want to aid productivity, not get in the way!

Olical20:05:32

But yeah, either that or set b:conjure_context to the buffer name and that'll also get around it.

Olical20:05:05

You could maybe set that with a comment using ;; vim: let b:conjure_context="my-project.predictions": at the bottom of your buffer :thinking_face:

rgm20:05:22

yeah, I don’t do it often; really only for Figwheel’s benefit. Good tips, thank you. Not sure the modeline let works directly; found https://www.vim.org/scripts/script.php?script_id=83 as a separate script for vim and decided I can just set it manually

rgm20:05:56

(other workaround: turns out fireplace and conjure coexist, so a quick :Require does the job too).

Olical20:05:14

Ah that's neat! Best of both worlds 😅 I'll improve the expression tomorrow though

rgm20:05:13

by the by it’s deeply pleasing to be able to run two tools in parallel, as a way of weaning myself off the older one while still getting work done. I’m not sure that was intentional but I do appreciate it.

Olical09:05:33

Ensuring I didn't conflict with fireplace's mappings and commands was something I had in mind, yeah 😄 there's no reason why they can't coexist.

Olical10:05:41

I rewrote how the parsing works for Clojure buffers, it should be okay on develop now?

rgm15:05:41

👏... at desk soon & will give it a go.

rgm17:05:47

confirmed: ns metadata shortcut does not interfere with ,eb on develop … thank you!

rgm19:05:41

is it maybe looking positionally for the name of the namespace?

ghosttoaster23:05:04

Hello all! My conjure repl is stil reporting 2.1.1 even though vim-plug seems to think I've updated to 3.2.0. Also :ConjureSchool doesn't seem to be a recognized command. Does anyone have any thoughts on what might be happening?

dave23:05:55

silly question: did you restart vim?

Olical17:05:30

Pushed a change to develop that allows you to force botright for the log window. So it'll always take up the full height or width and always appear on the far right or at the bottom. This is off by default but can be turned on by setting :ConjureConfig log.botright? true