conjure

Interactive evaluation for Neovim (Clojure, Fennel, Janet, Racket, Hy, MIT Scheme, Guile, Python and more!)

UNLICENSE License

Stars
1.7K

Bot releases are visible (Hide)

conjure -

Published by Olical about 3 years ago

Fixed #227, don't insert the :border key into the HUD window creation call if you're on Neovim < 0.5. The extra key actually causes an error, it's not just ignored if not supported. Extra keys aren't our enemy people, let the maps grow!

This patch release has been brought to you from a moving train. Have a great weekend, I'm off to Wales!

conjure -

Published by Olical over 3 years ago

  • Added @TimoKramer to the sponsors list <3
  • Merged #222, adds borders to the HUD (you can turn this off!), thanks @p00f!
  • Merged #223, increases the amount of lines that will have ANSI colour codes stripped out. Thanks @heyarne!
  • Fix a weird bug around "bdelete"ing the log buffer. The buffer is now correctly revived when you next view it, even if you bdelete it. Fixes #221.
  • Fix path separator mixing, which should fix the Windows support. Fixes #224.
  • Updated Aniseed with similar path fixes.
conjure -

Published by Olical over 3 years ago

  • Added two new sponsors! Thank you @beanpuppy and @rbatista! ❤️
  • Added an interrupt mapping for Racket which fixes #213. So you can cancel unclosed forms as well as infinite processes. It's set to <prefix>ei by default, same as the Clojure one.
  • Added a workaround for #212 and raised an issue with Neovim for this bug: https://github.com/neovim/neovim/issues/14801

Another small update but hopefully a welcome one 😄 that bug in #212 was a doozy, one of the worst I've had to tackle in the project. I'm thankful it wasn't my mistake in the end and I could work around it, but I reaaaly had to go down the rabbit hole to work it out. I recommend checking out the issue thread to understand what was going on, kinda fun!

I'm not really making any major moves on the project right now, I just want to get into steady careful maintenance for a while. Definitely feeling challenged by work which takes away from my remaining focus time each week for OSS. So I'll make sure I spend what little time and energy I have left each week on careful fixes and improvements.

I hope you've all had wonderful weekends! I got my first COVID vaccine 🎉 very thankful that I have access to it now, stay safe out there everyone. Enjoy the rest of your weekend and give yourself time to relax. You rock.

conjure -

Published by Olical over 3 years ago

Hot fix for the Conjure School without Aniseed installed #214.

conjure -

Published by Olical over 3 years ago

Hello Conjurers! I hope you had a great weekend and your week is off to a good start. Here's a fresh set of fixes, features and improvements to help you get through the Monday. Also, now I have discussions enabled on my repositories and I'm creating one for each release.

  • Add @daveyarwood to the sponsors list! Thank you so much ❤️
  • Update Aniseed and Fennel with various fixes and improvements.
  • Display the portfile used in Clojure nREPL sessions. So you can work out where the automatic port came from, this will help you spot pesky .nrepl-port files laying around in your home directory that Conjure picked up on thinking it was being helpful. (Conjure walks up the directory tree to find a .nrepl-port to connect to)
  • Added g:conjure#eval#gsubs, a generic set of substitutions you can configure for your evaluations. See :h g:conjure#eval#gsubs for more information, it allows you to make things like comment blocks evalable! You can manipulate your code using Lua string substitutions before it gets evaluated, like a layer of editor local macros at the source code level. #132
  • Added g:conjure#client#clojure#nrepl#eval#raw_out which, when toggled on, will strip the ; (out) prefixes from stdout text, allowing you to pprint code or data and work with it immediately in the log. Avoiding the step of stripping the comment prefix.
  • Added auto babashka REPL support for Clojure! When opening a Clojure file without an existing nREPL running, Conjure will start and manage a babashka process for you! You can configure this to start any REPL process, including a regular JVM Clojure one. See :h g:conjure#client#clojure#nrepl#connection#auto_repl#cmd for more information.
  • Fix extracting the namespace name from some comment heavy namespace forms. #207
  • Merged #208 which added help tags to ALL of the help text files! So now you'll notice I can reference :help ... and a specific configuration option to link you right to it!
  • Fixed evaluating forms with an escaped closing parenthesis hidden inside them. #209
  • Fixed some of the Clojure actions such as displaying the previous error with the Neovim 0.5 eval highlight feature enabled.

