Skip to content
Discussion options

You must be logged in to vote

Hi, you may have already found a way to do that, what I did to “delete” them, was simply rewriting the keymaps with the option hidde = true, and rewriting them each time I recreated them.

local function delete_terminals()
      local terminals = terminalFunctions.get_all(true)
      for _, t in ipairs(terminals) do
        pcall(function()
          t:shutdown()
        end)
        vim.keymap.del("n", "<leader>t" .. t.id)
        whichkey.add({ "<leader>t" .. t.id, hidden = true })  -- Hidde All The Terminals i created
      end
    end
local function update_terminals()
      local terminals = terminalFunctions.get_all(true)
      local keymaps = {}

      for _, t in ipairs(terminals) do

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Muizzyranking
Comment options

Answer selected by Muizzyranking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants