Skip to content

Releases: Olical/conjure

Internal tweaks and virtual text clearing improvements

01 Oct 11:47
f8f178c
Compare
Choose a tag to compare

Hello! I hope you're having a good week!

I've been using develop for a while at work and I'm happy with the behaviour so I thought I'd cut a release ahead of my work on more testing and "hooks" which should allow everyone to "hook" into things like REBL to display evaluation results via some simple configuration!

  • @daveyarwood improved the wording of the message you see if Conjure exits with an unexpected error code.
  • I've removed medley as a dependency of Conjure's internal JVM, this might help startup time a tiny tiny bit, I only needed the deep-merge function from there anyway.
  • The Deoplete integration should handle restarts of Conjure's JVM now, which shouldn't happen unless things are exploding anyway, so hopefully you won't notice this one.
  • Internal refactoring so that I can re-eval Conjure's internal RPC handling functions without restarting the whole thing.
  • More refactoring so that the code to generate code to look up definitions for "go to definition" is implemented in terms of templated Clojure data, rather than string templates. This means there are no more string templates in conjure.code 😄
  • Changed virtual text so the clearing is more aggressive, the commit explains it a little.
commit 85d6d83deb94cc580df2f1979043244fdef2638a
Author: Oliver Caldwell <[email protected]>
Date:   Sun Sep 22 16:02:06 2019 +0100

    Make virtual text clearing more aggressive
    
    So if you're not using any of the quick_doc tools it should still stay
    clean. As long as you move your cursor around it should clear off that
    pesky hanging virtual text.
    
    This opens up more possibilities into virtual text information such as
    progress of dependency injection.

 plugin/conjure.vim | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)
  • Capped hunting for a namespace name in a buffer, this should prevent massive buffers from causing the cursor to lag slightly (I mean 5k+ lines). There's still work to be done here to make the log buffer work a lot better when it's huge.
  • Skip host+port combinations we're already connected to. So if you have some global config to connect to localhost:5555 and some project local config for the same, you won't get two connections. This prevents your evaluations from happening twice, the first connection will win.

With that last change, I was hitting the edge case at work where I had two configurations looking for a .prepl-port file, both were finding the same file and connecting to the same port. I think this behaviour is undesired, so I removed it. Hopefully it's the right call.

Next up on my to do list is a bunch more unit and integration testing to give us some robustness in the face of changes and work on "hooks". The next update will probably be slightly breaking for those of you using the tools namespace refresh configuration, but it's for the best, I promise.

Have a great rest of your day and week!

image

Show source and ConjureEval completion

18 Sep 18:12
fc0e297
Compare
Choose a tag to compare

@justone has added "view source" through a PR! 🎉 thanks a lot, Nate! You can now hit <localleader>ss (by default) and see the source for the symbol under your cursor in the log buffer.

There's some oddities around it not working on the symbol if you've reevaluated it without loading the file from disk but they're easy enough to work around. Maybe someone would like to look into patch up those issues...

I've also added :ConjureEval completion, so as you're typing code to be evaluated you can tab complete as if you had omnicompletion. This was suggested through #conjure on Slack.

I've also fixed an error around Conjure's exit code if it gets SIGTERMed, it's now cool with that method of death. I think in the latest Neovim update (0.4) they changed how processes get killed on quit which causes some weird log output from Conjure that thought it was being helpful.

As an aside, Neovim now has floating windows! I think there will be a lot of usage of those in Conjure in the future and most of the virtual text (for things like doc) will get replaced by them. We'll see!

Smarter dep injection, better remote prepl tools

11 Sep 11:29
c1ed43c
Compare
Choose a tag to compare

Smarter dep injection

Self prepling should be somewhat quicker now, so if you open a Clojure file within any random directory where no prepls are configured and running you can get to evaluating a little quicker.

This is due to some internal refactoring around how dependencies are managed and injected.

Better remote prepl tools

I've improved how paths work within Conjure for evaluations and go to definition. This means that when you're prepled into a Docker container or remote machine that doesn't share your file system structure you'll still be able to go to definition on symbols, it'll find the file local to your computer that matches a part of the path.

Evaluations will also set the "source file" in the meta data of symbols to a relative path so as not to break other tools in the ecosystem if you're sharing a REPL environment with anyone else.

This works by taking absolute paths and successively removing parts from the front until we find a common relative path that matches a readable file. I added this because I've started working with projects running inside Docker containers 😄

I hope you're having a great week and enjoy these changes!

ConjureUp flag fixes and multiline output fix

06 Sep 18:56
0572682
Compare
Choose a tag to compare
  • Flags for which prepl you wanted to connect to, like :ConjureUp -lein +propel were broken due to a reaaaaly dumb mistake: a1a1e50 this all now works properly!
  • Some outputs were saying they were multiline when they really were not, this caused some weird display issues for some people. The output of evaluations and taps are now trimmed so any stray new lines won't trick Conjure into thinking it's a multiline output.

Enjoy! 🎉

Fixing record display

06 Sep 12:32
bf13c1d
Compare
Choose a tag to compare

Dave Yarwood pointed out over in #conjure on Slack that an old bug had resurfaced, if you executed the following:

(defrecord Foo [x])
(->Foo 10)

It would return nil instead of #user.Foo{:x 10} as expected. This now displays as expected.

v1.0.0!

04 Sep 18:16
bb02609
Compare
Choose a tag to compare

I'm finally happy enough to tag a v1.0.0 release! 🎉 😱

