Skip to content

Releases: Olical/conjure

Janet lang support, update Fennel, better Clojure ns handling

21 May 10:53
800df25
Compare
Choose a tag to compare

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.

  • Add Janet support, let me know what you think, it's the first release of this client!
  • Fix Fennel and Clojure module / namespace patterns, the expression was slightly off.
  • Define Clojure namespaces we haven't seen before when you evaluate. This should avoid the "this namespaces doesn't exist" chicken and egg problem that prevents you from defining a namespace if it's not defined. It was kind of rare so you hopefully haven't encountered it anyway!
  • Improved Clojure namespace parsing, it can now handle all sorts of metadata symbols inside the ns form and still pick out your namespace name correctly. Let me know if you find a ns form it can't parse!
  • Updated Aniseed + Fennel, keeping up with Fennel's 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?

Pretty session lists! 100% more dog and cat references!

18 May 14:37
48b7820
Compare
Choose a tag to compare

Hello friends! Here's another Conjure update fresh out of my combined kitchen and living room!

  • Fixed the expertly reported #91 and #90 (thank you @adz5a and @fonghou!)
  • Deprecated the "session type" mapping and integrated the session type into the session list. (it'll show a warning if you use the old mapping thanks to @martinklepsch's prompt)
    You'll also see the session type every where a session is mentioned, such as when you switch, clone or create a session.
  • Replaced the ugly nREPL session UUIDs with dog and cat breeds. This makes them a lot cuter and human readable!
  • Removed my custom namespace switching code in favour of the :ns key in nREPL messages, should work a lot better!
  • Added the ability to entirely disable a mapping by setting it's config value to nil. If you have a mapping that conflicts with something else and you don't need it you can now get rid of it.
  • Fix test mappings in shadow-cljs that were broken while fixing other things. ClojureScript support whack-a-mole! 🎉

Enjoy! Have a great week!

Update Aniseed+Fennel, more shadow-cljs compatibility

16 May 10:54
be7e997
Compare
Choose a tag to compare

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!

Fixes to the previous large update

13 May 18:06
0a1ff5d
Compare
Choose a tag to compare

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:

  • "load file" is fixed, I accidentally turned it into a no-op while trying to improve it for ClojureScript. It now works as expected and works better in CLJS land.
  • Errors in some very specific setups around reading environment variables should be gone since I'm carefully checking if they're defined now.
  • Merged a PR to fix a typo in the README.

So not very much, but the env var error and lack of load file were glaring issues. Enjoy! 🐶 🎉

Features! Fixes! Magic!

13 May 13:23
17d31a0
Compare
Choose a tag to compare

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.

image

Okay, hold onto your hats, there's a lot to get through!

  • Added "eval and replace form", assigned to <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!
  • All eval results are now copied into a register (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.
  • Improved HUD display logic, it now checks to see if the last line in the buffer is visible in one of the windows. Subtle, but nice.
  • More help file text and improvements.
  • Added an interactive tutorial, start it with :ConjureSchool to learn how to interact with Conjure.
  • Add Clojure commands for subscribing to and unsubscribing from all non-eval thread stdout.
  • Check in ~/.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.
  • Add a script (documented in the readme) that allows you to trial :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.
  • Internal improvements to nREPL message processing, it's more batchy now, shouldn't really see a difference but it should run a little smoother.
  • Prefix Clojure doc lookup with an in-ns call. Bug fix.
  • Add auto-require, so if you open a file that isn't loaded it'll be requried for you! No more trying to eval only to see an error because you forgot to load it. You can turn this off!
  • Better session type detection and printing.
  • Fixed ClojureScript completion entirely, it's great now!

I hope you enjoy this update! 🎉

Rewritten, more languages, nREPL, ClojureScript completion, oh my!

04 May 10:38
248f2eb
Compare
Choose a tag to compare

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:

  • Replaced prepl with nREPL since it has complete ecosystem adoption and brilliant ClojureScript support. You get autocompletion and shadow-cljs works perfectly now!
  • No extra JVM required, just start your program with an nREPL embedded within it, open Neovim, evaluate things immediately. Everything runs within Neovim itself under the embedded LuaJIT.
  • No JVM required to run Conjure, so no bin/compile step to install the plugin!
  • Evaluate more than Clojure, it also supports Fennel with Aniseed. It'll support Racket, Janet and other Lisps in the near future! Eventually it'll allow you to evaluate things that aren't even Lisps!
  • A smarter, smoother, log buffer that works more like a regular terminal you can edit.
  • A heads up display (HUD) that pops up as and when it's required and hides as you continue to work. It's a little floating window that tries to stay out of the way.
  • All of the previous autocompletion tools have been updated to work with the new version, you'll just need to update them 🎉 (unless you use deoplete, that's been updated with Conjure)
  • Eval at mark no longer flickers the screen!
  • Better go to definition with the power of nREPL and CIDER! (even works in CLJS!)
  • Conjure's Clojure support will now benefit from the future developments of nREPL and CIDER.
  • Support for multiple nREPL sessions, so you can hop between your ClojureScript piggiebacked session, your web server and your JVM evaluations.
  • You can interrupt your Clojure evaluations!
  • It works with babashka's nREPL server!

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!)

Completions hook, flush after eval and internal refactoring

02 Dec 13:07
63fc13e
Compare
Choose a tag to compare

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.

Fix evaluating a mark in another buffer

09 Nov 17:12
52618ff
Compare
Choose a tag to compare

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! 😄

Evaluate a form at a mark

07 Nov 12:44
ffa708a
Compare
Choose a tag to compare

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.

asciicast

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.

Hooks, better path filtering, removal of superseded config

13 Oct 13:57
ed91dba
Compare
Choose a tag to compare
  • Added hooks! Check out how to use them in the README, they let you configure things and "hook" Conjure into other tools like REBL. An example can be found in the README's hook section.
  • Breaking: Removed the :refresh config from .conjure.edn, you can now use the :refresh hook to configure the exact same thing.
  • Added :dirs config, an optional Clojure set that limits connections to specific directories. This should come in handy for monorepos etc.
  • Added :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.
  • Added :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.
  • Breaking: Removed the :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?.
  • Tweaked some launch options for Conjure's internal JVM to prevent warnings with JDK 13.

I hope you find these changes useful!

image