Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openplan.nvim

openplan.nvim is a thin Neovim UX for the openplan CLI.

It keeps plan creation, listing, repository discovery, and ID allocation in the CLI, while giving Neovim a native browse-and-open workflow through a single Snacks picker.

Requirements

Installation

{
  "jmmarotta/openplan.nvim",
  dependencies = {
    {
      "folke/snacks.nvim",
      opts = {
        picker = { enabled = true },
      },
    },
  },
  opts = {},
}

If openplan is not on $PATH, point the plugin at a custom command:

require("openplan").setup({
  openplan_cmd = { "/path/to/openplan" },
})

Commands

  • :OpenPlan: open the main plan browser
  • :OpenPlanNew [title]: create a new plan and open it in the current session

Picker UX

:OpenPlan loads plans with openplan list --all --json, then filters them locally inside the picker.

  • Default scope: Open (inbox, plan, active)
  • picker title shows the current scope and a normal-mode scope hint
  • f in normal mode: open the scope menu
  • Enter: open the selected plan
  • Snacks split and tab actions continue to work on the selected plan file

Preview uses the actual markdown file path returned by the CLI.

Creation Flow

:OpenPlanNew uses openplan new --no-edit --json and opens the returned file path in the current Neovim session.

That keeps editor control inside Neovim instead of delegating to $EDITOR.

Testing

The repo includes mini.test-based tests for config, status filtering, picker scope refresh, command registration, and the :OpenPlanNew create flow.

For local development, install luacheck and lefthook, then install the git hooks:

brew install luacheck lefthook
lefthook install

make test and the pre-commit hook expect a compatible openplan binary on $PATH. If you need to point at a specific build, override OPENPLAN_CMD.

Run lint and tests with:

make lint
make test OPENPLAN_CMD=/path/to/openplan

Run them with:

make test OPENPLAN_CMD=/path/to/openplan

If you already have mini.nvim elsewhere, point the harness at it instead of cloning into deps/mini.nvim:

make test MINI_NVIM_DIR=/path/to/mini.nvim OPENPLAN_CMD=/path/to/openplan

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages