Skip to content

alexpasmantier/tv.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📺 tv.nvim

Static Badge GitHub last commit GitHub License

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.

asciicast

🗒️ Requirements

📦 Installation

-- lazy.nvim
{ "alexpasmantier/tv.nvim" }

-- packer.nvim
use "alexpasmantier/tv.nvim"

🖥️ Usage

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

⚙️ Configuration

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
  },
})

Quickfix Workflow

Use <C-q> inside tv to send selections to quickfix:

  1. Launch tv with files or text search
  2. Mark files/results in tv
  3. Press <C-q> to populate quickfix
  4. Navigate with :cnext, :cprev, perform actions with :cdo, etc.

License

MIT