Giter Club home page Giter Club logo

Comments (10)

Olical avatar Olical commented on May 14, 2024

from conjure.

daveyarwood avatar daveyarwood commented on May 14, 2024

I like the idea of tagging that output as conjure/up instead of out. I didn't realize you could do that with prepl, neat!

Rebinding <localleader>cu to run :ConjureUp followed by :ConjureOpenLog sounds workable to me. There are a couple of related QOL things that would make me happy in that workflow:

  • Having the ability to deliberately open the Conjure log in small mode would be nice. I have g:conjure_log_size_large set to 100%, which is what I want when I run :ConjureOpenLog by itself (to view large eval results, etc.), but to support opening it just to see the output following :ConjureUp, it would be nice to be able to open the log in small mode (i.e. 25%). It's a subtle thing, but it would feel more like the Conjure window is out of my way when I want it to be.

  • Ideally, I wouldn't ever have to run :ConjureUp manually. Typically, I have to run :ConjureUp if I started Vim before I started my prepl server, or if I have to restart my prepl server for whatever reason. (Maybe that idea is already on the road map? It reminds me of the discussion around #15 )

from conjure.

Olical avatar Olical commented on May 14, 2024

So I've split ConjureStatus and ConjureUp log entries out into their own categories. If you have changed g:conjure_log_auto_open you'll need to add status and maybe up if you wanna see connection syncing output. But yeah, maybe being able to control log size when opening it would be good too.

Let me know how you get on with this first 😃

from conjure.

Olical avatar Olical commented on May 14, 2024

Something about how this is split up and configured smells to me right now, but I'll mull it over. Maybe I need to flip that list over so you choose what you don't want to see?

from conjure.

daveyarwood avatar daveyarwood commented on May 14, 2024

"Everything by default" does sound good to me. Maybe that implies a separate config var like g:conjure_log_auto_open_blacklist. If you did that and continued to treat g:conjure_log_auto_open as a whitelist (default: everything), you could probably make this a non-breaking change.

I tried the develop branch and it's looking good from my perspective. 👍 I added status to my whitelist, and left up out so that the log doesn't pop open when I start Vim and Conjure tries to make its first connection to my prepl. I also added a <localleader>cU mapping that does :ConjureUp<CR>:ConjureOpenLog<CR>, but interestingly, I found that I didn't really need it, because in practice, I just run :ConjureUp (not seeing the output) and trust that it'll work, and if it doesn't work, I'll know as soon as I try to eval a form and the Conjure log pops open for the err message.

I think the next step is to have Conjure periodically re-up my connections, so that I never have to run :ConjureUp manually :)

from conjure.

Olical avatar Olical commented on May 14, 2024

Cool that all sounds good to me! I'm glad it works, and yeah, you shouldn't have to see the log when you ConjureUp really. It should do exactly what you expect, if you need to check it you can.

I think if I add a blacklist I may well just do a breaking change and remove the existing config while it's still < 1.0.0. Having that legacy forever after 1.0.0 will be a little gross I think, especially if I think it's not the best UX and the interaction with the new config will be... questionable. Like what happens if you set both.

I think I'll swap it to a blacklist and document it well for the next release. Or I'll call it "suppress" maybe.

Not sure about running ConjureUp periodically but I'll give it some thought. You might be starting and stopping other prepls you don't want it to connect to until you ask / it might disconnect mid way through some execution. I'll give it some thought though!

from conjure.

daveyarwood avatar daveyarwood commented on May 14, 2024

You're actually in a great position as the author of a plugin that's oriented around a log. Whenever you want to make a breaking change, if you want, you can follow a deprecation process where you notice when users are doing the old thing and print a warning to the log. In this case, for example, you could recognize when the old config variable is set and print a deprecation warning.

from conjure.

Olical avatar Olical commented on May 14, 2024

from conjure.

Olical avatar Olical commented on May 14, 2024

Okay, g:conjure_log_auto_open has been swapped to g:conjure_log_blacklist, let me know how you get on!

e90c56a

Should solve your issues fairly nicely? I know it's a breaking change but I think it's for the best. Like a plaster, better to rip it off quickly.

from conjure.

daveyarwood avatar daveyarwood commented on May 14, 2024

I like it. I went through and figured out what I need in my blacklist to get the equivalent of my current whitelist:

let g:conjure_log_blacklist = ["up", "eval", "ret", "load-file"]

I like this because the intent reads much clearer than with the whitelist version. 👍

One thing you might consider before this gets pushed to master: the name "conjure log blacklist" might imply that it's a list of things not to include in the log, vs. what it really is, which is a list of things that should not result in the log popping open. As such, I think g:conjure_log_auto_open_blacklist is a better name because it's more precise. It is a bit lengthy, though :)

from conjure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.