Skip to content
maiobarberoPublic

About

Nvim plugin to interact with AdonisJS Ace CLI

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

ace.nvim

A Neovim plugin that brings AdonisJS Ace commands into Telescope. Browse, preview, and run any Ace command from your editor — with interactive prompts for arguments and flags — without leaving Neovim.

Buy Me A Coffee


Requirements

  • Neovim >= 0.9
  • telescope.nvim
  • Node.js and an AdonisJS project with Ace available (node ace or a local ace.js)

Installation

lazy.nvim

{
  "maiobarbero/ace.nvim",
  dependencies = { "nvim-telescope/telescope.nvim" },
  config = function()
    require("ace").setup()
  end,
}

packer.nvim

use {
  "maiobarbero/ace.nvim",
  requires = { "nvim-telescope/telescope.nvim" },
  config = function()
    require("ace").setup()
  end,
}

Configuration

Call setup() with an optional table to override defaults:

require("ace").setup({
  split     = "tab",   -- how to open the terminal: "tab" | "horizontal" | "vertical" | "current"
  ask_args  = true,    -- prompt for positional arguments before running
  ask_flags = true,    -- prompt for flags before running
  ace_cmd   = nil,     -- custom ace command (e.g. "node ace"); auto-detected when nil
})
Option Default Description
split "tab" Where to open the terminal window.
ask_args true Interactively prompt for each command argument before executing.
ask_flags true Interactively prompt for each flag before executing.
ace_cmd nil Override the Ace binary. When nil, the plugin looks for ace.js in the project root and falls back to node ace.

How it works

  1. Command discovery — when you open the picker, the plugin runs node ace --json (or your configured command) and parses the JSON list of all available Ace commands. Results are cached per working directory so subsequent opens are instant.

  2. Telescope picker — commands are shown in a fuzzy-searchable list. The preview panel displays each command's description, accepted flags (with types and required/optional status), and positional arguments.

  3. Interactive prompts — after selecting a command, the plugin optionally walks you through each argument and flag with inline input prompts. Required fields are labelled; optional fields can be left blank.

  4. Terminal execution — the final command is run in a Neovim terminal buffer opened in the configured split style.


Usage

Via the :Ace command

Open the Telescope picker to browse all commands:

:Ace

Run a specific command directly (skips the picker):

:Ace make:controller UserController

Via Lua

require("ace").show_ace_commands()

Suggested keybinding

vim.keymap.set("n", "<leader>ac", "<cmd>Ace<cr>", { desc = "Ace commands" })

Clear command cache

If you add new Ace commands to your project and want the picker to reflect them:

require("ace").clear_cache()

About

Nvim plugin to interact with AdonisJS Ace CLI

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages