refactor(config): replace mk and scratch terminals with yazi integration
This commit is contained in:
1 parent
6d7b286e74
commit
1b2e71e34f
2 files changed
+7
-16
No files matched your search
@@ -86,6 +86,7 @@ M.never_show = {
|
|||||||
-- Version control
|
-- Version control
|
||||||
".git",
|
".git",
|
||||||
".ai",
|
".ai",
|
||||||
|
".omc",
|
||||||
|
|
||||||
-- Dependencies
|
-- Dependencies
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
|||||||
@@ -44,17 +44,6 @@ function M.setup()
|
|||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Mk (make) terminal
|
|
||||||
local mk = Terminal:new {
|
|
||||||
cmd = "task",
|
|
||||||
hidden = true,
|
|
||||||
direction = "horizontal",
|
|
||||||
on_open = function(term)
|
|
||||||
vim.cmd "startinsert!"
|
|
||||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Mk (make) terminal
|
-- Mk (make) terminal
|
||||||
local lazygit = Terminal:new {
|
local lazygit = Terminal:new {
|
||||||
cmd = "lazygit",
|
cmd = "lazygit",
|
||||||
@@ -76,23 +65,24 @@ function M.setup()
|
|||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Scratch terminal
|
-- yazi terminal
|
||||||
local scratch = Terminal:new {
|
local yazi = Terminal:new {
|
||||||
cmd = "zsh",
|
cmd = "yazi",
|
||||||
hidden = true,
|
hidden = true,
|
||||||
direction = "horizontal",
|
direction = "float",
|
||||||
on_open = function(term)
|
on_open = function(term)
|
||||||
vim.cmd "startinsert!"
|
vim.cmd "startinsert!"
|
||||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Export toggle functions to module instead of global namespace
|
-- Export toggle functions to module instead of global namespace
|
||||||
M.scooter_toggle = function() scooter:toggle() end
|
M.scooter_toggle = function() scooter:toggle() end
|
||||||
M.mk_toggle = function() mk:toggle() end
|
M.mk_toggle = function() mk:toggle() end
|
||||||
M.lazygit_toggle = function() lazygit:toggle() end
|
M.lazygit_toggle = function() lazygit:toggle() end
|
||||||
M.lazydocker_toggle = function() lazydocker:toggle() end
|
M.lazydocker_toggle = function() lazydocker:toggle() end
|
||||||
M.smartCommit_toggle = function() smartCommit:toggle() end
|
M.smartCommit_toggle = function() smartCommit:toggle() end
|
||||||
M.scratch_toggle = function() scratch:toggle() end
|
M.yazi_toggle = function() yazi:toggle() end
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
Reference in new issue
Block a user