wezterm.nvim
June 1, 2024 ยท View on GitHub
Utilities for interacting with the wezterm cli through Lua/neovim. Spawn tasks and switch tabs/panes, all from within Neovim.
Demo
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.