Home

Awesome

CI Status

INTRODUCTION

Moonicipal is a task runner that focuses on personal tasks that are easy to write and to change:

Moonicipal is the successor to the Pythonic test runner Omnipytent. Since Moonicipal is written in Lua and executes tasks that are written in Lua, it allows for better integration with Neovim and with Lua plugins and for simpler semantics of asynchronous tasks.

For a more through explanation, please refer to this blog post: https://dev.to/idanarye/moonicipal-explained-4h02

asciicast

FEATURES (IMPLEMENTED/PLANNED)

SETUP

Install Moonicipal with your plugin manager of choice, and add this to your init.lua:

require'moonicipal'.setup {
    file_prefix = '.my-username',
}

file_prefix is optional - if left unset, Moonicipal will set it using the username form the OS. See :help MoonicipalSettings for more setup options.

QUICK START

In a project, run :MCedit build which will open a new tasks file that looks like this:

local moonicipal = require'moonicipal'
local T = moonicipal.tasks_file()

function T:build()
    |
end

Where | is the location of the cursor in insert mode. Write your task - for example, let's use vim.cmd to run Vim's :make command:

local moonicipal = require'moonicipal'
local T = moonicipal.tasks_file()

function T:build()
    vim.cmd.make()
end

Save the tasks file, and run :MC build. Alternatively, run :MC and pick build using Neovim's selection UI. This will run your task.

Use :MCedit again (with or without parameter) to go back to the task file and edit it whenever you want.

SUPPLEMENTAL PLUGINS

Moonicipal tasks, being Lua functions that run in Neovim's context, can use any Neovim plugin with ease. There are, however, some supplemental plugins that do not depend on it but were created in order to run inside Moonicipal tasks. The can be used separately but will probably not be as useful without Moonicipal.

CONTRIBUTION GUIDELINES