nvim: update
This commit is contained in:
parent
df4d3b0333
commit
b56a08eaeb
5 changed files with 90 additions and 51 deletions
|
|
@ -1,6 +0,0 @@
|
|||
return {
|
||||
"voldikss/vim-floaterm",
|
||||
keys = {
|
||||
{ "<leader>lg", "<cmd>FloatermNew lazygit<CR>", desc = "Open lazygit in a floating window" },
|
||||
},
|
||||
}
|
||||
23
nvim/lua/juancwu/plugins/fugitive.lua
Normal file
23
nvim/lua/juancwu/plugins/fugitive.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
return {
|
||||
"tpope/vim-fugitive",
|
||||
cmd = {
|
||||
"Git",
|
||||
"G",
|
||||
"Gdiffsplit",
|
||||
"Gread",
|
||||
"Gwrite",
|
||||
"Ggrep",
|
||||
"GMove",
|
||||
"GDelete",
|
||||
"GBrowse",
|
||||
"GRemove",
|
||||
"GRename",
|
||||
"Glgrep",
|
||||
"Gedit"
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>gs", "<cmd>Git<CR>", desc = "Git status" },
|
||||
{ "<leader>gbl", "<cmd>Git blame<CR>", desc = "Open [G]it [Bl]ame" },
|
||||
{ "<leader>gd", "<cmd>Gdiffsplit<CR>", desc = "Open [G]it [D]iff" },
|
||||
},
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
return {
|
||||
'dinhhuy258/git.nvim',
|
||||
keys = {
|
||||
{ "<leader>gbl", "<cmd>GitBlame<CR>", desc = "Open [G]it [Bl]ame" },
|
||||
{ "<leader>gd", "<cmd>GitDiff<CR>", desc = "Open [G]it [D]iff" },
|
||||
},
|
||||
cmd = {
|
||||
"Git",
|
||||
"GitBlame",
|
||||
"GitDiff",
|
||||
},
|
||||
config = function()
|
||||
local git = require('git')
|
||||
|
||||
git.setup({
|
||||
default_keymaps = true,
|
||||
keymaps = {
|
||||
quit_blame = "q",
|
||||
diff_close = "q",
|
||||
},
|
||||
target_branch = "main",
|
||||
|
||||
})
|
||||
end
|
||||
}
|
||||
47
nvim/lua/juancwu/plugins/toggleterm.lua
Normal file
47
nvim/lua/juancwu/plugins/toggleterm.lua
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
return {
|
||||
"akinsho/toggleterm.nvim",
|
||||
version = "*",
|
||||
keys = {
|
||||
{ "<leader>lg", function()
|
||||
local Terminal = require('toggleterm.terminal').Terminal
|
||||
local lazygit = Terminal:new({
|
||||
cmd = "lazygit",
|
||||
direction = "float",
|
||||
float_opts = {
|
||||
border = "double",
|
||||
},
|
||||
on_open = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
end,
|
||||
on_close = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
end,
|
||||
})
|
||||
lazygit:toggle()
|
||||
end, desc = "Open lazygit in a floating window" },
|
||||
},
|
||||
opts = {
|
||||
size = 20,
|
||||
open_mapping = [[<c-\>]],
|
||||
hide_numbers = true,
|
||||
shade_filetypes = {},
|
||||
shade_terminals = true,
|
||||
shading_factor = 2,
|
||||
start_in_insert = true,
|
||||
insert_mappings = true,
|
||||
terminal_mappings = true,
|
||||
persist_size = true,
|
||||
persist_mode = true,
|
||||
direction = "float",
|
||||
close_on_exit = true,
|
||||
shell = vim.o.shell,
|
||||
float_opts = {
|
||||
border = "curved",
|
||||
winblend = 0,
|
||||
highlights = {
|
||||
border = "Normal",
|
||||
background = "Normal",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue