mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
Added lazy git
This commit is contained in:
@@ -1,48 +1,48 @@
|
||||
return {
|
||||
"sindrets/diffview.nvim",
|
||||
cmd = {
|
||||
"DiffviewOpen",
|
||||
"DiffviewClose",
|
||||
"DiffviewToggleFiles",
|
||||
"DiffviewFocusFiles"
|
||||
},
|
||||
config = function()
|
||||
local cb = require('diffview.config').diffview_callback
|
||||
|
||||
require('diffview').setup {
|
||||
diff_binaries = false, -- Show diffs for binaries
|
||||
use_icons = true, -- Requires nvim-web-devicons
|
||||
file_panel = {
|
||||
width = 35,
|
||||
},
|
||||
key_bindings = {
|
||||
disable_defaults = false, -- Disable the default key bindings
|
||||
-- The `view` bindings are active in the diff buffers, only when the current
|
||||
-- tabpage is a Diffview.
|
||||
view = {
|
||||
["<tab>"] = cb("select_next_entry"), -- Open the diff for the next file
|
||||
["<s-tab>"] = cb("select_prev_entry"), -- Open the diff for the previous file
|
||||
["<leader>e"] = cb("focus_files"), -- Bring focus to the files panel
|
||||
["<leader>b"] = cb("toggle_files"), -- Toggle the files panel.
|
||||
},
|
||||
file_panel = {
|
||||
["j"] = cb("next_entry"), -- Bring the cursor to the next file entry
|
||||
["<down>"] = cb("next_entry"),
|
||||
["k"] = cb("prev_entry"), -- Bring the cursor to the previous file entry.
|
||||
["<up>"] = cb("prev_entry"),
|
||||
["<cr>"] = cb("select_entry"), -- Open the diff for the selected entry.
|
||||
["o"] = cb("select_entry"),
|
||||
["<2-LeftMouse>"] = cb("select_entry"),
|
||||
["-"] = cb("toggle_stage_entry"), -- Stage / unstage the selected entry.
|
||||
["S"] = cb("stage_all"), -- Stage all entries.
|
||||
["U"] = cb("unstage_all"), -- Unstage all entries.
|
||||
["R"] = cb("refresh_files"), -- Update stats and entries in the file list.
|
||||
["<tab>"] = cb("select_next_entry"),
|
||||
["<s-tab>"] = cb("select_prev_entry"),
|
||||
["<leader>e"] = cb("focus_files"),
|
||||
["<leader>b"] = cb("toggle_files"),
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
-- return {
|
||||
-- "sindrets/diffview.nvim",
|
||||
-- cmd = {
|
||||
-- "DiffviewOpen",
|
||||
-- "DiffviewClose",
|
||||
-- "DiffviewToggleFiles",
|
||||
-- "DiffviewFocusFiles"
|
||||
-- },
|
||||
-- config = function()
|
||||
-- local cb = require('diffview.config').diffview_callback
|
||||
--
|
||||
-- require('diffview').setup {
|
||||
-- diff_binaries = false, -- Show diffs for binaries
|
||||
-- use_icons = true, -- Requires nvim-web-devicons
|
||||
-- file_panel = {
|
||||
-- width = 35,
|
||||
-- },
|
||||
-- key_bindings = {
|
||||
-- disable_defaults = false, -- Disable the default key bindings
|
||||
-- -- The `view` bindings are active in the diff buffers, only when the current
|
||||
-- -- tabpage is a Diffview.
|
||||
-- view = {
|
||||
-- ["<tab>"] = cb("select_next_entry"), -- Open the diff for the next file
|
||||
-- ["<s-tab>"] = cb("select_prev_entry"), -- Open the diff for the previous file
|
||||
-- ["<leader>e"] = cb("focus_files"), -- Bring focus to the files panel
|
||||
-- ["<leader>b"] = cb("toggle_files"), -- Toggle the files panel.
|
||||
-- },
|
||||
-- file_panel = {
|
||||
-- ["j"] = cb("next_entry"), -- Bring the cursor to the next file entry
|
||||
-- ["<down>"] = cb("next_entry"),
|
||||
-- ["k"] = cb("prev_entry"), -- Bring the cursor to the previous file entry.
|
||||
-- ["<up>"] = cb("prev_entry"),
|
||||
-- ["<cr>"] = cb("select_entry"), -- Open the diff for the selected entry.
|
||||
-- ["o"] = cb("select_entry"),
|
||||
-- ["<2-LeftMouse>"] = cb("select_entry"),
|
||||
-- ["-"] = cb("toggle_stage_entry"), -- Stage / unstage the selected entry.
|
||||
-- ["S"] = cb("stage_all"), -- Stage all entries.
|
||||
-- ["U"] = cb("unstage_all"), -- Unstage all entries.
|
||||
-- ["R"] = cb("refresh_files"), -- Update stats and entries in the file list.
|
||||
-- ["<tab>"] = cb("select_next_entry"),
|
||||
-- ["<s-tab>"] = cb("select_prev_entry"),
|
||||
-- ["<leader>e"] = cb("focus_files"),
|
||||
-- ["<leader>b"] = cb("toggle_files"),
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
-- end
|
||||
-- }
|
||||
|
||||
10
nvim/m-housh/lua/user/plugin/lazygit.lua
Normal file
10
nvim/m-housh/lua/user/plugin/lazygit.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
"kdheepak/lazygit.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-lua/plenary.nvim"
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("lazygit")
|
||||
end,
|
||||
}
|
||||
@@ -1,38 +1,38 @@
|
||||
return {
|
||||
"TimUntersberger/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
"sindrets/diffview.nvim", -- optional
|
||||
},
|
||||
opts = {
|
||||
disable_signs = false,
|
||||
disable_context_highlighting = false,
|
||||
disable_commit_confirmation = true,
|
||||
-- customize displayed signs
|
||||
signs = {
|
||||
-- { CLOSED, OPENED }
|
||||
section = { ">", "v" },
|
||||
item = { ">", "v" },
|
||||
hunk = { "", "" },
|
||||
},
|
||||
integrations = {
|
||||
diffview = true
|
||||
},
|
||||
-- override/add mappings
|
||||
mappings = {
|
||||
-- modify status buffer mappings
|
||||
status = {
|
||||
-- Adds a mapping with "B" as key that does the "BranchPopup" command
|
||||
["B"] = "BranchPopup",
|
||||
["C"] = "CommitPopup",
|
||||
-- ["P"] = "PullPopup",
|
||||
["S"] = "Stage",
|
||||
-- ["D"] = "Discard",
|
||||
-- Removes the default mapping of "s"
|
||||
-- ["s"] = "",
|
||||
}
|
||||
}
|
||||
},
|
||||
cmd = "Neogit",
|
||||
}
|
||||
-- return {
|
||||
-- "TimUntersberger/neogit",
|
||||
-- dependencies = {
|
||||
-- "nvim-lua/plenary.nvim",
|
||||
-- "nvim-telescope/telescope.nvim", -- optional
|
||||
-- "sindrets/diffview.nvim", -- optional
|
||||
-- },
|
||||
-- opts = {
|
||||
-- disable_signs = false,
|
||||
-- disable_context_highlighting = false,
|
||||
-- disable_commit_confirmation = true,
|
||||
-- -- customize displayed signs
|
||||
-- signs = {
|
||||
-- -- { CLOSED, OPENED }
|
||||
-- section = { ">", "v" },
|
||||
-- item = { ">", "v" },
|
||||
-- hunk = { "", "" },
|
||||
-- },
|
||||
-- integrations = {
|
||||
-- diffview = true
|
||||
-- },
|
||||
-- -- override/add mappings
|
||||
-- mappings = {
|
||||
-- -- modify status buffer mappings
|
||||
-- status = {
|
||||
-- -- Adds a mapping with "B" as key that does the "BranchPopup" command
|
||||
-- ["B"] = "BranchPopup",
|
||||
-- ["C"] = "CommitPopup",
|
||||
-- -- ["P"] = "PullPopup",
|
||||
-- ["S"] = "Stage",
|
||||
-- -- ["D"] = "Discard",
|
||||
-- -- Removes the default mapping of "s"
|
||||
-- -- ["s"] = "",
|
||||
-- }
|
||||
-- }
|
||||
-- },
|
||||
-- cmd = "Neogit",
|
||||
-- }
|
||||
|
||||
@@ -17,19 +17,35 @@ require("lazy").setup({
|
||||
path = '~/LocalProjects/plugins',
|
||||
fallback = true
|
||||
},
|
||||
|
||||
-- Theme --
|
||||
{ import = 'user.plugin.theme' },
|
||||
|
||||
-- Completions --
|
||||
{ import = 'user.plugin.cmp' },
|
||||
{ import = 'user.plugin.diffview' },
|
||||
|
||||
-- LSP --
|
||||
{ 'folke/neodev.nvim', opts = {} },
|
||||
{ import = 'user.plugin.lsp' },
|
||||
{ import = 'user.plugin.lualine' },
|
||||
{ import = 'user.plugin.neogit' },
|
||||
|
||||
|
||||
{ import = 'user.plugin.swift' },
|
||||
|
||||
{ import = 'user.plugin.neo-tree' },
|
||||
{ import = 'user.plugin.overseer' },
|
||||
{ import = 'user.plugin.swift' },
|
||||
{ import = 'user.plugin.telescope' },
|
||||
{ import = 'user.plugin.theme' },
|
||||
{ import = 'user.plugin.toggleterm' },
|
||||
{ import = 'user.plugin.treesitter' },
|
||||
|
||||
-- Git --
|
||||
--{ import = 'user.plugin.diffview' },
|
||||
{ import = 'user.plugin.lazygit' },
|
||||
--{ import = 'user.plugin.neogit' },
|
||||
|
||||
|
||||
-- Utilities --
|
||||
{ import = 'user.plugin.toggleterm' },
|
||||
{ import = 'user.plugin.which-key' },
|
||||
{ import = 'user.plugin.wrapping' },
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user