diff --git a/files/lazygit/.config/lazygit/config.yml b/files/lazygit/.config/lazygit/config.yml new file mode 100644 index 0000000..b39dca7 --- /dev/null +++ b/files/lazygit/.config/lazygit/config.yml @@ -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: + return: + quitWithoutChangingDirectory: Q + togglePanel: + prevItem: + nextItem: + prevItem-alt: k + nextItem-alt: j + prevPage: ',' + nextPage: . + scrollLeft: H + scrollRight: L + gotoTop: < + gotoBottom: '>' + prevBlock: + nextBlock: + prevBlock-alt: h + nextBlock-alt: l + nextBlock-alt2: + prevBlock-alt2: + jumpToBlock: + - "1" + - "2" + - "3" + - "4" + - "5" + nextMatch: "n" + prevMatch: "N" + startSearch: / + optionMenu: x + optionMenu-alt1: '?' + select: + goInto: + confirm: + confirm-alt1: "y" + remove: d + new: "n" + edit: e + openFile: o + scrollUpMain: + scrollDownMain: + scrollUpMain-alt1: K + scrollDownMain-alt1: J + scrollUpMain-alt2: + scrollDownMain-alt2: + executeCustomCommand: ':' + createRebaseOptionsMenu: m + pushFiles: P + pullFiles: p + refresh: R + createPatchOptionsMenu: + nextTab: ']' + prevTab: '[' + nextScreenMode: + + prevScreenMode: _ + undo: z + redo: + filteringMenu: + diffingMenu: W + diffingMenu-alt: + copyToClipboard: + openRecentRepos: + submitEditorText: + appendNewline: + extrasMenu: '@' + toggleWhitespaceInDiffView: + increaseContextInDiffView: '}' + decreaseContextInDiffView: '{' + status: + checkForUpdate: u + recentRepos: + 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: + branches: + createPullRequest: o + viewPullRequestOptions: O + copyPullRequestURL: + 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: + moveUpCommit: + amendToCommit: A + resetCommitAuthor: a + pickCommit: p + revertCommit: t + cherryPickCopy: c + cherryPickCopyRange: C + pasteCommits: v + tagCommit: T + checkoutCommit: + resetCherryPick: + copyCommitAttributeToClipboard: "y" + openLogMenu: + 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 + + diff --git a/files/lazygit/.config/lazygit/state.yml b/files/lazygit/.config/lazygit/state.yml new file mode 100644 index 0000000..31c70b0 --- /dev/null +++ b/files/lazygit/.config/lazygit/state.yml @@ -0,0 +1,7 @@ +lastupdatecheck: 0 +recentrepos: +- /home/marc/.dots +- /home/marc/dev/python/ihk-matse-ap +startuppopupversion: 5 +customcommandshistory: [] +hidecommandlog: false diff --git a/files/nvim/.config/nvim/lua/mappings.lua b/files/nvim/.config/nvim/lua/mappings.lua index 53af7d1..8238f6d 100644 --- a/files/nvim/.config/nvim/lua/mappings.lua +++ b/files/nvim/.config/nvim/lua/mappings.lua @@ -55,13 +55,17 @@ wk.register({ }) -- git -map("n", "gs", " Neogit", default_opts) map("n", "gb", " Git blame", default_opts) +map("n", "gc", " LazyGitFilter", default_opts) +map("n", "gf", " LazyGitFilterCurrentFile", default_opts) +map("n", "gs", " LazyGit", default_opts) wk.register({ [""] = { g = { - s = { "Status" }, b = { "Blame" }, + c = { "Commits" }, + f = { "(Commits) File" }, + s = { "Status" }, } } }) @@ -99,33 +103,8 @@ wk.register({ -- 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({ mapping = { - -- [""] = 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" }), - -- [""] = 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" }), [""] = cmp.mapping.select_prev_item(), [""] = cmp.mapping.select_next_item(), [""] = cmp.mapping.confirm({ diff --git a/files/nvim/.config/nvim/lua/plugins/init.lua b/files/nvim/.config/nvim/lua/plugins/init.lua index f429c64..2bccff5 100644 --- a/files/nvim/.config/nvim/lua/plugins/init.lua +++ b/files/nvim/.config/nvim/lua/plugins/init.lua @@ -119,13 +119,12 @@ return require('packer').startup(function(use) config = function() require('plugins.todo-comments-conf') end } - -- git client + -- interactive git use { - 'TimUntersberger/neogit', - requires = 'nvim-lua/plenary.nvim', -- General functions - config = function() require('plugins.neogit-conf') end, + 'kdheepak/lazygit.nvim' } + -- git cmd wrapper use 'tpope/vim-fugitive' -- git signs at left side (+ blame line) diff --git a/files/vim/.vimrc b/files/vim/.vimrc index b56b3d3..4bc4855 100644 --- a/files/vim/.vimrc +++ b/files/vim/.vimrc @@ -90,7 +90,7 @@ let g:netrw_banner = 0 " Remove useless banner at the top of netrw " ============================== Macros and Mappings " open fuzzy file browser -map :CtrlP +map :CtrlP . " C-/ to hide search results map :noh " git