I think that's all for now! There's many smaller commits that aren't very interesting that I left out, but these are hopefully all the things you may find interesting 😄

Have a great day! I'll continue to work on Aniseed's improved module system and Magic Kit, until then, have a great day!

— Ollie ✨

conjure - Lazier module loading and Fennel autocompletion fixes

Published by Olical over 3 years ago

  • Added @ketansrivastav and @Akeboshiwind to the sponsors lists, thank you so much! ❤️
  • Updated Aniseed, made the most of the lazier loading tools and optimisations.
  • Fixed #204, handle more namespace metadata in Clojure.
  • Fixed Aniseed Fennel module completion when using autoloaded modules.
conjure - Docs, Clojure test runners and Aniseed

Published by Olical over 3 years ago

Hey! No huge features, mostly slight performance tweaks and fixes since I'm mostly working on magic-kit, the Conjure + Aniseed starter kit for Neovim 😄 it's for new people and experienced users alike, hope to share it soon!

  • Add a about vimscript booleans
  • Add documentation for the highlight eval feature
  • Add overrides for Clojure test runner config, mostly adding for the kaocha integration
  • Fixed test running for figwheel / piggieback evals
  • Update Aniseed, includes Fennel 0.9.1 and Aniseed's new "autoload" concept which replaces "require" with a lazier approach. Also added aniseed.core/str function, like Clojure's.
  • Added direnv + nixos config for those of us working on Conjure using NixOS 😄 it pulls in more REPLs for you to test with (only relevant to contributors really)
conjure - Highlight eval, kaocha testing and various fixes!

Published by Olical over 3 years ago

Hello everyone! I hope you're all having a good week, I'm on a two week break from work and I've accidentally spent a lot of it working on Conjure. Oopsie! That means you all get a new Conjure version though, so yay! Now onto the changes 🎉

  • Merge #193 - adds optional highlighting of evaluated forms, requires Neovim 0.5+ (nightly builds) and the option enabled, check out :h conjure for information on this if you're interested. It works really well! Thank you for submitting it @taw10!
  • Fixed and documented some configuration options for the stdio clients, should make using different Scheme REPLs easier (#199, #198).
  • Handle long form metadata in deftest forms in Clojure when running the current test #196
  • Created my own fennel.vim syntax fork and linked to it from the docs. It includes a few outstanding PRs against the upstream repo as well as support for Aniseed's module macro symbols. I may include this in Conjure + Aniseed by default in the future so you don't need to worry about Fennel support in your editor.
  • Support kaocha with Clojure's testing mappings for #188! See :h conjure-client-clojure-nrepl and that issue for the setting you need to change. It has the exact same mappings, but it'll run the tests through kaocha instead of clojure.test!
  • Handle stdio REPLs failing to start due to not being installed etc. It'll now tell you what went wrong instead of pretending everything is fine #197.

Have a wonderful weekend, get some rest, you're doing great.

image

conjure - Various Schemes, tree-sittings and fixes

Published by Olical over 3 years ago

Hello! I have a late start at work today so I thought I'd take a little time to release the current bundle of fixes and improvements before I dive into any more. I hope you find these useful!

  • Warning: Renamed CljRunCurrentTests to CljRunCurrentTest, the only breaking change in a long time. I hope this doesn't break things for people but I didn't want to leave it typoed.
  • Fixed #181 by trimming off whitespace from code sent to Guile REPLs.
  • Prevent GitHub's linguist from assuming Conjure is written in Hy, just because there's a big Hy file in the dev directory that I use for testing. Also tried to have it detect Fennel but I doubt that'll work.
  • Added a tree-sitter module to Conjure's internals. Won't work unless you're using Nightly Neovim but may prove useful eventually!
  • Hooked the tree-sitter module up to form extraction, see g:conjure#extract#tree_sitter#enabled for the requirements. So you get to make the most of tree-sitter and bypass all of my paren hunting code if you have a new enough Neovim! This means that we'll maybe be able to add things like Python and Julia #184 support early, but with the caveat of requiring a new Neovim.
  • Merged #175. Added MIT Scheme support! So now we have the racket filetype loading the Racket client and the scheme filetype loading the Scheme client. The Guile socket file client is still there but no longer the default Scheme client since I think MIT is more ubiquitous and the way it's implemented (stdio) is better for "just open a file and eval". It's easy to switch over to the Guile socket file client if you so wish.
  • I couldn't have Racket, MIT Scheme and Guile all ready to go at once due to how much their filetype settings overlap (and even flicker between each other! There's race conditions in the racket filetype startup for example!).
  • Added on-exit hooks to all clients. This is called just before Neovim exits and gives the client some time to tidy up it's things before politely dying. This was mostly in response to #185, if you're experiencing this hanging issue on exit, please open a new issue with as much info as you can! I think it requires a specific setup of OS!
  • Added filtering by extension for filetype / client associations. I'm using this already to limit the Racket client to the racket filetype and file extension (.rkt). Same goes for Scheme being linked to .scm. This is because the racket filetype flickers to the scheme filetype briefly at startup sometimes and we don't want MIT Scheme jumping into your Racket file before being swiftly replaced. You can tweak this config if you so wish or use it yourself to restrict other clients! (see :h conjure)

