willothy/wezterm.nvim

github github
terminal-integration
stars 156
issues 0
subscribers 2
forks 8
CREATED

2023-04-15

UPDATED

20 days ago


wezterm.nvim

Utilities for interacting with the wezterm cli through Lua/neovim. Spawn tasks and switch tabs/panes, all from within Neovim.

Demo

Wezterm.nvim.webm

Installation

Note: Requires Neovim >= 0.10

With folke/lazy.nvim

{
    'willothy/wezterm.nvim',
    config = true
}

If you don't want the WeztermSpawn user command, use

{
    'willothy/wezterm.nvim',
    opts = {
        create_commands = false
    }
}

Usage

For API documentation, see :h wezterm.nvim or doc/wezterm.nvim.txt.

Functions

For keybindings, functions that take a numeric value (index, id, relno, etc.) will check vim.v.count if they aren't passed an index.

For example:

-- Switch tab by index using vim.v.count
vim.keymap.set("n", "<leader>wt", require('wezterm').switch_tab.index)

User command

Use WeztermSpawn <command> <args>... to spawn a task in a new WezTerm tab.