1- *taskfile.nvim.txt* For Neovim >= 0.8.0 Last change: 2025 September 15
1+ *taskfile.nvim.txt* For Neovim >= 0.8.0 Last change: 2025 September 22
22
33==============================================================================
44Table of Contents *taskfile.nvim-table-of-contents*
@@ -26,8 +26,12 @@ FEATURES *taskfile.nvim-taskfile.nvim-features*
2626- Run tasks in a floating terminal
2727- Automatically scroll to bottom of output (optional)
2828- Rerun last task via command or key-map
29- - Flexible layout with width_ratio or auto-sizing to fit
30- task names and descriptions neatly
29+ - Flexible layouts:
30+ - **Horizontal**task list and preview side-by-side
31+ - **Vertical**task list stacked above preview
32+ - Configurable `width_ratio` / `height_ratio` or automatic sizing
33+ to neatly fit task names and descriptions
34+ - Toggle between horizontal and vertical layouts at runtime
3135
3236
3337REQUIREMENTS *taskfile.nvim-taskfile.nvim-requirements*
@@ -55,6 +59,9 @@ fields are optional and shown below with their default values:
5559
5660>lua
5761 require('taskfile' ).setup({
62+ layout = "horizontal", -- Layout: 'h', 'horiz' , 'horizontal' or 'v', 'vert' , 'vertical' .
63+ -- For 'horizontal' layout, list and preview are side-by-side.
64+ -- For 'vertical' , list is above preview (vertically stacked).
5865 windows = {
5966 output = { -- Task output window
6067 width = 0.8, -- Width of the window (percentage of editor width)
@@ -64,11 +71,18 @@ fields are optional and shown below with their default values:
6471 list = { -- Task list and preview window
6572 width = 0.6,
6673 height = 0.4,
67- border = "rounded"
74+ border = "rounded",
75+ -- only used for horizontal layout
6876 width_ratio = 0, -- Ratio (0–1) of list vs preview width.
6977 -- If set, determines how much space is given to the list.
7078 -- If unset or 0, the list width is calculated to fit
7179 -- longest task name and description without wrapping.
80+ -- only used for vertical layout
81+ height_ratio = 0, -- Ratio (0–1) of list vs preview height.
82+ -- If set, determines how much space is given to the list.
83+ -- If unset or 0, the list height is calculated to fit
84+ -- the rendered task lines (name + description),
85+ -- wrapping as needed, without overflow.
7286 },
7387 },
7488 scroll = {
@@ -91,6 +105,8 @@ COMMANDS ~
91105- `:Task <task_name> `Run a specific task by name
92106- `:Task` Show a floating task selector with preview
93107- `:TaskRerun` Rerun the last executed task
108+ - `:TaskToggleLayout` Toggles the layout for the current Neovim session.
109+ On restart, it resets to your configured default.
94110
95111You can also bind a key to rerun using the `keymaps.rerun` config.
96112
0 commit comments