There were far more commits than features and fixes, I went back and forth on things a fair bit this time. I spent a long time on this one despite the list not being particularly long. Here's hoping the next release will be short and efficient 😄

I can finally deprecate Olical/vim-scheme after about four years of iterating on REPL tooling. It was something that kicked off my obsession with editor <-> REPL interactions and I'm so glad I get to replace it with it's bigger, better descendant project.

I'm really hoping the next release will mostly be bug fixes and improvements to existing clients (especially Clojure! ❤️ my original and only language love). I've done a fair bit of work to broaden the client scope which means more users which means more conversation and help in the community (I hope!).

I've envisioned Conjure as a fulcrum tool in the niche REPL-y language space for a while now (since it went multi-language). I'm hoping I can make the audience broad enough that it begins to take on it's own community momentum, or even (dare I dream it) increase enough sponsorship that I work on it full time here and there. Thank you again to all of my existing sponsors, I think of you when I'm hacking away on a Saturday morning ❤️

Have a great rest of your week everyone!

conjure - Guile, Hy, vim-repeat fixes, better HUD positioning and more!

Published by Olical over 3 years ago

Hello all! A bunch of things in this release! I hope you're having a good weekend so far and this just improves things a little more 🙂

I've also whipped up a YouTube video showing how I work with Conjure, I thought some of you may find that interesting: How I use Conjure and Neovim to interact with Clojure (and more!)

  • Merge #174 - attempting to disable custom readline config that conflicts with various stdio clients, that doesn't seem to do the trick yet, but this is laying groundwork for a good fix soon! Until then, make sure you don't have any special global readline config in your REPL if you want to use it with a Conjure stdio client.
  • Merge #175 - adds support for Hy over stdio! (quickstart)
  • Merge #178 - adds support for Guile over a socket file! (quickstart)
  • Fixed vim-repeat's escaping for certain user mapping setups. Should be safe no matter what your mappings are now. My apologies to anyone this impacted!
  • Support dotted filetypes, so now scheme.guile will match the scheme or guile filetypes. #177
  • Added config and improvements to make HUD positioning far smarter and more flexible. So now you can have the HUD appear at the bottom, taking up the full width, and moving to the top if your cursor is too low on the screen. Hooray! See #176 for initial discussion and example config.
  • Added types to Aniseed Fennel omnicompletion, so now you know what's a function and what's a table. Handy for me while I work on Conjure itself!

I think that's everything! I hope these are useful and make things a tiny bit smoother. Enjoy! Have a great rest of your weekend!

