mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-13 17:40:25 +00:00
feat(tmux): added configuration option for autoclosing terminals
This commit adds a config option so that if the user wants to close all tmux terminals opened by harpoon on Vim exit, they can.
This commit is contained in:
parent
20590f1512
commit
decdcd6971
@ -157,6 +157,7 @@ M.setup = function(config)
|
||||
["save_on_toggle"] = false,
|
||||
["save_on_change"] = true,
|
||||
["enter_on_sendcmd"] = false,
|
||||
["tmux_autoclose_windows"] = false,
|
||||
},
|
||||
}, expand_dir(
|
||||
c_config
|
||||
|
8
lua/harpoon/tmux.lua
Executable file → Normal file
8
lua/harpoon/tmux.lua
Executable file → Normal file
@ -6,6 +6,14 @@ local utils = require("harpoon.utils")
|
||||
local M = {}
|
||||
local tmux_windows = {}
|
||||
|
||||
if global_config.tmux_autoclose_windows then
|
||||
vim.cmd([[
|
||||
augroup HARPOON_TMUX
|
||||
autocmd!
|
||||
autocmd VimLeave * :lua require('harpoon.tmux').clear_all()
|
||||
]])
|
||||
end
|
||||
|
||||
local function create_terminal()
|
||||
log.trace("tmux: _create_terminal())")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user