[nvim] add lazygit integration
This commit is contained in:
229
files/lazygit/.config/lazygit/config.yml
Normal file
229
files/lazygit/.config/lazygit/config.yml
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
gui:
|
||||||
|
authorColors: { '*': 'blue' }
|
||||||
|
branchColors: {}
|
||||||
|
scrollHeight: 2
|
||||||
|
scrollPastBottom: true
|
||||||
|
mouseEvents: true
|
||||||
|
skipUnstageLineWarning: false
|
||||||
|
skipStashWarning: false
|
||||||
|
sidePanelWidth: 0.3333
|
||||||
|
expandFocusedSidePanel: false
|
||||||
|
mainPanelSplitMode: flexible
|
||||||
|
language: auto
|
||||||
|
timeFormat: 02 Jan 06 15:04 MST
|
||||||
|
theme:
|
||||||
|
activeBorderColor:
|
||||||
|
- green
|
||||||
|
- bold
|
||||||
|
inactiveBorderColor:
|
||||||
|
- default
|
||||||
|
optionsTextColor:
|
||||||
|
- blue
|
||||||
|
selectedLineBgColor:
|
||||||
|
- #000000
|
||||||
|
selectedRangeBgColor:
|
||||||
|
- blue
|
||||||
|
cherryPickedCommitBgColor:
|
||||||
|
- cyan
|
||||||
|
cherryPickedCommitFgColor:
|
||||||
|
- blue
|
||||||
|
unstagedChangesColor:
|
||||||
|
- red
|
||||||
|
commitLength:
|
||||||
|
show: true
|
||||||
|
skipNoStagedFilesWarning: false
|
||||||
|
showListFooter: true
|
||||||
|
showFileTree: true
|
||||||
|
showRandomTip: true
|
||||||
|
showCommandLog: false
|
||||||
|
showBottomLine: false
|
||||||
|
showIcons: false
|
||||||
|
commandLogSize: 8
|
||||||
|
splitDiff: auto
|
||||||
|
git:
|
||||||
|
paging:
|
||||||
|
colorArg: always
|
||||||
|
pager: ""
|
||||||
|
useConfig: false
|
||||||
|
commit:
|
||||||
|
signOff: false
|
||||||
|
merging:
|
||||||
|
manualCommit: false
|
||||||
|
args: ""
|
||||||
|
skipHookPrefix: WIP
|
||||||
|
autoFetch: true
|
||||||
|
autoRefresh: true
|
||||||
|
branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --
|
||||||
|
allBranchesLogCmd: git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium
|
||||||
|
overrideGpg: false
|
||||||
|
disableForcePushing: false
|
||||||
|
commitPrefixes: {}
|
||||||
|
parseEmoji: false
|
||||||
|
log:
|
||||||
|
order: topo-order
|
||||||
|
showGraph: when-maximised
|
||||||
|
showWholeGraph: false
|
||||||
|
diffContextSize: 3
|
||||||
|
update:
|
||||||
|
method: prompt
|
||||||
|
days: 14
|
||||||
|
refresher:
|
||||||
|
refreshInterval: 10
|
||||||
|
fetchInterval: 60
|
||||||
|
reporting: undetermined
|
||||||
|
splashUpdatesIndex: 0
|
||||||
|
confirmOnQuit: false
|
||||||
|
quitOnTopLevelReturn: false
|
||||||
|
keybinding:
|
||||||
|
universal:
|
||||||
|
quit: q
|
||||||
|
quit-alt1: <c-c>
|
||||||
|
return: <esc>
|
||||||
|
quitWithoutChangingDirectory: Q
|
||||||
|
togglePanel: <tab>
|
||||||
|
prevItem: <up>
|
||||||
|
nextItem: <down>
|
||||||
|
prevItem-alt: k
|
||||||
|
nextItem-alt: j
|
||||||
|
prevPage: ','
|
||||||
|
nextPage: .
|
||||||
|
scrollLeft: H
|
||||||
|
scrollRight: L
|
||||||
|
gotoTop: <
|
||||||
|
gotoBottom: '>'
|
||||||
|
prevBlock: <left>
|
||||||
|
nextBlock: <right>
|
||||||
|
prevBlock-alt: h
|
||||||
|
nextBlock-alt: l
|
||||||
|
nextBlock-alt2: <tab>
|
||||||
|
prevBlock-alt2: <backtab>
|
||||||
|
jumpToBlock:
|
||||||
|
- "1"
|
||||||
|
- "2"
|
||||||
|
- "3"
|
||||||
|
- "4"
|
||||||
|
- "5"
|
||||||
|
nextMatch: "n"
|
||||||
|
prevMatch: "N"
|
||||||
|
startSearch: /
|
||||||
|
optionMenu: x
|
||||||
|
optionMenu-alt1: '?'
|
||||||
|
select: <space>
|
||||||
|
goInto: <enter>
|
||||||
|
confirm: <enter>
|
||||||
|
confirm-alt1: "y"
|
||||||
|
remove: d
|
||||||
|
new: "n"
|
||||||
|
edit: e
|
||||||
|
openFile: o
|
||||||
|
scrollUpMain: <pgup>
|
||||||
|
scrollDownMain: <pgdown>
|
||||||
|
scrollUpMain-alt1: K
|
||||||
|
scrollDownMain-alt1: J
|
||||||
|
scrollUpMain-alt2: <c-u>
|
||||||
|
scrollDownMain-alt2: <c-d>
|
||||||
|
executeCustomCommand: ':'
|
||||||
|
createRebaseOptionsMenu: m
|
||||||
|
pushFiles: P
|
||||||
|
pullFiles: p
|
||||||
|
refresh: R
|
||||||
|
createPatchOptionsMenu: <c-p>
|
||||||
|
nextTab: ']'
|
||||||
|
prevTab: '['
|
||||||
|
nextScreenMode: +
|
||||||
|
prevScreenMode: _
|
||||||
|
undo: z
|
||||||
|
redo: <c-z>
|
||||||
|
filteringMenu: <c-s>
|
||||||
|
diffingMenu: W
|
||||||
|
diffingMenu-alt: <c-e>
|
||||||
|
copyToClipboard: <c-o>
|
||||||
|
openRecentRepos: <c-r>
|
||||||
|
submitEditorText: <enter>
|
||||||
|
appendNewline: <a-enter>
|
||||||
|
extrasMenu: '@'
|
||||||
|
toggleWhitespaceInDiffView: <c-w>
|
||||||
|
increaseContextInDiffView: '}'
|
||||||
|
decreaseContextInDiffView: '{'
|
||||||
|
status:
|
||||||
|
checkForUpdate: u
|
||||||
|
recentRepos: <enter>
|
||||||
|
allBranchesLogGraph: a
|
||||||
|
files:
|
||||||
|
commitChanges: c
|
||||||
|
commitChangesWithoutHook: w
|
||||||
|
amendLastCommit: A
|
||||||
|
commitChangesWithEditor: C
|
||||||
|
IgnoreOrExcludeFile: i
|
||||||
|
refreshFiles: r
|
||||||
|
stashAllChanges: s
|
||||||
|
viewStashOptions: S
|
||||||
|
toggleStagedAll: a
|
||||||
|
viewResetOptions: D
|
||||||
|
fetch: f
|
||||||
|
toggleTreeView: '`'
|
||||||
|
openMergeTool: M
|
||||||
|
openStatusFilter: <c-b>
|
||||||
|
branches:
|
||||||
|
createPullRequest: o
|
||||||
|
viewPullRequestOptions: O
|
||||||
|
copyPullRequestURL: <c-y>
|
||||||
|
checkoutBranchByName: c
|
||||||
|
forceCheckoutBranch: F
|
||||||
|
rebaseBranch: r
|
||||||
|
renameBranch: R
|
||||||
|
mergeIntoCurrentBranch: M
|
||||||
|
viewGitFlowOptions: i
|
||||||
|
fastForward: f
|
||||||
|
pushTag: P
|
||||||
|
setUpstream: u
|
||||||
|
fetchRemote: f
|
||||||
|
commits:
|
||||||
|
squashDown: s
|
||||||
|
renameCommit: r
|
||||||
|
renameCommitWithEditor: R
|
||||||
|
viewResetOptions: g
|
||||||
|
markCommitAsFixup: f
|
||||||
|
createFixupCommit: F
|
||||||
|
squashAboveCommits: S
|
||||||
|
moveDownCommit: <c-j>
|
||||||
|
moveUpCommit: <c-k>
|
||||||
|
amendToCommit: A
|
||||||
|
resetCommitAuthor: a
|
||||||
|
pickCommit: p
|
||||||
|
revertCommit: t
|
||||||
|
cherryPickCopy: c
|
||||||
|
cherryPickCopyRange: C
|
||||||
|
pasteCommits: v
|
||||||
|
tagCommit: T
|
||||||
|
checkoutCommit: <space>
|
||||||
|
resetCherryPick: <c-R>
|
||||||
|
copyCommitAttributeToClipboard: "y"
|
||||||
|
openLogMenu: <c-l>
|
||||||
|
openInBrowser: o
|
||||||
|
viewBisectOptions: b
|
||||||
|
stash:
|
||||||
|
popStash: g
|
||||||
|
renameStash: r
|
||||||
|
commitFiles:
|
||||||
|
checkoutCommitFile: c
|
||||||
|
main:
|
||||||
|
toggleDragSelect: v
|
||||||
|
toggleDragSelect-alt: V
|
||||||
|
toggleSelectHunk: a
|
||||||
|
pickBothHunks: b
|
||||||
|
editSelectHunk: E
|
||||||
|
submodules:
|
||||||
|
init: i
|
||||||
|
update: u
|
||||||
|
bulkMenu: b
|
||||||
|
os:
|
||||||
|
openCommand: xdg-open {{filename}} >/dev/null
|
||||||
|
openLinkCommand: xdg-open {{link}} >/dev/null
|
||||||
|
disableStartupPopups: false
|
||||||
|
customCommands: []
|
||||||
|
services: {}
|
||||||
|
notARepository: prompt
|
||||||
|
promptToReturnFromSubprocess: true
|
||||||
|
|
||||||
|
|
||||||
7
files/lazygit/.config/lazygit/state.yml
Normal file
7
files/lazygit/.config/lazygit/state.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
lastupdatecheck: 0
|
||||||
|
recentrepos:
|
||||||
|
- /home/marc/.dots
|
||||||
|
- /home/marc/dev/python/ihk-matse-ap
|
||||||
|
startuppopupversion: 5
|
||||||
|
customcommandshistory: []
|
||||||
|
hidecommandlog: false
|
||||||
@@ -55,13 +55,17 @@ wk.register({
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- git
|
-- git
|
||||||
map("n", "<leader>gs", "<cmd> Neogit<CR>", default_opts)
|
|
||||||
map("n", "<leader>gb", "<cmd> Git blame<CR>", default_opts)
|
map("n", "<leader>gb", "<cmd> Git blame<CR>", default_opts)
|
||||||
|
map("n", "<leader>gc", "<cmd> LazyGitFilter<CR>", default_opts)
|
||||||
|
map("n", "<leader>gf", "<cmd> LazyGitFilterCurrentFile<CR>", default_opts)
|
||||||
|
map("n", "<leader>gs", "<cmd> LazyGit<CR>", default_opts)
|
||||||
wk.register({
|
wk.register({
|
||||||
["<leader>"] = {
|
["<leader>"] = {
|
||||||
g = {
|
g = {
|
||||||
s = { "Status" },
|
|
||||||
b = { "Blame" },
|
b = { "Blame" },
|
||||||
|
c = { "Commits" },
|
||||||
|
f = { "(Commits) File" },
|
||||||
|
s = { "Status" },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -99,33 +103,8 @@ wk.register({
|
|||||||
|
|
||||||
-- cmp
|
-- cmp
|
||||||
local cmp = require 'cmp'
|
local cmp = require 'cmp'
|
||||||
local luasnip = require 'luasnip'
|
|
||||||
local has_words_before = function()
|
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
|
||||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
|
||||||
end
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
mapping = {
|
mapping = {
|
||||||
-- ["<Tab>"] = cmp.mapping(function(fallback) -- Advance to next parameter
|
|
||||||
-- if cmp.visible() then
|
|
||||||
-- cmp.select_next_item()
|
|
||||||
-- elseif luasnip.expand_or_jumpable() then
|
|
||||||
-- luasnip.expand_or_jump()
|
|
||||||
-- elseif has_words_before() then
|
|
||||||
-- cmp.complete()
|
|
||||||
-- else
|
|
||||||
-- fallback()
|
|
||||||
-- end
|
|
||||||
-- end, { "i", "s" }),
|
|
||||||
-- ["<S-Tab>"] = cmp.mapping(function(fallback) -- Got back to last parameter
|
|
||||||
-- if cmp.visible() then
|
|
||||||
-- cmp.select_prev_item()
|
|
||||||
-- elseif luasnip.jumpable(-1) then
|
|
||||||
-- luasnip.jump(-1)
|
|
||||||
-- else
|
|
||||||
-- fallback()
|
|
||||||
-- end
|
|
||||||
-- end, { "i", "s" }),
|
|
||||||
["<C-k>"] = cmp.mapping.select_prev_item(),
|
["<C-k>"] = cmp.mapping.select_prev_item(),
|
||||||
["<C-j>"] = cmp.mapping.select_next_item(),
|
["<C-j>"] = cmp.mapping.select_next_item(),
|
||||||
["<C-l>"] = cmp.mapping.confirm({
|
["<C-l>"] = cmp.mapping.confirm({
|
||||||
|
|||||||
@@ -119,13 +119,12 @@ return require('packer').startup(function(use)
|
|||||||
config = function() require('plugins.todo-comments-conf') end
|
config = function() require('plugins.todo-comments-conf') end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- git client
|
-- interactive git
|
||||||
use {
|
use {
|
||||||
'TimUntersberger/neogit',
|
'kdheepak/lazygit.nvim'
|
||||||
requires = 'nvim-lua/plenary.nvim', -- General functions
|
|
||||||
config = function() require('plugins.neogit-conf') end,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- git cmd wrapper
|
||||||
use 'tpope/vim-fugitive'
|
use 'tpope/vim-fugitive'
|
||||||
|
|
||||||
-- git signs at left side (+ blame line)
|
-- git signs at left side (+ blame line)
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ let g:netrw_banner = 0 " Remove useless banner at the top of netrw
|
|||||||
|
|
||||||
" ============================== Macros and Mappings
|
" ============================== Macros and Mappings
|
||||||
" open fuzzy file browser
|
" open fuzzy file browser
|
||||||
map <C-f> :CtrlP<CR>
|
map <C-f> :CtrlP .<CR>
|
||||||
" C-/ to hide search results
|
" C-/ to hide search results
|
||||||
map <C-_> :noh<CR>
|
map <C-_> :noh<CR>
|
||||||
" git
|
" git
|
||||||
|
|||||||
Reference in New Issue
Block a user