conjure - Fix eval at mark, more vim-repeat!

Published by Olical over 3 years ago

Hey! So I'm reaaaly sorry for breaking "eval at mark" when I introduced vim-repeat support (#171) in the latest version (thanks for pointing it out @arthropodSeven! #172).

This patch fixes that issue and hooks up "eval at mark" to vim-repeat (if you have it installed) correctly. So you can use <prefix>emF or whatever then . to repeat that same mark eval! Handy!

Keep those reports flowing if I break things, I hope it's extremely rare (it seems to be) but I do appreciate reports as and when I slip up.

conjure - More Clojure config, vim-repeat support, Aniseed updates

Published by Olical over 3 years ago

Hello parenthesis conjurers! I hope you're having a good weekend and this version finds you well!

  • Merged #169 which added g:conjure#client#clojure#nrepl#test#current_form_names, allowing you to customise what symbols identify a form as a "test" for running the test under the cursor. This allows you to support other testing tools and macros in Clojure land. Thanks, @mracos!
  • Updated Aniseed to v3.15.0, adding more fixes and improvements.
  • Added support for tpope/vim-repeat as requested in #171 by @dharrigan, thanks! So now you can use . (with repeat installed) to repeat any Conjure action. There are probably still some small parts of Conjure which don't hook in perfectly yet, but I'll patch those up over time, 99% are hooked in 😄

Enjoy! Have a great rest of your Sunday!

conjure - Eval into comments, more tools for remote REPLs, fixes and updates!

Published by Olical over 3 years ago

A few things in this update! I hope you enjoy and find them useful! And hopefully I've fixed some bugs you didn't know existed, but will now never encounter 🎉

  • Add a failsafe for when newlines sneak through into the log without being split into new lines, so actual raw newline characters (which I should catch and split into multiple lines in the nvim buf) can never break Conjure. You'll see them as if they ever sneak past. If you see one, please let me know how you did it!
  • Use keepalt when opening log windows, fixes #163, so you can use C-^ to hop between your buffers without Conjure's log getting in the way.
  • Add path-subs config (see :h conjure) which fixes #164 and allows you to substitute parts of your paths using Lua patterns, which allows you to go to definition or eval files in remote REPLs on other machines or in Docker containers a little easier. This is a tool to be used alongside the relative root config that already exists.
  • Added eval comment mappings to eval the current form, root form or word under your cursor and insert the result as a comment after the current form. Fixes #160. So now you can insert results into your file easily as examples that you can commit and share! Defaults to <prefix>ece/ecr/ecw.
  • Merge #167 which documents a weird interaction with the Fennel over stdio client and interesting readline configuration. Hopefully I'll have a better solution for weird readline config in the future! Maybe disabling readline for stdio REPLs through environment variables?
  • Update Fennel and Aniseed, just newer compiler version really.

And that's all for this one! I hope you enjoy! It's a slightly (by one day) belated birthday present from me to you 😄

conjure - Aniseed updates + autocompletion and various bug fixes

Published by Olical almost 4 years ago

Hello everyone! I hope your 2021 is off to a great start! Hopefully these changes bring further joy to the way you work and interact with your projects 😄

  • Updated Fennel + Aniseed
  • Fixed #159, hopefully for good! Although there's still some issues with Conjure + packer that are fixable https://github.com/Olical/conjure/issues/159#issuecomment-757384128
  • Fixed #161, parsing out the correct symbol when testing the Clojure test under the cursor.
  • Added completion to Aniseed based Fennel development! So if you develop a plugin with Conjure and Aniseed you'll get completion of local defs, requireable modules, table keys and more! This integrates with omnicompletion by default and any other Conjure autocompletion out of the box, just like Clojure autocompletion. (deoplete support is built into Conjure but there's also things like coc-conjure)

asciicast

  • Synced the sponsors file, which is sadly shrinking 😭 (it's not a huge deal, I'm fine, but I'm MASSIVELY appreciative of people who sponsor me, you're bloody amazing and thank you so much. Nobody needs to sponsor me, but I love the fact that some of you do ❤️)
  • Exposed the nREPL connection internal state through the conn table, as requested by wubbalubbadubdub on Discord. So you can access things like Clojure nREPL message tables in flight with the following code now.
