SkillAgentSearch skills...

Taskfile.nvim

Run Taskfile tasks inside Neovim with floating terminals, previews, and simple keymaps.

Install / Use

/learn @dasvh/Taskfile.nvim
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

taskfile.nvim

GitHub Workflow Status Lua

A simple plugin for taskfiles

Features

  • Run a specific task directly within Neovim
  • Browse available tasks with a floating window or Telescope
  • Preview each task’s command before execution
  • Run tasks in a floating terminal
  • Automatically scroll to bottom of output (optional)
  • Rerun last task via command or key-map
  • Flexible layouts:
    • Horizontal: task list and preview side-by-side
    • Vertical: task list stacked above preview
  • Configurable width_ratio / height_ratio or automatic sizing to neatly fit task names and descriptions
  • Toggle between horizontal and vertical layouts at runtime

Requirements

  • task CLI installed and in your $PATH
  • Neovim 0.8 or higher (0.9+ recommended)
  • telescope.nvim (optional, only if using picker = "telescope")

Setup

{
  "dasvh/taskfile.nvim",
  config = function()
    require("taskfile").setup()
  end,
}

Configuration

You can pass options to the setup() function to customise behaviour. All fields are optional and shown below with their default values:

require('taskfile').setup({
  picker = "native",     -- Selection UI: 'native' (default) or 'telescope'
  layout = "horizontal", -- Layout: 'h', 'horiz', 'horizontal' or 'v', 'vert', 'vertical'.
                         -- For 'horizontal' layout, list and preview are side-by-side.
                         -- For 'vertical', list is above preview (vertically stacked).
  windows = {
    output = {           -- Task output window
      width = 0.8,       -- Width of the window (percentage of editor width)
      height = 0.8,      -- Height of window (percentage of editor height)
      border = "rounded" -- Border style: 'single', 'double', 'rounded', etc.
    },
    list = {             -- Task list and preview window
      width = 0.6,
      height = 0.4,
      border = "rounded",
      -- only used for horizontal layout
      width_ratio = 0,   -- Ratio (0–1) of list vs preview width.
                         -- If set, determines how much space is given to the list.
                         -- If unset or 0, the list width is calculated to fit
                         -- longest task name and description without wrapping.
      -- only used for vertical layout
      height_ratio = 0,  -- Ratio (0–1) of list vs preview height.
                         -- If set, determines how much space is given to the list.
                         -- If unset or 0, the list height is calculated to fit
                         -- the rendered task lines (name + description),
                         -- wrapping as needed, without overflow.
    },
  },
  scroll = {
    auto = true,         -- Auto-scroll output to bottom when new lines are printed
  },
  keymaps = {
    rerun = "<leader>tr" -- Key-map to rerun the last executed task
  },
})

Usage

This plugin reads your Taskfile and displays available tasks.

Commands

  • :Task <task_name>: Run a specific task by name
  • :Task: Show a floating task selector with preview
  • :TaskRerun: Rerun the last executed task
  • :TaskToggleLayout: Toggles the layout for the current Neovim session. On restart, it resets to your configured default.

You can also bind a key to rerun using the keymaps.rerun config.

<!-- panvimdoc-ignore-start -->

Demo

Demo with Native (default) Picker GIF Demo with Native Picker GIF

Demo with Telescope Picker GIF Demo with Telescope Picker GIF

<!-- panvimdoc-ignore-end -->
View on GitHub
GitHub Stars8
CategoryDevelopment
Updated7d ago
Forks0

Languages

Lua

Security Score

90/100

Audited on Mar 29, 2026

No findings