Neovim integration for television.
The initial idea behind television was to create something like the popular telescope.nvim plugin, but as a standalone terminal application - keeping telescope's modularity without the Neovim dependency, and benefiting from Rust's performance.
This plugin brings Television back into Neovim through a thin Lua wrapper around the binary. It started as a way to dogfood my own project, but might be of interest to other tv enthusiasts as well. Full circle.
- Neovim >= 0.8.0
- television binary in PATH
-- lazy.nvim
{ "alexpasmantier/tv.nvim" }
-- packer.nvim
use "alexpasmantier/tv.nvim"The integration currently only ports the "files" and "text" channels of television, which are the ones I use the most. More channels may be added in the future.
Default keybindings:
| Keybinding | Action |
|---|---|
| Ctrl+p | Find files |
| Leader+Leader | Search text |
| Leader+t+v | Select channel |
Commands:
:TvFiles- Find files:TvText- Search text:Tv- Select channel
Inside tv:
| Keybinding | Action |
|---|---|
| Enter | Open file(s) in buffers |
| Ctrl+q | Send selections to quickfix list |
Optional setup() for customization:
require("tv").setup({
keybindings = {
files = "<C-p>", -- or false to disable
text = "<leader><leader>",
channels = "<leader>tv", -- channel selector
files_qf = "<C-q>", -- quickfix binding (inside tv)
text_qf = "<C-q>",
},
quickfix = {
auto_open = true, -- auto-open quickfix window
},
window = {
width = 0.8, -- 80% of editor
height = 0.8,
border = "rounded", -- none|single|double|rounded|solid|shadow
title = " tv ",
},
files = {
args = { "--preview-size", "70" },
window = {}, -- override window config for files
},
text = {
args = { "--preview-size", "70" },
window = {}, -- override window config for text
},
})Use <C-q> inside tv to send selections to quickfix:
- Launch tv with files or text search
- Mark files/results in tv
- Press
<C-q>to populate quickfix - Navigate with
:cnext,:cprev, perform actions with:cdo, etc.
MIT