mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
add k9s and gh run watch to toggleterm
This commit is contained in:
parent
6827aa4369
commit
a06cb74340
@ -3,7 +3,7 @@ local M = {}
|
||||
M.packer = function(use)
|
||||
use({
|
||||
"akinsho/toggleterm.nvim",
|
||||
tag = "v2.*",
|
||||
tag = "v2.1.0",
|
||||
config = function()
|
||||
require("toggleterm").setup({
|
||||
open_mapping = [[<c-\>]],
|
||||
@ -26,12 +26,54 @@ M.packer = function(use)
|
||||
})
|
||||
|
||||
local terminal = require("toggleterm.terminal").Terminal
|
||||
|
||||
local basicterminal = terminal:new()
|
||||
function TERM_TOGGLE()
|
||||
basicterminal:toggle()
|
||||
end
|
||||
|
||||
local nixpkgs = terminal:new({ cmd = "nix repl '<nixpkgs>'" })
|
||||
function NIXPKGS_TOGGLE()
|
||||
nixpkgs:toggle()
|
||||
end
|
||||
|
||||
local gitwatch = terminal:new({ cmd = "fish --interactive --init-command 'gh run watch'" })
|
||||
function GITWATCH_TOGGLE()
|
||||
gitwatch:toggle()
|
||||
end
|
||||
|
||||
local k9s = terminal:new({ cmd = "k9s" })
|
||||
function K9S_TOGGLE()
|
||||
k9s:toggle()
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<Leader>t", TERM_TOGGLE)
|
||||
vim.keymap.set("n", "<Leader>P", NIXPKGS_TOGGLE)
|
||||
vim.keymap.set("n", "<Leader>gw", GITWATCH_TOGGLE)
|
||||
vim.keymap.set("n", "<C-k>", K9S_TOGGLE)
|
||||
end,
|
||||
})
|
||||
|
||||
-- Connect to telescope
|
||||
-- use({
|
||||
-- "https://git.sr.ht/~havi/telescope-toggleterm.nvim",
|
||||
-- event = "TermOpen",
|
||||
-- requires = {
|
||||
-- "akinsho/nvim-toggleterm.lua",
|
||||
-- "nvim-telescope/telescope.nvim",
|
||||
-- "nvim-lua/popup.nvim",
|
||||
-- "nvim-lua/plenary.nvim",
|
||||
-- },
|
||||
-- config = function()
|
||||
-- require("telescope").load_extension("toggleterm")
|
||||
-- require("telescope-toggleterm").setup({
|
||||
-- telescope_mappings = {
|
||||
-- -- <ctrl-c> : kill the terminal buffer (default) .
|
||||
-- ["<C-c>"] = require("telescope-toggleterm").actions.exit_terminal,
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- })
|
||||
end
|
||||
|
||||
return M
|
||||
|
@ -37,7 +37,7 @@ M.packer = function(use)
|
||||
-- Buffer line ("tabs")
|
||||
use({
|
||||
"akinsho/bufferline.nvim",
|
||||
tag = "v2.*",
|
||||
tag = "v2.4.0",
|
||||
requires = { "kyazdani42/nvim-web-devicons", "moll/vim-bbye" },
|
||||
config = function()
|
||||
require("bufferline").setup({
|
||||
|
Loading…
Reference in New Issue
Block a user