Skip to content

dasvh/taskfile.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  • 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 layout with width_ratio or auto-sizing to fit task names and descriptions neatly

Requirements

  • task CLI installed and in your $PATH
  • Neovim 0.8 or higher (0.9+ recommended)

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({
  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"
      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.
    },
  },
  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

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

Demo

Demo GIF

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •