@@ -13,8 +13,12 @@ A simple plugin for [taskfiles](https://taskfile.dev/)
1313- Run tasks in a floating terminal
1414- Automatically scroll to bottom of output (optional)
1515- Rerun last task via command or key-map
16- - Flexible layout with width_ratio or auto-sizing to fit
17- task names and descriptions neatly
16+ - Flexible layouts:
17+ - ** Horizontal** : task list and preview side-by-side
18+ - ** Vertical** : task list stacked above preview
19+ - Configurable ` width_ratio ` / ` height_ratio ` or automatic sizing
20+ to neatly fit task names and descriptions
21+ - Toggle between horizontal and vertical layouts at runtime
1822
1923## Requirements
2024
@@ -39,6 +43,9 @@ All fields are optional and shown below with their default values:
3943
4044``` lua
4145require (' taskfile' ).setup ({
46+ layout = " horizontal" , -- Layout: 'h', 'horiz', 'horizontal' or 'v', 'vert', 'vertical'.
47+ -- For 'horizontal' layout, list and preview are side-by-side.
48+ -- For 'vertical', list is above preview (vertically stacked).
4249 windows = {
4350 output = { -- Task output window
4451 width = 0.8 , -- Width of the window (percentage of editor width)
@@ -48,11 +55,18 @@ require('taskfile').setup({
4855 list = { -- Task list and preview window
4956 width = 0.6 ,
5057 height = 0.4 ,
51- border = " rounded"
58+ border = " rounded" ,
59+ -- only used for horizontal layout
5260 width_ratio = 0 , -- Ratio (0–1) of list vs preview width.
5361 -- If set, determines how much space is given to the list.
5462 -- If unset or 0, the list width is calculated to fit
5563 -- longest task name and description without wrapping.
64+ -- only used for vertical layout
65+ height_ratio = 0 , -- Ratio (0–1) of list vs preview height.
66+ -- If set, determines how much space is given to the list.
67+ -- If unset or 0, the list height is calculated to fit
68+ -- the rendered task lines (name + description),
69+ -- wrapping as needed, without overflow.
5670 },
5771 },
5872 scroll = {
@@ -73,6 +87,8 @@ This plugin reads your Taskfile and displays available tasks.
7387- ` :Task <task_name> ` : Run a specific task by name
7488- ` :Task ` : Show a floating task selector with preview
7589- ` :TaskRerun ` : Rerun the last executed task
90+ - ` :TaskToggleLayout ` : Toggles the layout for the current Neovim session.
91+ On restart, it resets to your configured default.
7692
7793You can also bind a key to rerun using the ` keymaps.rerun ` config.
7894
0 commit comments