Interactive evaluation for Neovim (Clojure, Fennel, Janet, Racket, Hy, MIT Scheme, Guile, Python and more!)
UNLICENSE License
Bot releases are visible (Hide)
Published by Olical about 4 years ago
Hello! Happy Sunday everyone! I hope you've had a wonderful relaxing weekend with a good week ahead of you. Here's yet another fairly small but hopefully helpful Conjure update to brighten your day a little more 😄
Timeout
as the session type. This is okay, it's just a thing that makes the UI a little snappier and less hung up on things that are optional information anyway.let g:conjure#log#fold#enabled = v:true
. It'll fold anything greater or equal to 10
lines by default but you can override that with g:conjure#log#fold#lines
. It's not enabled by default since it could be a pretty annoying change for some people.And I think that's everything! Thanks for reading, subscribing to updates and sponsoring me. You're all amazing, have a great rest of your Sunday!
Ollie
(def pot (atom :cat))
Published by Olical about 4 years ago
Hello! I survived presenting at vimconf (Conversational Software Development: What, Why and How?) and can finally release some small improvements I've been sitting on for too long + some more things from yesterday.
I like to use the develop branch in anger at work for a day or two to make sure there's no obvious issues before I release which slows things down a little. Here's the changes!
~/.config/conjure
. This means you can :cd
to a directory containing a .nrepl-port
file then open a file from a local library you're working on that's in another tree. Conjure will now successfully connect to the nREPL from your CWD!And that's all for today! I hope you enjoy the changes and it works well for you! I hope the next update will be out quickly with a few more fixes 😄 enjoy!
Have a great rest of your week!
Published by Olical about 4 years ago
Sadly I broke the search for .nrepl-port
files above your nvim current working directory. I'd accidentally added a second function called resolve
to the conjure.fs
module that behaved in a similar way to the function it was shadowing, this meant .nrepl-port
files worked fine in your current directory but suddenly broke if you tried connecting from elsewhere.
I've also updated the sponsors list, two new amazingly generous people have started sponsoring me ❤️ I can't thank you enough.
Published by Olical about 4 years ago
Hello! I hope you've had a wonderful weekend so far! I'm about to go out for a run in the sun so I thought I'd release the current fixes and improvements from the develop
branch first. I hope you enjoy!
syntaxcomplete#Complete
omnifunc if the client isn't returning completions.
:helpg conjure#completion#omnifunc
.diff
mode (like while sorting through git conflicts) for thirut
on Discord. I don't think it's quite there yet, but it might improve some user's workflows considerably. Will probably be polished off in the next patch.And that's all from me! I still have so much on my todo list that I want to get out very soon, hopefully you'll be seeing these very soon!
Have a great rest of your Sunday! Get some rest, look after yourself, see you soon!
Published by Olical about 4 years ago
So much to cover! I couldn't release earlier and smaller really because the multiple connections required a LOT of coordinated refactoring, I hope you enjoy these changes and improvements!
:help conjure
for more on this).:helpgrep ConjureClientState
for more information.test-vars
over test
for Clojure (thanks, @b-ryan! #106).deps.edn
cleanup by @penryu, thanks!:helpgrep conjure#log#wrap
).And I think that's everything worth mentioning! I have a LOT more on my todo list but hopefully I can release them a little more incrementally now this big multi-connection feature is out.
Have a wonderful weekend!
Published by Olical over 4 years ago
Hello you wonderful evaluators, I hope you're having a great week! This update brings improvements to file evaluation across all clients with a sprinkling of new things in Clojure and Janet. I've also removed the temporary config system shims that were designed to help people migrate to the new (better!) system.
Onto the change log!
:ConjureConnect
, more arguments are optional in the way you'd expect, just throw a host or a port at it and it'll probably do the right thing. Before it wanted you to be overly specific which would confuse some people.:helpgrep relative_file_root
). This means you can evaluate a file from your local disk even if the runtime you're connected to is within a Docker container that's mounted the source into it under a different path. Basically working with source mounted inside docker containers should just work as if it was on your local file system. Older versions of Conjure used to have this but it was lost in the rewrite, finally it's back!v4.0.0
, there's not much you need to do to upgrade.:helpgrep print_options
).g:conjure#debug
is enough, I don't think the individual client debug flags were useful.I'm not sure what's next on my radar yet, I obviously have a todo list growing off into the sunset but I may well just mull those over and work on some personal development (like building git in Clojure and maybe recording the process in a series of videos to show my Conjure usage and workflow).
I'd also love to have a go at integrating another few lisps to some degree such as Racket and Common Lisp (#97). So maybe those will be next up!
One more thing to consider: I'm thinking about getting shiny high quality stickers made of the logo and mascot to send out to people sponsoring me past a certain level (maybe cheaper stickers for those sponsoring me to a lesser degree and to hand out at conferences?). Thoughts? I may well rework the sponsorship levels too after reading some really interesting points in I Just Hit $100k/yr On GitHub Sponsors! 🎉❤️ (How I Did It).
Here's a kitten for reading this release. You rock.
Have a great week and subsequent weekend!
Ollie
Published by Olical over 4 years ago
I accidentally broke :ConjureSchool
when rewriting the configuration system and didn't notice until @markwoodhall brought it to my attention (thank you!).
I've fixed the issue (replaced some -
with some _
😬) and added a simple test that's run in CircleCI on each commit to prevent it from happening in the future.
School is back in session!
Published by Olical over 4 years ago
Hello! Welcome to another Conjure update! So fresh, it's still warm 🔥 or maybe that's just the weather we've been having in the UK recently...
I've rewritten the configuration system (and documentation) to just use regular old VimL let g:conjure#debug = v:true
, for example. I've also remapped b:conjure_context
to b:conjure#context
for consistency.
Also, say hi to the wonderful Lillian, designed and named by the amazingly talented MysticalScribbles!
This is a breaking change due to the fact that you'll need to update some of your config (if you have any). Hopefully it'll just get simpler! The biggest thing to be careful about is mappings
became mapping
and clients
became filetype_client
in a configuration context. You'll see these reflected in the documentation / help files.
let
, no need to worry about "oh is Conjure loaded yet? Do I use ConjureConfig
or g:conjure_config
?"ConjureConfig
with warnings, the new system will try to use your existing configuration but will print warnings until you migrate.The next chunk of work and release will hopefully be the following:
(ns ...)
forms like Clojure.Stay safe, rest your brain, enjoy the remainder of the weekend. You're doing great 🎉
Published by Olical over 4 years ago
Hello! I hope your week is off to a good start! If not, I'm sure it'll get better and maybe this update will help, even if it's only by a tiny amount.
b:conjure_context
in any buffer to override which namespace it uses for that buffer)log.hud.passive-close-delay
, set this to 1000
to enable a second of delay between when you move your cursor and the HUD closing. Thank you, @heHamsta!log.strip-ansi-escape-sequences-line-limit
set to 0
. Combine it with Olical/AnsiEsc to get ANSI terminal highlighting in the log buffer, to an extent. This fixes #53!make sponsors
command to update this by scraping the HTML (obviously anticipating rapid change in sponsors 😬 I can hope!).Take care of yourself, you're doing great. Here's a pup for reading the pupdate.
Published by Olical over 4 years ago
Happy Sunday to you all! Here's a floppy corgi 😄 🐶 today's release is fairly small but might come in really handy for some!
[]
and {}
pairs when evaluating forms, you can configure what pairs are considered with :ConjureConfig extract.form-pairs ...
, it defaults to [["(" ")"] ["{" "}"] ["[" "]" true]]
.log.botright?
config option (false
by default) that forces the log window to either open on the far right or bottom of the editor taking up the full height or width respectively. Enable with :ConjureConfig log.botright? true
.Published by Olical over 4 years ago
Good morning, evening and everything in between! I hope you're having a great week and enjoying the weather wherever you may be. Today's pretty important because Conjure has support for three (three!) Lisps! My original vision of a tool that supports many languages is coming together!
Janet support has landed! You just have to start a spork/netrepl server and then open a .janet
file. It'll connect automatically and away you go, you can evaluate forms as you would in any other language.
This paves the way for more languages such as Racket and eventually non-lisps when we get wide adoption of tree-sitter in Neovim. How exciting! Now for the full notes.
ns
form and still pick out your namespace name correctly. Let me know if you find a ns
form it can't parse!master
branch with various improvements and fixes.That's all for now! I hope these are welcome changes and you have a good rest of your week. I'll be starting my new job on Tuesday so my output might drop a little but I'll still continue to fix and improve Conjure into the future.
Here's to many more years of having conversations with your code!
Side note: I'm thinking about commissioning a cute hand drawn logo and mascot, possibly an animal in a little parenthesis covered wizard hat+robe or something. Anyone know anyone awesome that would like to do that?
Published by Olical over 4 years ago
Hello friends! Here's another Conjure update fresh out of my combined kitchen and living room!
:ns
key in nREPL messages, should work a lot better!nil
. If you have a mapping that conflicts with something else and you don't need it you can now get rid of it.Enjoy! Have a great week!
Published by Olical over 4 years ago
Should have no noticeable effects for most users. I've updated Fennel in Aniseed to v0.4.0 (+ a patch that fixes something around macros) and then updated the dependency on Aniseed in here.
I've recompiled the project with the new Fennel and everything seems okay! I've also smoothed over some incompatibilities with shadow-cljs so everything should be working fine with that now.
Enjoy! Have a great weekend!
Published by Olical over 4 years ago
v3.1.0 was pretty sizeable and as such didn't have as many eyes on all the changes I was making. This means the moment I published it a few issues were discovered that I really should have caught. Sorry about that!
This patch includes the following fixes:
So not very much, but the env var error and lack of load file were glaring issues. Enjoy! 🐶 🎉
Published by Olical over 4 years ago
These release notes are correct but you should use v3.1.1 instead since it contains a few fixes for this release.
This important pupdate is sponsored by my mum's puppy, Willow.
Okay, hold onto your hats, there's a lot to get through!
<localleader>e!
by default. You can place your cursor on a form, press that and it'll be replaced by the result of the evaluation!c
by default, but can be configured), so you can paste them into your buffer without having to yank them from your log! This is like "eval and replace" but a little more flexible.:ConjureSchool
to learn how to interact with Conjure.~/.config/conjure
for .nrepl-port
files too, this is a good place to put a standard fallback port that you want to use when no .nrepl-port
file is found within your current directory.:ConjureSchool
without having Conjure installed! Just paste the one liner, run it, and you're in the school! Simply requires curl
and an up to date nvim
.doc
lookup with an in-ns
call. Bug fix.I hope you enjoy this update! 🎉
Published by Olical over 4 years ago
So I accidentally invented Aniseed, a way to write Neovim plugins interactively in a Lisp that looks just like Clojure. Then I slipped and accidentally rewrote Conjure using this system which also happens to support more than one language now.
So, the new Conjure, what does it mean:
bin/compile
step to install the plugin!Okay, I can't think of any more right now, but basically it's better in every single way. I hope you'll agree!
Once you've updated you can use :help conjure
to learn all about the mappings and configuration available in the new version. :help conjure-client-clojure-nrepl
will tell you all about the Clojure specific configuration and mappings.
For those of you that just need prepl support, I'll be providing that with another Clojure client you can opt into at a later date. It won't be as powerful as this new nREPL version, but it'll probably cater to the needs of some of you.
I hope you enjoy, it's been a LOT of work to get to this point. I mean like, years of implementations and experiments and then months of work to get this version production ready. I just hope it was all worth it 😅
Let me know if you have any feedback or issues, I'd love to hear your thoughts.
May the 4th be with you 🧙
(if you want to share the good news, please give my twoot a re-twoot!)
Published by Olical almost 5 years ago
This has been sitting on develop for quite a long time now! The only noticeable change is that Conjure will flush upon eval now, that means you can use (print "foo")
and see "foo" printed to *out*
right away. Before this you would have to wait until a newline was printed or (flush)
was called. This was only ever a problem in JVM Clojure, not ClojureScript, that already flushes automatically.
I've also added a :completions
hook that allows you to map, filter or sort the completions as they're returned from Conjure before your Neovim completion plugin gets hold of them. This can be useful to filter out keys you don't care about.
There's been a number of internal source files that have been moved around to tidy up the top level directory, although that shouldn't be noticeable by any users.
Published by Olical almost 5 years ago
If you evaluate a mark in another buffer it would be evaluated under the wrong namespace.
If you set a mark F
in namespace foo
then evaluate it from namespace bar
with <localleader>emF
it'd be evaluated with a namespace of foo
. That's been corrected so it'll evaluate with bar
now, apologies for the mistake!
I hope you have a great weekend! 😄
Published by Olical almost 5 years ago
After a fairly length discussion and a period of hammock time, I'm pleased to announce evaluation of a form at a mark. This means you can set a regular mark in Neovim (mf
/ mF
etc) then ask Conjure to evaluate that mark from anywhere in the buffer! If the mark is upper case you can even evaluate forms in different files!
When invoking this new command (:ConjureEvalFormAtMark
or <localleader>em{KEY}
by default), you'll see Conjure very briefly jump to the code in question, evaluate it and then jump back.
The cool thing about marks is that their line number and character position will stay correct even as you add or delete lines. This allows you to mark a form and have it work even after you've moved lines around.
In future releases after I've done a bit of internal refactoring you won't even see the buffer jump around, it'll all be done in the background without moving your cursor.
Let me know what you think in #conjure on ClojuriansSlack or @OliverCaldwell on twitter. I hope you find this new feature useful.
Published by Olical about 5 years ago
:refresh
config from .conjure.edn
, you can now use the :refresh
hook to configure the exact same thing.:dirs
config, an optional Clojure set that limits connections to specific directories. This should come in handy for monorepos etc.:extensions
config, an optional set that defaults to #{"clj" "cljc" "edn"}
for Clojure and #{"cljs" "cljc" "edn"}
for ClojureScript. This can be used to add or remove certain file extensions for your connections.:exclude-path?
config, an optional function that returns true
or false
for each file path you might want to consider for evaluation for a connection. This can be used for custom filtering of paths for connections when the previous two don't quite cut it.:expr
config since it's been superseded by the three previous tools. If you'd like to just use regex filtering you can do that via :exclude-path?
.I hope you find these changes useful!