diff --git a/filesets/base/environment/.aliasrc b/filesets/base/environment/.aliasrc index 777b102..05d1be4 100644 --- a/filesets/base/environment/.aliasrc +++ b/filesets/base/environment/.aliasrc @@ -4,6 +4,10 @@ command -v vim >/dev/null && alias vi="vi" vim="vim" vimdiff="vimdiff" command -v nvim >/dev/null && alias vi="nvim" vim="nvim" vimdiff="nvim -d" +# neovim-remote +nvr_command="nvr -cc split --remote-wait +'set bufhidden=wipe'" +command -v nvr >/dev/null && alias vi="$nvr_command" vim="$nvr_command" + # Verbose alias \ rm="rm -v" \ diff --git a/filesets/base/environment/.envrc b/filesets/base/environment/.envrc index 107c62b..9f96d4e 100644 --- a/filesets/base/environment/.envrc +++ b/filesets/base/environment/.envrc @@ -1,7 +1,15 @@ #!/bin/sh # env -export EDITOR="nvim" +if [ -n "$NVIM_LISTEN_ADDRESS" ]; then + # neovim-remote + export VISUAL="nvr -cc split --remote-wait +'set bufhidden=wipe'" + export EDITOR="nvr -cc split --remote-wait +'set bufhidden=wipe'" +else + export VISUAL="nvim" + export EDITOR="nvim" +fi + export TERMINAL="kitty" export VISUAL="kitty $EDITOR" export BROWSER="chromium" diff --git a/filesets/base/lazygit/.config/lazygit/config.yml b/filesets/base/lazygit/.config/lazygit/config.yml new file mode 100644 index 0000000..c1cfdbb --- /dev/null +++ b/filesets/base/lazygit/.config/lazygit/config.yml @@ -0,0 +1,181 @@ +gui: + # stuff relating to the UI + scrollHeight: 2 # how many lines you scroll by + scrollPastBottom: true # enable scrolling past the bottom + sidePanelWidth: 0.3333 # number from 0 to 1 + expandFocusedSidePanel: false + mainPanelSplitMode: 'flexible' # one of 'horizontal' | 'flexible' | 'vertical' + language: 'auto' # one of 'auto' | 'en' | 'zh' | 'pl' | 'nl' + theme: + lightTheme: false # For terminals with a light background + activeBorderColor: + - white + - bold + inactiveBorderColor: + - green + optionsTextColor: + - blue + selectedLineBgColor: + - default + selectedRangeBgColor: + - blue + commitLength: + show: true + mouseEvents: true + skipUnstageLineWarning: false + skipStashWarning: true + showFileTree: false # for rendering changes files in a tree format + showListFooter: true # for seeing the '5 of 20' message in list panels + showRandomTip: true + showCommandLog: true + commandLogSize: 8 +git: + paging: + colorArg: always + useConfig: false + merging: + # only applicable to unix users + manualCommit: false + # extra args passed to `git merge`, e.g. --no-ff + args: '' + pull: + mode: 'auto' # one of 'auto' | 'merge' | 'rebase' | 'ff-only', auto reads from git configuration + skipHookPrefix: WIP + autoFetch: 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 # prevents lazygit from spawning a separate process when using GPG + disableForcePushing: false + parseEmoji: false +os: + editCommand: '$GIT_EDITOR' # see 'Configuring File Editing' section + editCommandTemplate: '{{editor}} {{filename}}' + openCommand: '' +refresher: + refreshInterval: 10 # file/submodule refresh interval in seconds + fetchInterval: 60 # re-fetch interval in seconds +update: + method: prompt # can be: prompt | background | never + days: 14 # how often an update is checked for +reporting: 'undetermined' # one of: 'on' | 'off' | 'undetermined' +confirmOnQuit: false +# determines whether hitting 'esc' will quit the application when there is nothing to cancel/close +quitOnTopLevelReturn: false +disableStartupPopups: false +notARepository: 'prompt' # one of: 'prompt' | 'create' | 'skip' +keybinding: + universal: + quit: '' + quit-alt1: 'Q' + return: 'q' # return to previous menu, will quit if there's nowhere to return + togglePanel: '' # goto the next panel + prevItem: '' # go one line up + nextItem: '' # go one line down + prevItem-alt: 'k' # go one line up + nextItem-alt: 'j' # go one line down + prevPage: ',' # go to next page in list + nextPage: '.' # go to previous page in list + gotoTop: '<' # go to top of list + gotoBottom: '>' # go to bottom of list + prevBlock: 'K' # goto the previous block / panel + nextBlock: 'J' # goto the next block / panel + prevBlock-alt: 'h' # goto the previous block / panel + nextBlock-alt: 'l' # goto the next block / panel + nextMatch: 'n' + prevMatch: 'N' + optionMenu: 'x' # show help menu + optionMenu-alt1: '?' # show help menu + select: '' + goInto: '' + openRecentRepos: '' + confirm: '' + confirm-alt1: 'y' + remove: 'd' + new: 'n' + edit: '' + openFile: 'o' + scrollUpMain: '' # main panel scroll up + scrollDownMain: '' # main panel scroll down + scrollUpMain-alt2: '' # main panel scroll up + scrollDownMain-alt2: '' # main panel scroll down + executeCustomCommand: ':' + createRebaseOptionsMenu: 'm' + pushFiles: 'P' + pullFiles: 'p' + refresh: 'R' + createPatchOptionsMenu: '' + nextTab: ']' + prevTab: '[' + nextScreenMode: '+' + prevScreenMode: '_' + undo: 'z' + redo: '' + filteringMenu: '' + diffingMenu: 'W' + diffingMenu-alt: '' # deprecated + copyToClipboard: '' + submitEditorText: '' + appendNewline: '' + extrasMenu: '@' + toggleWhitespaceInDiffView: '' + status: + checkForUpdate: 'u' + recentRepos: '' + files: + commitChanges: 'c' + commitChangesWithoutHook: 'w' # commit changes without pre-commit hook + amendLastCommit: 'A' + commitChangesWithEditor: 'C' + ignoreFile: 'i' + refreshFiles: 'r' + stashAllChanges: 's' + viewStashOptions: 'S' + toggleStagedAll: 'a' # stage/unstage all + viewResetOptions: 'D' + fetch: 'f' + toggleTreeView: '`' + branches: + createPullRequest: 'o' + viewPullRequestOptions: 'O' + checkoutBranchByName: 'c' + forceCheckoutBranch: 'F' + rebaseBranch: 'r' + mergeIntoCurrentBranch: 'M' + viewGitFlowOptions: 'i' + fastForward: 'f' # fast-forward this branch from its upstream + pushTag: 'P' + setUpstream: 'u' # set as upstream of checked-out branch + fetchRemote: 'f' + commits: + squashDown: 's' + renameCommit: 'r' + renameCommitWithEditor: 'R' + viewResetOptions: 'g' + markCommitAsFixup: 'f' + createFixupCommit: 'F' # create fixup commit for this commit + squashAboveCommits: 'S' + moveDownCommit: '' # move commit down one + moveUpCommit: '' # move commit up one + amendToCommit: 'A' + pickCommit: 'p' # pick commit (when mid-rebase) + revertCommit: 't' + cherryPickCopy: 'c' + cherryPickCopyRange: 'C' + pasteCommits: 'v' + tagCommit: 'T' + checkoutCommit: '' + resetCherryPick: '' + copyCommitMessageToClipboard: '' + stash: + popStash: 'g' + commitFiles: + checkoutCommitFile: 'c' + main: + toggleDragSelect: 'v' + toggleDragSelect-alt: 'V' + toggleSelectHunk: 'a' + pickBothHunks: 'b' + submodules: + init: 'i' + update: 'u' + bulkMenu: 'b' diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/lazygit-nvim.lua b/filesets/base/nvim/.config/nvim/lua/plugins/lazygit-nvim.lua index 056f3d6..8dafe0c 100644 --- a/filesets/base/nvim/.config/nvim/lua/plugins/lazygit-nvim.lua +++ b/filesets/base/nvim/.config/nvim/lua/plugins/lazygit-nvim.lua @@ -4,5 +4,6 @@ local opts = { noremap = true, silent = true } utils.map('n', 'gg', 'LazyGit', opts) utils.map('n', 'gc', 'LazyGitConfig', opts) +vim.env.GIT_EDITOR = 'nvr --remote-wait' vim.g.lazygit_floating_window_use_plenary = 1 vim.g.lazygit_use_neovim_remote = 1 diff --git a/filesets/base/nvim/.config/nvim/lua/plugins/nvim-toggleterm.lua b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-toggleterm.lua index 473d747..5e0639c 100644 --- a/filesets/base/nvim/.config/nvim/lua/plugins/nvim-toggleterm.lua +++ b/filesets/base/nvim/.config/nvim/lua/plugins/nvim-toggleterm.lua @@ -1,3 +1,5 @@ +local utils = require('utils') + require("toggleterm").setup{ open_mapping = [[]], hide_numbers = true, diff --git a/filesets/base/zsh/.zshrc b/filesets/base/zsh/.zshrc index d42e219..f05ed24 100755 --- a/filesets/base/zsh/.zshrc +++ b/filesets/base/zsh/.zshrc @@ -30,7 +30,7 @@ zplug "zsh-users/zsh-autosuggestions" zplug "zsh-users/zsh-history-substring-search" zplug "zsh-users/zsh-completions" zplug "laurenkt/zsh-vimto" -zplug "MichaelAquilina/zsh-autoswitch-virtualenv" +# zplug "MichaelAquilina/zsh-autoswitch-virtualenv" # zplug "paulmelnikow/zsh-startup-timer" # zplug "lib/nvm", from:oh-my-zsh