(module foo
  {require {s conjure.client.clojure.nrepl.state}})

(s.get :conn :state :msgs)

Not the largest update, but hopefully a welcome one! A few things fixed, a few things added, hopefully absolutely nothing broken 😄 enjoy!

Have a great weekend 🎉

conjure - Better client/filetype config and inline virtual text eval results

Published by Olical almost 4 years ago

Hello everyone! I hope you had a great Christmas (if you celebrate it) and have a wonderful New Year ahead of you (if you celebrate it). Regardless, I hope you're having a good week 😊

  • Merged #149 - improve the marked-form eval so you can provide the mark name as an argument. Thanks, @giodamelio!
  • Refactored how filetype to client configuration works #148, if you had config to disable clients or remap certain filetypes to different clients you'll have to update your config. It now looks like the following:
" This list configures which filetypes work with Conjure, by default it's all of the default clients.
" If you only use one client and you want to disable the rest, set this list to only contain the filetype you care about.
let g:conjure#filetypes = ["clojure", "janet"]

" And this is how you override a client to use a different one for a filetype.
let g:conjure#filetype#fennel = "conjure.client.fennel.stdio"

" See the text on this in :help conjure for more info!
  • Modified the school slightly to include a better warning message when you're missing fennel filetype support and removed the help example from the end since it won't work unless you have Conjure installed. This is because the helptags aren't generated in the school yet, I didn't think it was very useful anyway.
  • Added named nvim commands for every mapping #153, so you can list, filter and execute every Conjure action using whatever command listing plugin you have installed. You can also call these things from your own vim or lua functions.
  • Added inline eval results as virtual text! #112 there's more to do in #158 for the next release to make it smarter, but it's a good start I hope. Let me know what you think!
  • Renamed master -> main, just in case any of you were explicitly referencing the master branch for some reason.

And that's all for today! Have a good day! You're great and I appreciate you!

image

conjure - Fennel stdio, Racket fixes, features, updates!

Published by Olical almost 4 years ago

Hello everyone! Happy Holidays! I've been sitting on these commits for a while so I thought I'd release it before I started experimenting with things like virtual text 👀

  • Strip #lang from Racket evals, it doesn't work in Racket REPLs, only files.
  • Updated Aniseed+Fennel which recompiled all of the Lua.
  • Fixed some documentation formatting.
  • Added @BerkleyTrue to the sponsors list! ❤️
  • Added more Racket documentation around configuring the command used to launch the REPL.
  • Fixed #143 where regular expressions containing parens confused Conjure's paren hunting.
  • Added the ability to totally switch off a client for a specific file type.
  • Added mappings to reset the log contents for #144
  • Added custom autocmds that Conjure emits when certain things happen (see the help text), so now you can trigger things post eval etc. Conjure has event hooks! #131
  • Added support for Fennel evaluations over stdio without Aniseed, so you can evaluate in a pure Fennel + Lua REPL! Start a Fennel REPL in your favorite Lua environment and voilla, interactive lispy Lua! (Fennel over stdio quickstart guide)

I hope you all have a great break from work, stay safe, remember to call your family and loved ones even if you can't physically be with them.

conjure - Update Aniseed, fix Neovim 0.5 support and more completion sources

Published by Olical almost 4 years ago

Hey everyone! A relatively small update because it fixes some issues users were encountering when using Conjure on Neovim 0.5 / nightly versions.

  • Update Aniseed to v3.11.0. This brings Fennel up to v0.7.0 too.
  • Merge #127, add some information about the compe-nvim Conjure completion source.

Until next time! I'm continuing to focus on stability and hidden improvements more than features, maybe that focus will shift some day soon, but I think focussing on careful small improvements is great for the longevity of the tool.

The main difference here is that Aniseed macros are now found from the correct root directory. So it's truly relative to your source dir now, not the dir above your source.

