Utilities for interacting with the wezterm cli through Lua/neovim. Spawn tasks and switch tabs/panes, all from within Neovim.
Wezterm.nvim.webm
Note: Requires Neovim >= 0.9
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
}
}
For API documentation, see :h wezterm.nvim
or doc/wezterm.nvim.txt
.
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)
Use WeztermSpawn <command> <args>...
to spawn a task in a new WezTerm tab.