lazygit: uses snacks.nvim for lazygit
This commit is contained in:
parent
ed6114dc05
commit
ebac538a83
|
@ -84,7 +84,6 @@
|
|||
"rose-pine": { "branch": "main", "commit": "d396005db5bbd1d4ec7772a7c96c96f4c4802328" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" },
|
||||
"silicon.lua": { "branch": "main", "commit": "f1387c8e2e69743899d6da6d4bd0e42be5ac5fa0" },
|
||||
"smart-open.nvim": { "branch": "main", "commit": "7770b01ce4d551c143d7ec8589879320796621b9" },
|
||||
"snipe.nvim": { "branch": "main", "commit": "854a47c970413405361487c13e2b1e9aa9a3696e" },
|
||||
"sqlite.lua": { "branch": "master", "commit": "d0ffd703b56d090d213b497ed4eb840495f14a11" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
if vim.env.ZELLIJ ~= nil and not vim.g.neovide then
|
||||
-- currently running inside zellij session and not inside neovide
|
||||
vim.keymap.set("n", "<leader>z", function()
|
||||
local cwd = vim.fn.expand "%:p:h"
|
||||
vim.system {
|
||||
"zellij",
|
||||
"run",
|
||||
"--close-on-exit",
|
||||
"--cwd",
|
||||
cwd,
|
||||
"--in-place",
|
||||
"--",
|
||||
"lazygit",
|
||||
}
|
||||
end, { desc = "Open Lazygit (Zellij)" })
|
||||
elseif vim.env.HYPRLAND_INSTANCE_SIGNATURE ~= nil and vim.fn.executable "foot" == 1 then
|
||||
vim.keymap.set("n", "<leader>z", function()
|
||||
vim.system {
|
||||
"hyprctl",
|
||||
"dispatch",
|
||||
"exec",
|
||||
"--",
|
||||
"foot",
|
||||
"--app-id=lazygit",
|
||||
"--title=lazygit",
|
||||
"--working-directory=" .. vim.fn.getcwd(),
|
||||
"--",
|
||||
"lazygit",
|
||||
}
|
||||
end, { desc = "Open Lazygit (Foot)" })
|
||||
end
|
||||
-- if vim.env.ZELLIJ ~= nil and not vim.g.neovide then
|
||||
-- -- currently running inside zellij session and not inside neovide
|
||||
-- vim.keymap.set("n", "<leader>z", function()
|
||||
-- local cwd = vim.fn.expand "%:p:h"
|
||||
-- vim.system {
|
||||
-- "zellij",
|
||||
-- "run",
|
||||
-- "--close-on-exit",
|
||||
-- "--cwd",
|
||||
-- cwd,
|
||||
-- "--in-place",
|
||||
-- "--",
|
||||
-- "lazygit",
|
||||
-- }
|
||||
-- end, { desc = "Open Lazygit (Zellij)" })
|
||||
-- elseif vim.env.HYPRLAND_INSTANCE_SIGNATURE ~= nil and vim.fn.executable "foot" == 1 then
|
||||
-- vim.keymap.set("n", "<leader>z", function()
|
||||
-- vim.system {
|
||||
-- "hyprctl",
|
||||
-- "dispatch",
|
||||
-- "exec",
|
||||
-- "--",
|
||||
-- "foot",
|
||||
-- "--app-id=lazygit",
|
||||
-- "--title=lazygit",
|
||||
-- "--working-directory=" .. vim.fn.getcwd(),
|
||||
-- "--",
|
||||
-- "lazygit",
|
||||
-- }
|
||||
-- end, { desc = "Open Lazygit (Foot)" })
|
||||
-- end
|
||||
|
|
15
lua/plugins/snacks.lua
Normal file
15
lua/plugins/snacks.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
return {
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
opts = {
|
||||
bigfile = { enabled = false },
|
||||
notifier = { enabled = false },
|
||||
quickfile = { enabled = false },
|
||||
statuscolumn = { enabled = false },
|
||||
words = { enabled = false },
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>z", "<cmd>lua Snacks.lazygit()<cr>", desc = "LazyGit" },
|
||||
},
|
||||
}
|
Loading…
Reference in a new issue