So if you were using macros and they suddenly stopped working, it's because I fixed a thing that was subtly wrong, you can probably just move your macros into the fnl directory and adjust your require-macros calls to be relative to that fnl directory accordingly.

conjure - What's that Racket?

Published by Olical almost 4 years ago

Hello Conjurers! I hope you've had a great weekend so far and that this release makes it ever so slightly better.

I've finally started to fulfill the promise of Conjure's language agnostic magic by adding another language as well as a huge amount of plumbing that will make it easier to add others.

image

Racket enters the fray! (quickstart wiki page)

We have Racket support! Think of it as in beta but released right now, so you can go ahead and use it but I may have to adjust it a fair bit as I get feedback from people who actually use Racket. I've made a best guess at an MVP and how you need it to behave, but I'd love to hear if it's not enough and what you'd need to make it a great replacement for whatever you currently use to interact with Racket.

asciicast

I've also refactored all of the nREPL code for the Clojure support out into a reusable module, so now we can implement clients on top of netrepl (Janet only really), nREPL (Clojure) and stdio (Racket) much faster than before. So much code reuse!

I did try to implement the Racket support over nREPL with Ogion but I encountered a few issues and didn't have access to xrepl which is basically essential.

By starting a Racket REPL as a sub-process of Neovim we get full access to xrepl which is fantastic. This has allowed me to make the Conjure support just magic enough that you can just open Racket files and start evaluating forms in their given context. The Racket REPL tooling is pretty great!

I've also hooked up K to documentation lookup, <prefix>ef to reload the module / file and autocompletion based on the syntax of Racket. It's not full completion right now, but it's a lot better than nothing.

I hope you enjoy! Please do let me know what you think in the Discord (which now has a #racket channel!), I can't wait to hear your feedback!

conjure - Correct docs, fix client filetype config and close the HUD on quit

Published by Olical about 4 years ago

Hello! Thanks for checking in! Another week, another Conjure release 😄

  • Correct go to def mapping documentation.
  • Allow setting g:conjure#filetype_client before Conjure loads, you can now actually override Conjure's defaults and set your own filetype to client module mappings. This wasn't working correctly before so it wasn't allowing you to specify that you'd like to evaluate Clojure in markdown files, for example. This now works!
  • Attempted to address #121 (interplay between large output and folding), not 100% fixed although I did fix a very nearby bug by accident. All of this is kind of hard to hit so you probably won't ever notice, but I thought I'd bring it to your attention. See that thread for the interesting nREPL shenanigans that I've encountered while investigating it.
  • Add print_buffer_size nREPL configuration. See the Clojure + nREPL help for more information on that one.
  • Updated Aniseed to v3.9.0.
  • Close the HUD with the QuitPre autocmd, this should prevent the weird issue where trying to close the last window in a tab (thus, closing the tab) was prevented by the HUD being open. Now the HUD will close when you try to close other windows, which I think is okay behaviour.

That's all for now! Have a great rest of your weekend! Have a Corg for following along with release notes 🐶

image

conjure -

Published by Olical about 4 years ago

Hello everyone! I'm back! I had a bit of a slow period on Conjure and Aniseed but I thought I'd finally get this release out and get back to faster / smaller releases again. I hope you enjoy!

  • Updated to Aniseed v3.8.0.
  • Refactored Janet support, netrepl is now it's own reusable module inside Conjure. The same will be done for Clojure and nREPL soon!
  • Turn off with_context by default for Clojure completion. It didn't add much but required a LOT of CPU in some circumstances. Yet another thing for the eventual tree-sitter golden hammer!
  • Improve log result folding, you can now configure the marker.
  • More sponsors in the sponsor list! @jkrasnay! <3
  • Wrap completion results consistently, fixes completion with some completion plugins. #118
  • Ensure we're in Neovim >0.4 before attempting to load. #114

A lot of the improvements and fixes ended up being in Aniseed but there's still a sizeable amount here. Now I can move onto my next todo items knowing that these improvements aren't sitting hidden away on the develop branch any more!

And with that, I'm off to cook dinner. Enjoy your weekends everyone!

image