https://github.com/dasvh/taskfile.nvim
Run Taskfile tasks inside Neovim with floating terminals, previews, and simple keymaps.
https://github.com/dasvh/taskfile.nvim
lua nvim nvim-plugin task taskfile
Last synced: 9 months ago
JSON representation
Run Taskfile tasks inside Neovim with floating terminals, previews, and simple keymaps.
- Host: GitHub
- URL: https://github.com/dasvh/taskfile.nvim
- Owner: dasvh
- License: mit
- Created: 2025-05-03T12:17:31.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-05-04T19:44:22.000Z (9 months ago)
- Last Synced: 2025-05-04T20:20:52.829Z (9 months ago)
- Topics: lua, nvim, nvim-plugin, task, taskfile
- Language: Lua
- Homepage: https://github.com/dasvh/taskfile.nvim
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# taskfile.nvim


A simple plugin for [taskfiles](https://taskfile.dev/)
## Features
- Run a specfic 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 keymap
## Requirements
- [task](https://taskfile.dev/#/installation) CLI installed and in your `$PATH`
- Neovim 0.8 or higher (0.9+ recommended)
## Setup
```lua
{
"dasvh/taskfile.nvim",
config = function()
require("taskfile").setup()
end,
}
```
### Configuration
You can pass options to the `setup()` function:
```lua
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"
},
},
scroll = {
auto = true, -- Auto-scroll output to bottom when new lines are printed
},
keymaps = {
rerun = "tr" -- Keymap to rerun the last executed task
},
})
```
All fields are optional. These are the default values:
```lua
{
windows = {
output = {
width = 0.8,
height = 0.8,
border = "rounded",
},
list = {
width = 0.6,
height = 0.4,
border = "rounded",
},
},
scroll = {
auto = true,
},
keymaps = {
rerun = "tr",
},
}
```
## Usage
This plugin reads your Taskfile and displays available tasks.
### Commands
- `:Task `: 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.