Giter Club home page Giter Club logo

aniseed's Introduction

Aniseed Discord

Aniseed bridges the gap between Fennel (a Lisp that compiles to Lua) and Neovim. Allowing you to easily write plugins or configuration in a Clojure-like Lisp with great runtime performance.

asciicast

Further documentation can be found in :help aniseed. There you can learn about the scripts, macros, functions and use cases of Aniseed.

Installation

Use your favourite plugin manager, I recommend vim-plug if you don’t have one already.

Plug 'Olical/aniseed', { 'tag': 'v3.18.0' }

For interactive evaluation you need to install Conjure. It’ll allow you to send portions of your code off for evaluation as well as see the results in an interactive log buffer.

You may also be interested in nvim-local-fennel which is essentially a Fennel based version of localvimrc.

Loading Fennel Neovim configuration

Aniseed has a module called aniseed.env which will automatically compile and load Fennel code from your Neovim configuration directory as if it were natively supported by the editor, like Lua and VimL.

See Olical/dotfiles for a detailed example configuration. To enable this same automatic loading of your Fennel configuration you need to install Aniseed and add the following option. This is documented further within :help aniseed.

let g:aniseed#env = v:true

Now the following code in ~/.config/nvim/fnl/init.fnl will be compiled and executed when you open Neovim.

;; The name is up to you.
(module nvim-config
  {autoload {a aniseed.core}})

(a.println "Hello, World!")

Setting up a plugin project

scripts/seed.sh is provided to make it a little easier to get a plugin up and running. In a new directory (because it will overwrite your .gitignore and Makefile etc) run the following command.

It will name the plugin after the directory you’re currently running it from. Make sure the directory name doesn’t include any spaces or special characters because it will be inserted at some points in the seed code for you.

curl -fL https://raw.githubusercontent.com/Olical/aniseed/master/scripts/seed.sh | sh

This will create some example Fennel source and tests as well as a Makefile to help you compile and run it all. This should be enough to get you started without being overly opinionated.

Unlicenced

The following files are excluded from my license and ownership:

  • lua/aniseed/deps/fennel.lua

  • lua/aniseed/deps/fennelview.lua

  • lua/aniseed/deps/nvim.lua

These files come from Fennel and nvim.lua, I did not write them, all other files are from me and unlicenced. The aforementioned files should be considered under their respective project licences. They are copied into this repo to allow the plugin to work with systems that don’t support symlinks correctly.

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.

aniseed's People

Contributors

berkeleytrue avatar davidwilemski avatar mhanberg avatar olical avatar semperos avatar sotte avatar tami5 avatar tssm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.