Add neovim-remote and lazygit configs

master
Ian Mancini 3 years ago
parent 03ee95cbc3
commit d4c2ed404c

@ -4,6 +4,10 @@
command -v vim >/dev/null && alias vi="vi" vim="vim" vimdiff="vimdiff" 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" 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 # Verbose
alias \ alias \
rm="rm -v" \ rm="rm -v" \

@ -1,7 +1,15 @@
#!/bin/sh #!/bin/sh
# env # env
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" export EDITOR="nvim"
fi
export TERMINAL="kitty" export TERMINAL="kitty"
export VISUAL="kitty $EDITOR" export VISUAL="kitty $EDITOR"
export BROWSER="chromium" export BROWSER="chromium"

@ -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: '<c-c>'
quit-alt1: 'Q'
return: 'q' # return to previous menu, will quit if there's nowhere to return
togglePanel: '<tab>' # goto the next panel
prevItem: '<up>' # go one line up
nextItem: '<down>' # 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: '<space>'
goInto: '<tab>'
openRecentRepos: '<c-r>'
confirm: '<enter>'
confirm-alt1: 'y'
remove: 'd'
new: 'n'
edit: '<enter>'
openFile: 'o'
scrollUpMain: '<pgup>' # main panel scroll up
scrollDownMain: '<pgdown>' # main panel scroll down
scrollUpMain-alt2: '<c-u>' # main panel scroll up
scrollDownMain-alt2: '<c-d>' # main panel scroll down
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>' # deprecated
copyToClipboard: '<c-o>'
submitEditorText: '<enter>'
appendNewline: '<a-enter>'
extrasMenu: '@'
toggleWhitespaceInDiffView: '<c-w>'
status:
checkForUpdate: 'u'
recentRepos: '<enter>'
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: '<c-u>' # move commit down one
moveUpCommit: '<c-d>' # move commit up one
amendToCommit: 'A'
pickCommit: 'p' # pick commit (when mid-rebase)
revertCommit: 't'
cherryPickCopy: 'c'
cherryPickCopyRange: 'C'
pasteCommits: 'v'
tagCommit: 'T'
checkoutCommit: '<space>'
resetCherryPick: '<c-R>'
copyCommitMessageToClipboard: '<c-y>'
stash:
popStash: 'g'
commitFiles:
checkoutCommitFile: 'c'
main:
toggleDragSelect: 'v'
toggleDragSelect-alt: 'V'
toggleSelectHunk: 'a'
pickBothHunks: 'b'
submodules:
init: 'i'
update: 'u'
bulkMenu: 'b'

@ -4,5 +4,6 @@ local opts = { noremap = true, silent = true }
utils.map('n', '<leader>gg', '<cmd>LazyGit<CR>', opts) utils.map('n', '<leader>gg', '<cmd>LazyGit<CR>', opts)
utils.map('n', '<leader>gc', '<cmd>LazyGitConfig<CR>', opts) utils.map('n', '<leader>gc', '<cmd>LazyGitConfig<CR>', opts)
vim.env.GIT_EDITOR = 'nvr --remote-wait'
vim.g.lazygit_floating_window_use_plenary = 1 vim.g.lazygit_floating_window_use_plenary = 1
vim.g.lazygit_use_neovim_remote = 1 vim.g.lazygit_use_neovim_remote = 1

@ -1,3 +1,5 @@
local utils = require('utils')
require("toggleterm").setup{ require("toggleterm").setup{
open_mapping = [[<a-`>]], open_mapping = [[<a-`>]],
hide_numbers = true, hide_numbers = true,

@ -30,7 +30,7 @@ zplug "zsh-users/zsh-autosuggestions"
zplug "zsh-users/zsh-history-substring-search" zplug "zsh-users/zsh-history-substring-search"
zplug "zsh-users/zsh-completions" zplug "zsh-users/zsh-completions"
zplug "laurenkt/zsh-vimto" zplug "laurenkt/zsh-vimto"
zplug "MichaelAquilina/zsh-autoswitch-virtualenv" # zplug "MichaelAquilina/zsh-autoswitch-virtualenv"
# zplug "paulmelnikow/zsh-startup-timer" # zplug "paulmelnikow/zsh-startup-timer"
# zplug "lib/nvm", from:oh-my-zsh # zplug "lib/nvm", from:oh-my-zsh

Loading…
Cancel
Save