Interactive evaluation for Neovim (Clojure, Fennel, Janet, Racket, Hy, MIT Scheme, Guile, Python and more!)
UNLICENSE License
Bot releases are hidden (Show)
Published by Olical about 5 years ago
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!
deep-merge
function from there anyway.conjure.code
😄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(-)
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!
Published by Olical about 5 years ago
@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!
Published by Olical about 5 years ago
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.
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!
Published by Olical about 5 years ago
:ConjureUp -lein +propel
were broken due to a reaaaaly dumb mistake: https://github.com/Olical/conjure/commit/a1a1e50cd5fb17bf5c9f34dc8998f4efac4a1866 this all now works properly!Enjoy! 🎉
Published by Olical about 5 years ago
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.
Published by Olical about 5 years ago
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.
bin/compile
does less work, basically).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.
Published by Olical about 5 years ago
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.
tools.namespace
and configured through your .conjure.edn
. See the README.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!
Published by Olical about 5 years ago
pretty-error
that formats it as a (hopefully!) easy to read string. Let me know if you had any suggestions about improving the format.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.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.So fairly small changes but improvements all the same! Enjoy!
This pupdate is brought to you by my favourite breed, the Corgo.
Published by Olical about 5 years ago
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
: https://github.com/Olical/conjure/commit/e90c56ac9725cefcae33344032913a99bbc3262e
ConjureUp
output now displays in the log under conjure/up
instead of conjure/out
.ConjureStatus
is printed under conjure/status
in the same way.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.ConjureUp
so you'll know if you're connected even if you blacklist up
log lines.This pupdate is brought to you by Princess Pip, our family Chocolate Labrador. There will be more of Pip.
Published by Olical over 5 years ago
Another Conjure release, fresh from semi-sunny London!
stat
... I thought I did it last version but missed one.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.I hope you enjoy this pupdate and you have a great weekend ahead of you.
Published by Olical over 5 years ago
bin/compile
because I was using stat -c
which Apple removed support for 🙃 I'm now using date -r ... +%s
to get the modified time of files in seconds to work out if I have to compile or not.conjure.result
is no more! The world is a simpler place!Basically everything got a lot more robust but ClojureScript support will be a little iffy around exceptions until my patch for ClojureScript is merged and release. I hope it works well for you! Doc lookup for things like spec keywords will now work too, yay!
This should not be a breaking change. Have a doggo for keeping up to date responsibly.
Published by Olical over 5 years ago
Everything seems stable and there's some nice tweaks in here so I thought I'd tag it as a release. The next one should hopefully include fully configurable mappings!
ctx
map throughout the code, makes some internal functions a little nicer.compliment
at the moment) if they aren't loaded yet.
#conjure
in Clojurians slack. Come say hi!Well done for upgrading responsibly, have some doggos.
Published by Olical over 5 years ago
CONJURE_LOG_PATH
, it was relative to Conjure's source, not your nvim
. .localvimrc
.#slurp-edn
and allow it to return nil
if a file can't be read.nil
:port
values, mainly from #slurp-edn
, the connections with a nil port are ignored.let g:conjure_log_auto_open = ["out", "err", "tap", "doc", "test"]
Published by Olical over 5 years ago
g:conjure_log_auto_open
config.conjure.edn
Further documentation for this new style can be found in the README.
No input required! It'll connect to what's running at the time, if you start your prepl after Neovim you can just hit <localleader>cu
by default to ConjureUp
which will reload the config and sync the connections.
You can also provide +some -flags
to ConjureUp
which will toggle on and off specific connections. Great if you set some to be :enabled? false
by default (live server port forward for example) which you want to explicitly toggle on at some point.
I hope this is good for everyone and is seen as a positive change, it is breaking (no more ConjureAdd
/ ConjureRemove
/ ConjureRemoveAll
) but it's the last breaking one I could think of. I've wanted to implement it for quite a while now, glad I've finally got around to it!
Get in touch with me on Clojurians Slack (#conjure @Olical) or twitter (@OliverCaldwell) if you have some questions around this change.
Published by Olical over 5 years ago
Phew! This looks like the last release before I take a swing at #15 which will be a breaking change.
So the log buffer is going to appear a lot less now, but you still have access to it when you want and it contains the history of your evals. I think this UX is a lot nicer, your windows and splits are only messed with when there's large output or when you ask for the log buffer now.
If you don't like this change or want more config etc, hop in #conjure
in the Clojurians Slack or hit me up on twitter via @OliverCaldwell. Or open an issue here and we can discuss your thoughts!
Published by Olical over 5 years ago
See #40 for more details, but records being returned from your REPL will cause Conjure to barf at the moment. I can't fix that until I rework how errors are managed and I can't do that until I get a patch into ClojureScript (although I might work around that...).
I've basically made it so these weird parse errors will no longer kill your connection, they'll just show you the error. You can still convert records to maps and continue with your day. I'll get this fixed as soon as I can.
Published by Olical over 5 years ago
Sorry about the patches, I thought I'd fixed it, realised I hadn't then actually fixed it. Hooray for v0... and patches! See v0.16.0 to see more about quick doc.
Published by Olical over 5 years ago
See v0.16.0 for the real update, this patch just adds some more protections just in case something goes wrong. It shouldn't, but it's more resilient now.
Published by Olical over 5 years ago
I've added documentation lookup on CursorHold
that displays with virtual text next to your current line.
It doesn't use the word under the cursor, like K
, it uses the head symbol of the current form. So if your cursor is the |
in this example you'll see documentation for +
.
(+ 10 |10)
Published by Olical over 5 years ago
.edn
files in #37. There's now a lot more space for adding more mappings without stepping on the toes of other parts of the tool.I think I'm going to move to a next
branch where all development happens soon. That way master should stay pointing at the latest version. I don't want to update the README with new things if they're not technically released yet.
I hope you enjoy!