Skip to content

Commit 1f483b3

Browse files
committed
docs: update docs
1 parent 9f6a950 commit 1f483b3

File tree

2 files changed

+58
-102
lines changed

2 files changed

+58
-102
lines changed

README.md

Lines changed: 58 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,73 @@
1-
# A Neovim Plugin Template
1+
# taskfile.nvim
22

3-
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ellisonleao/nvim-plugin-template/lint-test.yml?branch=main&style=for-the-badge)
3+
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/dasvh/taskfile.nvim/lint-test.yml?branch=main&style=for-the-badge)
44
![Lua](https://img.shields.io/badge/Made%20with%20Lua-blueviolet.svg?style=for-the-badge&logo=lua)
55

6-
A template repository for Neovim plugins.
6+
A simple plugin for [taskfiles](https://taskfile.dev/)
77

8-
## Using it
8+
## Features
99

10-
Via `gh`:
10+
- Run a specfic task directly within Neovim
11+
- Browse available tasks with a floating window
12+
- Preview each task’s command before execution
13+
- Run tasks in a floating terminal
14+
- Automatically scroll to bottom of output (optional)
15+
- Rerun last task via command or keymap
1116

17+
## Requirements
18+
19+
- [task](https://taskfile.dev/#/installation) CLI installed and in your `$PATH`
20+
- Neovim 0.8 or higher (0.9+ recommended)
21+
22+
## Setup
23+
24+
```lua
25+
{
26+
"dasvh/taskfile.nvim",
27+
config = function()
28+
require("taskfile").setup()
29+
end,
30+
}
1231
```
13-
$ gh repo create my-plugin -p ellisonleao/nvim-plugin-template
32+
33+
### Configuration
34+
35+
You can pass options to the `setup()` function:
36+
37+
```lua
38+
require("taskfile").setup({
39+
float = {
40+
width = 0.7, -- Percentage of screen width for floating windows
41+
height = 0.7, -- Percentage of screen height
42+
border = "single", -- Border style: 'single', 'rounded', etc.
43+
},
44+
scroll = {
45+
auto = true, -- Scroll to bottom of terminal on output
46+
},
47+
keymaps = {
48+
rerun = "<leader>rt", -- Keymap for rerunning last task
49+
},
50+
})
1451
```
1552

16-
Via github web page:
53+
All fields are optional. Defaults are:
1754

18-
Click on `Use this template`
55+
```lua
56+
{
57+
float = { width = 0.8, height = 0.8, border = "rounded" },
58+
scroll = { auto = true },
59+
keymaps = { rerun = "<leader>rt" },
60+
}
61+
```
1962

20-
![](https://docs.github.com/assets/cb-36544/images/help/repository/use-this-template-button.png)
63+
## Usage
2164

22-
## Features and structure
65+
This plugin reads your Taskfile and displays available tasks.
2366

24-
- 100% Lua
25-
- Github actions for:
26-
- running tests using [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) and [busted](https://olivinelabs.com/busted/)
27-
- check for formatting errors (Stylua)
28-
- vimdocs autogeneration from README.md file
29-
- luarocks release (LUAROCKS_API_KEY secret configuration required)
67+
### Commands
3068

31-
### Plugin structure
69+
- `:Task <task_name>`: Run a specific task by name
70+
- `:Task`: Show a floating task selector with preview
71+
- `:TaskRerun`: Rerun the last executed task
3272

33-
```
34-
.
35-
├── lua
36-
│   ├── plugin_name
37-
│   │   └── module.lua
38-
│   └── plugin_name.lua
39-
├── Makefile
40-
├── plugin
41-
│   └── plugin_name.lua
42-
├── README.md
43-
├── tests
44-
│   ├── minimal_init.lua
45-
│   └── plugin_name
46-
│   └── plugin_name_spec.lua
47-
```
73+
You can also bind a key to rerun using the `keymaps.rerun` config.

doc/my-template-docs.txt

Lines changed: 0 additions & 70 deletions
This file was deleted.

0 commit comments

Comments
 (0)