Remove vim-fugitive and replace with toggleterm LazyGit
This commit is contained in:
parent
49a17c1d6f
commit
ff4cb251a5
|
@ -2,9 +2,6 @@ require("catppuccin").setup({
|
||||||
flavour = "macchiato",
|
flavour = "macchiato",
|
||||||
transparent_background = true,
|
transparent_background = true,
|
||||||
term_colors = true,
|
term_colors = true,
|
||||||
dim_inactive = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
integrations = {
|
integrations = {
|
||||||
gitsigns = true,
|
gitsigns = true,
|
||||||
indent_blankline = {
|
indent_blankline = {
|
||||||
|
|
|
@ -1,22 +1,18 @@
|
||||||
require("toggleterm").setup({
|
require("toggleterm").setup({
|
||||||
direction = "horizontal",
|
shade_terminals = false,
|
||||||
open_mapping = [[\t]],
|
direction = "float",
|
||||||
size = function(term)
|
close_on_exit = true,
|
||||||
if term.direction == "horizontal" then
|
|
||||||
return 15
|
|
||||||
elseif term.direction == "vertical" then
|
|
||||||
return vim.o.columns * 0.3
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
hide_numbers = true, -- hide the number column in toggleterm buffers
|
|
||||||
persist_size = false,
|
|
||||||
float_opts = {
|
float_opts = {
|
||||||
border = "curved",
|
border = "double",
|
||||||
},
|
winblend = 0,
|
||||||
winbar = {
|
|
||||||
enabled = false,
|
|
||||||
name_formatter = function(term) -- term: Terminal
|
|
||||||
return term.name
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local Terminal = require("toggleterm.terminal").Terminal
|
||||||
|
local lazygit = Terminal:new({ cmd = "lazygit", hidden = true })
|
||||||
|
|
||||||
|
function _Lazygit_toggle()
|
||||||
|
lazygit:toggle()
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _Lazygit_toggle()<CR>", { noremap = true, silent = true })
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.keymap.set("i", "jk", "<esc>")
|
vim.keymap.set("i", "jk", "<esc>")
|
||||||
|
vim.keymap.set({ "n", "t" }, "<A-h>", "<CMD>NavigatorLeft<CR>")
|
||||||
-- Toggleterm
|
vim.keymap.set({ "n", "t" }, "<A-l>", "<CMD>NavigatorRight<CR>")
|
||||||
vim.keymap.set("n", "<leader>th", "<cmd>ToggleTerm direction=horizontal<cr>")
|
vim.keymap.set({ "n", "t" }, "<A-k>", "<CMD>NavigatorUp<CR>")
|
||||||
vim.keymap.set("n", "<leader>tv", "<cmd>ToggleTerm direction=vertical<cr>")
|
vim.keymap.set({ "n", "t" }, "<A-j>", "<CMD>NavigatorDown<CR>")
|
||||||
vim.keymap.set("n", "<leader>tf", "<cmd>ToggleTerm direction=float<cr>")
|
vim.keymap.set({ "n", "t" }, "<A-p>", "<CMD>NavigatorPrevious<CR>")
|
||||||
vim.keymap.set("n", "<leader>tt", "<cmd>ToggleTerm direction=tab<cr>")
|
|
||||||
|
|
||||||
-- Aerial
|
|
||||||
vim.keymap.set("n", "<leader>aa", "<cmd>AerialToggle<cr>")
|
|
||||||
|
|
||||||
-- Telescope
|
-- Telescope
|
||||||
vim.keymap.set("n", "<leader>;", "<cmd>Telescope builtin<cr>")
|
vim.keymap.set("n", "<leader>;", "<cmd>Telescope builtin<cr>")
|
||||||
|
@ -30,10 +26,3 @@ vim.keymap.set("n", "<leader>xw", "<cmd>TroubleToggle workspace_diagnostics<cr>"
|
||||||
vim.keymap.set("n", "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>")
|
vim.keymap.set("n", "<leader>xd", "<cmd>TroubleToggle document_diagnostics<cr>")
|
||||||
vim.keymap.set("n", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>")
|
vim.keymap.set("n", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>")
|
||||||
vim.keymap.set("n", "<leader>xl", "<cmd>TroubleToggle loclist<cr>")
|
vim.keymap.set("n", "<leader>xl", "<cmd>TroubleToggle loclist<cr>")
|
||||||
|
|
||||||
-- Navigator
|
|
||||||
vim.keymap.set({ "n", "t" }, "<A-h>", "<CMD>NavigatorLeft<CR>")
|
|
||||||
vim.keymap.set({ "n", "t" }, "<A-l>", "<CMD>NavigatorRight<CR>")
|
|
||||||
vim.keymap.set({ "n", "t" }, "<A-k>", "<CMD>NavigatorUp<CR>")
|
|
||||||
vim.keymap.set({ "n", "t" }, "<A-j>", "<CMD>NavigatorDown<CR>")
|
|
||||||
vim.keymap.set({ "n", "t" }, "<A-p>", "<CMD>NavigatorPrevious<CR>")
|
|
||||||
|
|
|
@ -63,7 +63,6 @@ require("packer").startup({
|
||||||
require("config.treesitter")
|
require("config.treesitter")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
use({ "tpope/vim-fugitive" })
|
|
||||||
use({
|
use({
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
|
|
Loading…
Reference in a new issue