Fork me on GitHub
#conjure
<
2020-06-15
>
dave14:06:13

https://clojurians.slack.com/archives/CK143P6D7/p1592061883212600 i gave this a try this morning on a whim, and i like it! it's something i didn't know that i would want, but now that it's here, i totally want it

dave14:06:52

i didn't realize it, but without this feature, i had developed a habit of avoiding moving my cursor immediately after evaluating something. now i can eval something and then feel free to keep moving, which feels liberating

dave14:06:03

it's funny how little things like that can make all the difference

Olical14:06:09

Ooo that’s great to hear! Thanks for the feedback! Still not sure about turning it on by default (99% sure no) but glad you like it!

Olical14:06:26

Let me know if you see any weird race condition things where it closes when it shouldn’t or something

dave14:06:17

i'm trying to test using AnsiEsc in the conjure HUD now, but having trouble getting it to do the thing

dave14:06:09

i see that i need to run :AnsiEsc manually to get it to interpret the ANSI escape codes, but i think i would need to have the HUD focused in order to do that, right? and i can't seem to focus the HUD

dave14:06:06

my setup is that i'm using the clojure.term.colors package, (require '[clojure.term.colors :as term]) and then i'm running (println (term/red "hey")) which should print they word "hey" in red

dave14:06:08

running :AnsiEsc (with my clojure buffer focused, not the HUD) has no effect

Olical14:06:17

Oh you need to open the log buffer

Olical14:06:21

then the hud will have it too

dave14:06:25

ah, yes - it totally works in the log buffer

Olical14:06:34

It applies to the buffer, not the window, and the HUD is just a small window onto the buffer

dave14:06:45

aha! then it does work in the HUD too

Olical15:06:08

Would I be able to get this code as text? Will be useful in stress testing my hacky AnsiEsc fork!

dave15:06:15

(doseq [color (keys term/*colors*)
          :let [color-fn (ns-resolve
                           'clojure.term.colors
                           (symbol (name color)))]]
    (println (color-fn color))
    (println (term/bold (color-fn (str "bold " color)))))

dave15:06:41

and in the ns form, i have (:require [clojure.term.colors :as term])

dave15:06:05

oh hey, it looks like it does a bunch more stuff too: https://github.com/trhura/clojure-term-colors

dave15:06:34

i haven't even tried the fancier stuff, like FG vs. BG colors, blinking text (wat?), underlining

Olical15:06:00

I can promise you blink won’t work

dave15:06:11

i won't be too upset about that, lol

dave14:06:57

i'm quite happy with this!

dave14:06:20

it seems like there are some minor kinks to work out with some of the bold escape sequences though

Olical14:06:35

I know some of the colouring bleeds into other things, haven’t worked that out yet… it’s to do with vim syntax contains and containedin logic I think :thinking_face:

dave14:06:03

so far it at least seems more stable than colorizer 😅

dave14:06:12

i think i'm probably going to drop colorizer and use this instead

Olical14:06:29

It was like a two hour hack on top of an existing plugin, so could definitely be improved furhter!

Olical14:06:43

And with some event hooks in Conjure you could auto run it, but not just yet

dharrigan14:06:09

quickie, setting a conjure config variable, it writes into a config file?

Olical14:06:56

Hmmmm interesting. Although I can’t think of any other vimmy things that work like this :thinking_face: going to replace the config system with a simple vim table soon anyway.

Olical15:06:04

I’ll give this some thought.

dharrigan15:06:12

Sorry, that was badly worded

dharrigan15:06:14

It should have been

dharrigan15:06:35

When setting a conjure config variable, does it write into a config file (which you’ve implicitly confirmed as no)

dharrigan15:06:43

So, for example, ConjureConfig log.strip-ansi-escape-sequences-line-limit 0

dharrigan15:06:56

where is that variable set (permenantly)?

Olical15:06:30

That’s just in memory, like doing let g:…

Olical15:06:38

So no, it doesn’t write anywhere I’m afraid

Olical15:06:51

I’m going to change it all to just be let g:conjure_config.foo.bar = … some time soon

Olical15:06:01

And deprecate the command, I want to make it less special if I can.

rafaeldelboni16:06:16

I really liked the old approach of having a .conjure file

Olical19:06:28

Hmm that only existed because Conjure ran a JVM that needed configuring. Now it's all in nvims process that config should be done in the nvim way, which is g:... variables... I think. I don't know another plugin that uses it's own config file and syntax :thinking_face: if I did anything like this again it wouldn't be edn.

Olical19:06:54

I kinda want to say "here's the value you need to set, do that where you normally do for all plugins"

dharrigan14:06:04

also, will nRepl 0.8 with completions and lookup have any effect on conjure?

Olical14:06:25

As soon as it’s released I’m planning on adding backwards compatible support for these things. I think I will have to make some small changes, I don’t think they use the same op names and arguments? If they do it’ll work out of the box.

rafaeldelboni16:06:15

I came here to say the same hahaha

Olical19:06:28

This is now fixed on develop 🙂

martinklepsch22:06:03

Screenshot of hell hahahhaah

Olical22:06:25

Yeaaah, it's worse than it seems. The problem with my error handling system there is that it doesn't show the stack trace. So I just had to find it through intuition and knowledge of the code, I won't be so lucky next time.

Olical22:06:20

I've got to add my own error handling in a bunch of deferred callbacks otherwise they just get swallowed (presumably by libuv?) I think.