theHamsta / conjure

Interactive evaluation for Neovim (Clojure, Fennel, Janet)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conjure Gitter Slack

Conversational software development for Neovim

Conjure is an interactive environment for evaluating code and inspecting your program.

The core features of Conjure are language agnostic (although it’s targeted at Lisps for now), with each language client providing their own extra tools. Here’s the language support so far, unchecked items are planned for the future.

User experience

What does wielding Conjure actually look like? What can you do with it?

asciicast

I’ll break that asciinema down for you, just in case it was too quick or you couldn’t watch it.

  • Once installed, open a file of a supported file type such as clojure or fennel.

  • Some languages, such as Clojure, will automatically connect to a runtime environment or give you the commands and mappings to do so yourself.

  • Then write or navigate to whatever code you want, as you normally would.

  • When you want to run any part of your file (or the whole thing!), invoke Conjure’s various evaluation mappings, such as:

    • Whole file

    • Word or symbol under cursor

    • Form under cursor (a form is just a block of code in matching parenthesis)

    • Root form (similar, but the outermost pair of parenthesis)

    • Form at mark (set a normal Neovim mark anywhere in your project, evaluate that form from anywhere)

    • Visual selection

    • Motion

  • Every result is kept in a log buffer that you can access at any time.

    • The log is a regular buffer you can edit and add more runnable code to.

    • When you don’t have the log open in the foreground, results are briefly displayed in the heads up display (HUD).

  • You can look up documentation with K or go to definition with gd.

  • Support for multiple asynchronous autocompletion frameworks, with deoplete built in.

    • Or use Neovim’s native <C-x><C-o> which is hooked up out of the box.

Conjure allows you to send the right part of your code off for evaluation, see the results, wrap the results in more code and evaluate that. It keeps a log of your actions and results so you don’t have to remember them, that context is extremely helpful when you’re down the rabbit hole of a bug hunt.

The goal is to give you a tool that lets you effortlessly run whatever you need to while keeping out of your way (but there with context and more information if you need it).

Try without installing

You can trial run Conjure with the interactive :ConjureSchool tutorial without actually installing it! The only prerequisites are curl and an up to date nvim.

curl -fL https://raw.githubusercontent.com/Olical/conjure/master/scripts/school.sh | bash

This will temporarily download the plugin, launch Neovim with :ConjureSchool running and then clean up after itself. You get to try out what Conjure has to offer without having to edit your Neovim configuration.

Installation

Use your favourite plugin manager, mine is vim-plug but any will do. Be sure to pin it to a tag and subscribe to releases through GitHub to avoid any surprises in the future.

Plug 'Olical/conjure', {'tag': 'v3.4.0'}

You’ll need to be on the latest stable Neovim for all of the features (such as floating windows) to work. If you see errors, please check your Neovim version before raising an issue.

Getting started

All further documentation is found within :help conjure. You can also use :ConjureSchool to get an interactive introduction to the workflow and mappings Conjure provides.

Please do get in touch via Slack (#conjure), Gitter or Twitter (@OliverCaldwell) if you have any questions or issues.

Broader documentation can be found in the Conjure wiki, there you’ll find blog posts and guides that will help you get common workflows up and running. Contributions are encouraged!

Behind the curtain

Conjure is written entirely in Lua (no VimL or external processes!) which is compiled from Fennel by Aniseed ahead of time. Check out CONTRIBUTING.adoc for more on how to work on Conjure using itself.

Historically, Conjure was Clojure specific with an entirely different implementation, you can still find that version on the legacy-jvm branch.

Unlicenced

Find the full unlicense in the UNLICENSE file, but here’s a snippet.

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

About

Interactive evaluation for Neovim (Clojure, Fennel, Janet)

License:The Unlicense


Languages

Language:Clojure 50.5%Language:Shell 25.8%Language:Python 12.4%Language:Makefile 6.3%Language:HTML 3.8%Language:Vim Script 1.1%