Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/EthanJWright/vs-tasks.nvim
A telescope plugin that runs tasks similar to VS Code's task implementation.
https://github.com/EthanJWright/vs-tasks.nvim
Last synced: 14 days ago
JSON representation
A telescope plugin that runs tasks similar to VS Code's task implementation.
- Host: GitHub
- URL: https://github.com/EthanJWright/vs-tasks.nvim
- Owner: EthanJWright
- Created: 2021-08-06T02:35:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-31T18:05:37.000Z (9 months ago)
- Last Synced: 2024-07-31T20:51:14.966Z (3 months ago)
- Language: Lua
- Size: 840 KB
- Stars: 180
- Watchers: 2
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-neovim - EthanJWright/vs-tasks.nvim - Telescope picker for VSCode style tasks. (Code Runner / Quickfix)
README
# VS Tasks
Telescope plugin to load and run tasks in a project that conform to VS Code's [Editor Tasks](https://code.visualstudio.com/docs/editor/tasks)
## Features
- โ Run commands in a terminal!
- split or float the terminal
- source from ./vscode/tasks.json
- source from package.json scripts
- ๐ Run any task as a watched job
- ๐งต Run any task in the background as a job
- ๐ Browse history of completed background jobs
- โ๏ธ edit input variables that will be used for the session
- Use VS Code's [variables](https://code.visualstudio.com/docs/editor/variables-reference) in the command (limited support, see desired features)
- Use VS Code's [launch.json](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations) pattern (limited support)
- โณ Run tasks from your history, sorted by most used## Example
Short Demo
![Short Demo](https://i.imgur.com/sQtRQdO.gif)
## Setup
With Plug:
```vim
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim' " make sure you have telescope installed
Plug 'EthanJWright/vs-tasks.nvim'
```With Packer:
```vim
use {
'EthanJWright/vs-tasks.nvim',
requires = {
'nvim-lua/popup.nvim',
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim'
}
}
```With Lazy:
```lua
{
"EthanJWright/vs-tasks.nvim",
dependencies = {
"nvim-lua/popup.nvim",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
}
```Set up keybindings:
```vim
nnoremap ta :lua require("telescope").extensions.vstask.tasks()
nnoremap ti :lua require("telescope").extensions.vstask.inputs()
nnoremap th :lua require("telescope").extensions.vstask.history()
nnoremap tl :lua require('telescope').extensions.vstask.launch()
nnoremap tj :lua require("telescope").extensions.vstask.jobs()
nnoremap t; :lua require("telescope").extensions.vstask.jobhistory()
```## Usage
### When the task telescope is open
- Enter will open in toggleterm
- Ctrl-v will open in a vertical split terminal
- Ctrl-p will open in a split terminal
- Ctrl-b will run the task as a job in the background
- Ctrl-w will run the task as as a job in the background, and watch the file### When the jobs telescope is open
- Enter will open any output in a temporary buffer
- Ctrl-w will toggle the watch status
- Ctrl-k will kill the job### Autodetect
VS Tasks can auto detect certain scripts from your package, such as npm
scripts.## Configuration
- Configure harpoon use (auto cache terminals based on task)
- Configure toggle term use
- Configure terminal behavior
- Cache json conf sets whether the config will be ran every time. If the cache
is removed, this will also remove cache features such as remembering last
ran command```lua
lua <