feat: better integration between wezterm & neovim for term history
This commit is contained in:
parent
4f4666a551
commit
55615756c3
13
dots/.config/nvim/after/ftplugin/termhistory.lua
Normal file
13
dots/.config/nvim/after/ftplugin/termhistory.lua
Normal file
@ -0,0 +1,13 @@
|
||||
vim.opt_local.number = false
|
||||
vim.opt_local.relativenumber = false
|
||||
vim.keymap.set("n", "q", "<cmd>quit!<CR>", {
|
||||
buffer = true,
|
||||
remap = true,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "i", function()
|
||||
vim.notify("Insert mode disabled in termhistory")
|
||||
end, {
|
||||
buffer = true,
|
||||
remap = true,
|
||||
})
|
@ -8,7 +8,7 @@ wezterm.on("trigger-nvim-with-scrollback", function(window, pane)
|
||||
f:write(scrollback)
|
||||
f:flush()
|
||||
f:close()
|
||||
window:perform_action(wezterm.action({ SpawnCommandInNewTab = { args = { "nvim", name } } }), pane)
|
||||
window:perform_action(wezterm.action({ SpawnCommandInNewTab = { args = { "nvim", name, "+$", "-R" , "+set filetype=termhistory"} } }), pane)
|
||||
|
||||
wezterm.sleep_ms(1000)
|
||||
os.remove(name)
|
||||
|
Loading…
Reference in New Issue
Block a user