-
-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(terminal-integration): finish
toggleterm-manager-nvim
spec
- Loading branch information
Showing
3 changed files
with
40 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
lua/astrocommunity/terminal-integration/toggleterm-manager-nvim/init.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
return { | ||
"ryanmsnyder/toggleterm-manager.nvim", | ||
init = function(plugin) require("astrocore").on_load("telescope.nvim", plugin.name) end, | ||
dependencies = { | ||
"akinsho/toggleterm.nvim", | ||
"nvim-telescope/telescope.nvim", | ||
"nvim-lua/plenary.nvim", | ||
{ | ||
"AstroNvim/astrocore", | ||
opts = { | ||
mappings = { | ||
n = { | ||
["<Leader>ts"] = { "<cmd>Telescope toggleterm_manager<cr>", desc = "Search Toggleterms" }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
opts = function(_, opts) | ||
local term_icon = require("astroui").get_icon "Terminal" | ||
local toggleterm_manager = require "toggleterm-manager" | ||
local actions = toggleterm_manager.actions | ||
|
||
return require("astrocore").extend_tbl(opts, { | ||
titles = { prompt = term_icon .. " Terminals" }, | ||
results = { term_icon = term_icon }, | ||
mappings = { | ||
n = { | ||
["<CR>"] = { action = actions.toggle_term, exit_on_action = true }, -- toggles terminal open/closed | ||
["r"] = { action = actions.rename_term, exit_on_action = false }, -- provides a prompt to rename a terminal | ||
["d"] = { action = actions.delete_term, exit_on_action = false }, -- deletes a terminal buffer | ||
["n"] = { action = actions.create_term, exit_on_action = false }, -- creates a new terminal buffer | ||
}, | ||
}, | ||
}) | ||
end, | ||
} |
This file was deleted.
Oops, something went wrong.