feat: added k9s, gh-dash to nvim config

This commit is contained in:
2026-04-10 16:36:47 -04:00
parent 971a263963
commit 93b15391ca

View File

@@ -0,0 +1,43 @@
local function toggle_floating_tui(cmd)
local terminal
return function()
if not terminal then
local Terminal = require("toggleterm.terminal").Terminal
terminal = Terminal:new {
cmd = cmd,
hidden = true,
close_on_exit = true,
direction = "float",
on_open = function() vim.cmd "startinsert!" end,
}
end
terminal:toggle()
end
end
local toggle_k9s = toggle_floating_tui "k9s"
local toggle_ghdash = toggle_floating_tui "gh-dash"
return {
{
"AstroNvim/astrocore",
---@type AstroCoreOpts
opts = {
mappings = {
n = {
["<Leader>k"] = { desc = "Kubernetes" },
["<Leader>ki"] = {
toggle_k9s,
desc = "K9s",
},
["<Leader>gD"] = {
toggle_ghdash,
desc = "GitHub dashboard",
},
},
},
},
},
}