Not an awful lot has changed since the last one but it's more of a ceremonial line in the sand with a re-written README and a few internal cleanups.

  • Refactored how the injected deps are built and managed. You no longer need to compile them! So that's less to do post-install, just AOT of the Conjure classes remains (bin/compile does less work, basically).
  • Don't allow evaluations until all deps are injected, prevents some weird potential race conditions, you will have to wait to see the "done" message before you can start working though.
  • Completely rewrote the README, it's got a gentler introduction and fairly pretty tables now. More guides and documentation to come!
  • Always fall through to Conjure's own JVM self prepl if no connections work. This means if your main development server is down you can still get autocompletion and documentation / eval of core Clojure things. You won't get your project dependencies, but it's an improvement!

I've laid the foundation for ClojureScript dependency injection which will make autocompletion for CLJS fairly easy once Compliment releases it's new version. There's definitely more improvements that can be made around injected dependencies but I'll reserve judgement for now, you just have to wait 2-3 seconds upon the first connection which I don't think is too bad.

Namespace refreshing, args in completion, internal cleaning

22 Aug 08:21
a7e4d42
Compare
Choose a tag to compare

A fairly chunky release and hopefully the last one before ClojureScript gets dependencies injected into the REPL so we can have the same autocompletion / doc / go to def experience in Clojure and ClojureScript.

Initial connection to a REPL can take a couple of seconds now because there's some optimisation work I've got to get through. It should get lower with time, the only reason it went up is because I'm beginning to implement things like tools.namespace stuff and Orchard.

  • Show the arguments to functions in completion results. Get argument lists as you type!
  • Show full doc strings in floating windows as you type in newer versions of Neovim and it's completion plugins.
  • Refreshing of changed namespaces via tools.namespace and configured through your .conjure.edn. See the README.
  • Completely refactored the conjure.code namespace so I'm no longer building code strings out of strings, I'm using code as data as templates. I've got a custom ball of macros and multimethods built atop of backtick that make it really neat to work with now.

Next up is more ClojureScript polish via some injected dependencies and rewriting of the documentation / guides ahead of v1.0.0! I have next week off so hopefully I'll get it all done or at least get very close, how exciting! 🎉

I hope you enjoy this pupdate!

image

Pretty errors, better log trimming, ClojureScript eval improvement

06 Aug 17:13
6cd17b7
Compare
Choose a tag to compare
  • Error data is no longer dumped in the folded area under an error. It's now run through a function called pretty-error that formats it as a (hopefully!) easy to read string. Let me know if you had any suggestions about improving the format.
  • Improved some of the zprint config that makes some edge cases a little easier on the eye. I think I found a bug in zprint too but I've worked around it. No time to dig deeper and work out if it is a bug right now.
  • ClojureScript evals need to be wrapped in a do block to ensure only one value is returned from the prepl. @djblue in #54 pointed out that this breaks some evaluations of ns forms. I've now made it so that single form evaluations aren't wrapped in a do block since it's not required. This might've fixed some other weird ClojureScript stuff by mistake.
  • The log buffer is now trimmed a lot more aggressively, so now if you pass the 1000 line threshold (say 1500) you'll see your entire output (yay!). But as soon as you add another line the log will be cut down to a maximum of 500 lines before your output is added.

So fairly small changes but improvements all the same! Enjoy!

This pupdate is brought to you by my favourite breed, the Corgo.

image

Configurable mappings, better log filter config (breaking) + more!

28 Jul 17:51
e20d2b7
Compare
Choose a tag to compare

More kind of under the hood and subtle changes. I think I'm running out of small stuff to fix and can move onto a few smaller features like better error parsing / formatting as well as code formatting. Here's the changes, watch out for the breaking change around g:conjure_log_auto_open, it's been replaced by g:conjure_log_blacklist: e90c56a

  • Add configurable mappings so you can remap or disable any specific mapping that Conjure defines. You can still switch off all of Conjure's default mappings if you so wish.
  • Hardening against some more weird responses from the Neovim RPC API.
  • More virtual text clearing even when you have quick doc disabled entirely.
  • Assorted internal refactoring.
  • ConjureUp output now displays in the log under conjure/up instead of conjure/out.
  • ConjureStatus is printed under conjure/status in the same way.
  • Breaking: Remove the g:conjure_log_auto_open config, replace it with g:conjure_log_blacklist setting which is very similar but now excludes things you don't want to pop the log open, rather than the other way around.
  • Show a summary of connections made in virtual text post ConjureUp so you'll know if you're connected even if you blacklist up log lines.
  • More README tweaks, still need a full documentation overhaul but for now I'm just trying to make sure everything's written down somewhere, even if it's hard to follow.

This pupdate is brought to you by Princess Pip, our family Chocolate Labrador. There will be more of Pip.

WhatsApp Image 2019-07-10 at 08 25 42

Virtual text improvements and various tweaks

12 Jul 10:01
0cbb94a
Compare
Choose a tag to compare

Another Conjure release, fresh from semi-sunny London!

  • Virtual text will be dismissed when it's not required, still more to do here but it's better.
  • You now get four kinds of virtual texts! https://imgur.com/a/lTabSwI
  • Swapped from Cheshire to Jsonista, it should be a little faster for autocompletion stuff. Probably not noticeable though.
  • Updated a few internal dependencies.
  • Fixed OSX support by removing usage of stat... I thought I did it last version but missed one.
  • Catch more uncaught errors in nicer ways, there's only a few times I see errors leak out now and they're not bad. I'm slowly fixing them! It's just where Neovim returns nil when I ask for the cursor position and I'm not sure why, I think it's a race condition thing in Neovim? I'll solve them all eventually.
  • Socket disconnects don't show errors now, they're nice and quiet.
  • Starting to add all the config for you to remap every mapping to whatever key you want, not done yet though.

I hope you enjoy this pupdate and you have a great weekend ahead of you.