summaryrefslogtreecommitdiff
path: root/home/common/modules/neovim/config/lua/pacman/plugins/toggleterm.lua
blob: e47af46ccc3eecc5c892bb9b867aa11e34090fdb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
return {
  {
    "akinsho/toggleterm.nvim",
    event = "VeryLazy",
    opts = {
      direction = "float",
      open_mapping = [[<c-\>]],
      on_create = function(term)
        local session_name = "_nvim_toggleterm_" .. vim.fn.getcwd() .. "_$(date +%s%4N)"
        term:send("exec tmux new-session -A -s " .. session_name)
        term:send("tmux set-option destroy-unattached")
        term:clear()
      end,
    },
  }
}
-- vim: ts=2 sts=2 sw=2 et