mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
docs: Add documentational comments
This commit is contained in:
parent
1b050a13a8
commit
68ff1bb357
30 changed files with 732 additions and 562 deletions
|
|
@ -1,43 +0,0 @@
|
||||||
#! /bin/bash
|
|
||||||
# $DOTFILES/bootstrap/set_symblink_unix.bash
|
|
||||||
# Date: 2024-12-01
|
|
||||||
# Author: js0ny
|
|
||||||
# Set symbolic links for Unix-like systems
|
|
||||||
mkdir -p $XDG_CONFIG_HOME/conda $XDG_CONFIG_HOME/git $XDG_CONFIG_HOME/ideavim $XDG_CONFIG_HOME/markdownlint $XDG_CONFIG_HOME/pip $XDG_CONFIG_HOME/neovide $XDG_CONFIG_HOME/powershell $XDG_CONFIG_HOME/vscode $XDG_CONFIG_HOME/NuGet $XDG_CONFIG_HOME/vim $XDG_CONFIG_HOME/tmux $XDG_CONFIG_HOME/npm $XDG_CONFIG_HOME/readline $XDG_CONFIG_HOME/ipython $XDG_CONFIG_HOME/lazygit
|
|
||||||
# Not support XDG_CONFIG_HOME but same directory
|
|
||||||
mkdir -p ~/.config/zellij ~/.config/yazi ~/.config/glow
|
|
||||||
# mkdir -p $WAKATIME_HOME
|
|
||||||
# mkdir -p $XDG_STATE_HOME/vim/undo $XDG_STATE_HOME/vim/backup $XDG_STATE_HOME/vim/swap $XDG_STATE_HOME/vim/view
|
|
||||||
# $DOTFILES/common
|
|
||||||
ln -sf $DOTFILES/common/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc
|
|
||||||
# ln -sf $DOTFILES/common/gitconfig $XDG_CONFIG_HOME/git/config
|
|
||||||
cp $DOTFILES/common/gitconfig.example $XDG_CONFIG_HOME/git/config
|
|
||||||
ln -sf $DOTFILES/common/glow.yaml ~/.config/glow/config.yml
|
|
||||||
ln -sf $DOTFILES/common/haskeline ~/.haskeline
|
|
||||||
ln -sf $DOTFILES/common/ideavimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
|
|
||||||
ln -sf $DOTFILES/common/lazygit.yaml $XDG_CONFIG_HOME/lazygit/config.yml
|
|
||||||
ln -sf $DOTFILES/common/lesskey $XDG_CONFIG_HOME/lesskey
|
|
||||||
# ln -sf $DOTFILES/common/npmrc $NPM_CONFIG_USERCONFIG
|
|
||||||
ln -sf $DOTFILES/common/NuGet.Config $XDG_CONFIG_HOME/NuGet/NuGet.Config
|
|
||||||
ln -sf $DOTFILES/common/pip.conf $XDG_CONFIG_HOME/pip/pip.conf
|
|
||||||
ln -sf $DOTFILES/common/starship.toml ~/.config/starship.toml
|
|
||||||
ln -sf $DOTFILES/common/tmux.conf $XDG_CONFIG_HOME/tmux/tmux.conf
|
|
||||||
ln -sf $DOTFILES/common/vimrc $XDG_CONFIG_HOME/vim/vimrc
|
|
||||||
ln -sf $DOTFILES/common/zellij.config.kdl ~/.config/zellij/config.kdl
|
|
||||||
# $DOTFILES/tools
|
|
||||||
ln -sf $DOTFILES/tools/ipython $XDG_CONFIG_HOME/ipython
|
|
||||||
ln -sf $DOTFILES/tools/nvim $XDG_CONFIG_HOME/nvim
|
|
||||||
ln -sf $DOTFILES/tools/yazi/config/keymap.toml ~/.config/yazi/keymap.toml
|
|
||||||
ln -sf $DOTFILES/tools/yazi/config/yazi.toml ~/.config/yazi/yazi.toml
|
|
||||||
ln -sf $DOTFILES/tools/fish ~/.config
|
|
||||||
|
|
||||||
|
|
||||||
if [ $(uname) = "Darwin" ]; then
|
|
||||||
mkdir -p ~/.config/karabiner $XDG_CONFIG_HOME/skhd $XDG_CONFIG_HOME/yabai $XDG_CONFIG_HOME/sketchybar
|
|
||||||
ln -sf $DOTFILES/platforms/mac/karabiner/karabiner.json ~/.config/karabiner/karabiner.json
|
|
||||||
ln -sf $DOTFILES/platforms/mac/skhdrc $XDG_CONFIG_HOME/skhd/skhdrc
|
|
||||||
ln -sf $DOTFILES/platforms/mac/sketchybarrc $XDG_CONFIG_HOME/sketchybar/sketchybarrc
|
|
||||||
ln -sf $DOTFILES/platforms/mac/yabairc $XDG_CONFIG_HOME/yabai/yabairc
|
|
||||||
else
|
|
||||||
ln -sf $DOTFILES/common/inputrc ~/.inputrc
|
|
||||||
fi
|
|
||||||
106
bootstrap/set_symlink_unix.sh
Normal file
106
bootstrap/set_symlink_unix.sh
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
#! /usr/bin/env bash
|
||||||
|
# $DOTFILES/bootstrap/set_symlink_unix.sh
|
||||||
|
# Date: 2025-01-28
|
||||||
|
# Author: js0ny
|
||||||
|
# Set symbolic links for Unix-like systems
|
||||||
|
# IMPORTANT: The default `bash` in macOS is outdated, run with zsh or install the latest `bash` via Homebrew
|
||||||
|
|
||||||
|
set -e # Exit immediately if a command exits with a non-zero status
|
||||||
|
|
||||||
|
DOTFILES="${DOTFILES:-$HOME/.dotfiles}"
|
||||||
|
ZDOTDIR="${ZDOTDIR:-$HOME/.config/zsh}"
|
||||||
|
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
|
NPM_CONFIG_USERCONFIG="${NPM_CONFIG_USERCONFIG:-$XDG_CONFIG_HOME/npm/npmrc}"
|
||||||
|
|
||||||
|
mkdir -p $ZDOTDIR/plugins
|
||||||
|
|
||||||
|
echo "[INFO] Setting up system-wide zsh configuration"
|
||||||
|
echo "[ACTION] Elevation required!"
|
||||||
|
test -f "/etc/zsh/zshenv" && sudo cp "$DOTFILES/tools/zsh/zshenv" "/etc/zsh/zshenv"
|
||||||
|
test -f "/etc/zshenv" && sudo cp "$DOTFILES/tools/zsh/zshenv" "/etc/zshenv"
|
||||||
|
|
||||||
|
declare -A linkDots
|
||||||
|
|
||||||
|
linkDots=(
|
||||||
|
["$DOTFILES/common/condarc.yaml"]="$XDG_CONFIG_HOME/conda/.condarc"
|
||||||
|
# ["$DOTFILES/common/gitconfig"]="$XDG_CONFIG_HOME/git/config"
|
||||||
|
["$DOTFILES/common/glow.yaml"]="$HOME/.config/glow/config.yml"
|
||||||
|
["$DOTFILES/common/haskeline"]="$HOME/.haskeline"
|
||||||
|
["$DOTFILES/common/ideavimrc"]="$XDG_CONFIG_HOME/ideavim/ideavimrc"
|
||||||
|
["$DOTFILES/common/lazygit.yaml"]="$XDG_CONFIG_HOME/lazygit/config.yml"
|
||||||
|
["$DOTFILES/common/lesskey"]="$XDG_CONFIG_HOME/lesskey"
|
||||||
|
["$DOTFILES/common/npmrc"]="$NPM_CONFIG_USERCONFIG"
|
||||||
|
["$DOTFILES/common/NuGet.Config"]="$XDG_CONFIG_HOME/NuGet/NuGet.Config"
|
||||||
|
["$DOTFILES/common/pip.conf"]="$XDG_CONFIG_HOME/pip/pip.conf"
|
||||||
|
["$DOTFILES/common/starship.toml"]="$HOME/.config/starship.toml"
|
||||||
|
["$DOTFILES/common/tmux.conf"]="$XDG_CONFIG_HOME/tmux/tmux.conf"
|
||||||
|
["$DOTFILES/common/vimrc"]="$XDG_CONFIG_HOME/vim/vimrc"
|
||||||
|
["$DOTFILES/common/zellij.config.kdl"]="$HOME/.config/zellij/config.kdl"
|
||||||
|
["$DOTFILES/tools/emacs.d"]="$HOME/.emacs.d"
|
||||||
|
["$DOTFILES/tools/fish"]="$HOME/.config/fish"
|
||||||
|
["$DOTFILES/tools/ipython"]="$XDG_CONFIG_HOME/ipython"
|
||||||
|
["$DOTFILES/tools/nvim"]="$XDG_CONFIG_HOME/nvim"
|
||||||
|
["$DOTFILES/tools/wezterm"]="$HOME/.config/wezterm"
|
||||||
|
["$DOTFILES/tools/yazi"]="$HOME/.config/yazi"
|
||||||
|
["$DOTFILES/tools/zed"]="$HOME/.config/zed"
|
||||||
|
["$DOTFILES/tools/zsh/common.zshrc"]="$ZDOTDIR/.zshrc"
|
||||||
|
["$DOTFILES/tools/zsh/.zshenv"]="$ZDOTDIR/.zshenv"
|
||||||
|
)
|
||||||
|
|
||||||
|
if [ $(uname) = "Darwin" ]; then
|
||||||
|
linkDots+=(
|
||||||
|
["$DOTFILES/platforms/mac/karabiner"]="$HOME/.config/karabiner"
|
||||||
|
["$DOTFILES/platforms/mac/skhdrc"]="$XDG_CONFIG_HOME/skhd/skhdrc"
|
||||||
|
["$DOTFILES/platforms/mac/sketchybarrc"]="$XDG_CONFIG_HOME/sketchybar/sketchybarrc"
|
||||||
|
["$DOTFILES/platforms/mac/yabairc"]="$XDG_CONFIG_HOME/yabai/yabairc"
|
||||||
|
)
|
||||||
|
else
|
||||||
|
linkDots+=(
|
||||||
|
["$DOTFILES/common/inputrc"]="$HOME/.inputrc"
|
||||||
|
)
|
||||||
|
if [ -n "$WSL_DISTRO_NAME" ]; then
|
||||||
|
else
|
||||||
|
linkDots+=(
|
||||||
|
["$DOTFILES/platforms/linux/awesome"]="$HOME/.config/awesome"
|
||||||
|
["$DOTFILES/platforms/linux/hypr"]="$HOME/.config/hypr"
|
||||||
|
["$DOTFILES/platforms/linux/waybar"]="$HOME/.config/waybar"
|
||||||
|
["$DOTFILES/platforms/linux/wlogout"]="$HOME/.config/wlogout"
|
||||||
|
["$DOTFILES/platforms/linux/mako-config"]="$HOME/.config/mako/config"
|
||||||
|
)
|
||||||
|
for kde in "$DOTFILES/platforms/linux/kde/"*; do
|
||||||
|
linkDots=["$kde"]="$HOME/.config/kde/$(basename $kde)"
|
||||||
|
# echo "Linking $kde to $HOME/.config/kde/$(basename $kde)"
|
||||||
|
done
|
||||||
|
echo "[INFO] Setting up system environment variables"
|
||||||
|
echo "[ACTION] Elevation required!"
|
||||||
|
sudo cp "$DOTFILES/platforms/linux/etc/environment" "/etc/environment"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[INFO] Setting up symbolic links"
|
||||||
|
for src in "${!linkDots[@]}"; do
|
||||||
|
dest="${linkDots[$src]}"
|
||||||
|
if [ -d "$src" ]; then
|
||||||
|
mv $dest $dest.bak
|
||||||
|
mkdir -p $dest
|
||||||
|
ln -sf $src $dest
|
||||||
|
elif [ -f "$src" ]; then
|
||||||
|
dest_parent=$(dirname $dest)
|
||||||
|
mkdir -p $dest_parent
|
||||||
|
ln -sf $src $dest
|
||||||
|
else
|
||||||
|
echo "[ERROR] $src does not exist"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[INFO] Installing zsh plugins"
|
||||||
|
git clone --depth 1 https://github.com/zsh-users/zsh-autosuggestions.git $ZDOTDIR/plugins/zsh-autosuggestions
|
||||||
|
git clone --depth 1 https://github.com/zsh-users/zsh-syntax-highlighting.git $ZDOTDIR/plugins/zsh-syntax-highlighting
|
||||||
|
git clone --depth 1 https://github.com/zsh-users/zsh-history-substring-search.git $ZDOTDIR/plugins/zsh-history-substring-search
|
||||||
|
|
||||||
|
echo "[INFO] Copying example files"
|
||||||
|
cp $DOTFILES/common/gitconfig.example $XDG_CONFIG_HOME/git/config
|
||||||
|
|
||||||
|
export ZDOTDIR
|
||||||
|
export DOTFILES
|
||||||
|
export NPM_CONFIG_USERCONFIG
|
||||||
|
|
@ -4,45 +4,64 @@
|
||||||
# Set symlinks for dotfiles on Windows
|
# Set symlinks for dotfiles on Windows
|
||||||
# 在 Windows 上设置 配置文件的符号链接
|
# 在 Windows 上设置 配置文件的符号链接
|
||||||
|
|
||||||
|
# Run this with Administrator privileges
|
||||||
|
|
||||||
$DOTFILES = Join-Path $Env:UserProfile ".dotfiles"
|
$DOTFILES = Join-Path $Env:UserProfile ".dotfiles"
|
||||||
$BASE_COMMON = Join-Path $DOTFILES "common"
|
$BASE_COMMON = Join-Path $DOTFILES "common"
|
||||||
$BASE_TOOLS = Join-Path $DOTFILES "tools"
|
$BASE_TOOLS = Join-Path $DOTFILES "tools"
|
||||||
$BASE_WIN = Join-Path $DOTFILES "platforms" "win"
|
$BASE_WIN = Join-Path $DOTFILES "platforms" "win"
|
||||||
$STARTUP = [System.Environment]::GetFolderPath("Startup")
|
$STARTUP = [System.Environment]::GetFolderPath("Startup")
|
||||||
|
|
||||||
|
$BAT_CONF = Join-Path $Env:AppData "bat" "config"
|
||||||
|
if ((Get-Command bat).Source -ccontains "scoop") {
|
||||||
|
$BAT_CONF = Join-Path (scoop prefix bat) "config"
|
||||||
|
}
|
||||||
|
|
||||||
$linkDots = @{
|
$linkDots = @{
|
||||||
"$BASE_WIN\wslconfig" = "$Env:UserProfile\.wslconfig"
|
"$BASE_WIN\wslconfig" = "$Env:UserProfile\.wslconfig"
|
||||||
"$BASE_WIN\glzr" = "$Env:UserProfile\.glzr"
|
"$BASE_WIN\glzr" = "$Env:UserProfile\.glzr"
|
||||||
"$BASE_WIN\neovide.toml" = "$Env:AppData\neovide\config.toml"
|
"$BASE_WIN\neovide.toml" = "$Env:AppData\neovide\config.toml"
|
||||||
"$BASE_WIN\vsvimrc" = "$Env:UserProfile\.vsvimrc"
|
"$BASE_WIN\vsvimrc" = "$Env:UserProfile\.vsvimrc"
|
||||||
|
"$BASE_COMMON\bat.config" = "$BAT_CONF"
|
||||||
"$BASE_COMMON\condarc.yaml" = "$Env:XDG_CONFIG_HOME\conda\.condarc"
|
"$BASE_COMMON\condarc.yaml" = "$Env:XDG_CONFIG_HOME\conda\.condarc"
|
||||||
"$BASE_COMMON\gitconfig" = "$Env:UserProfile\.gitconfig"
|
|
||||||
"$BASE_COMMON\glow.yaml" = "$Env:AppData\glow\glow.yml"
|
"$BASE_COMMON\glow.yaml" = "$Env:AppData\glow\glow.yml"
|
||||||
"$BASE_COMMON\haskeline" = "$Env:UserProfile\.haskeline"
|
"$BASE_COMMON\haskeline" = "$Env:UserProfile\.haskeline"
|
||||||
"$BASE_COMMON\ideavimrc" = "$Env:XDG_CONFIG_HOME\ideavim\ideavimrc"
|
"$BASE_COMMON\ideavimrc" = "$Env:XDG_CONFIG_HOME\ideavim\ideavimrc"
|
||||||
|
"$BASE_COMMON\lazygit.yaml" = "$Env:AppData\lazygit\config.yml"
|
||||||
"$BASE_COMMON\lesskey" = "$Env:LessKeyIn"
|
"$BASE_COMMON\lesskey" = "$Env:LessKeyIn"
|
||||||
|
"$BASE_COMMON\lsd" = "$Env:AppData\lsd\config.yaml"
|
||||||
"$BASE_COMMON\npmrc" = "$Env:NPM_CONFIG_USERCONFIG"
|
"$BASE_COMMON\npmrc" = "$Env:NPM_CONFIG_USERCONFIG"
|
||||||
"$BASE_COMMON\NuGet.Config" = "$Env:AppData\NuGet\NuGet.Config"
|
"$BASE_COMMON\NuGet.Config" = "$Env:AppData\NuGet\NuGet.Config"
|
||||||
"$BASE_COMMON\starship.toml" = "$Env:UserProfile\.config\starship.toml"
|
"$BASE_COMMON\starship.toml" = "$Env:UserProfile\.config\starship.toml"
|
||||||
"$BASE_COMMON\pip.conf" = "$Env:AppData\pip\pip.ini"
|
"$BASE_COMMON\pip.conf" = "$Env:AppData\pip\pip.ini"
|
||||||
"$BASE_COMMON\vimrc.noxdg.vimrc" = "$Env:UserProfile\_vimrc"
|
"$BASE_COMMON\vimrc.noxdg.vimrc" = "$Env:UserProfile\_vimrc"
|
||||||
"$BASE_TOOLS\ipython" = "$Env:IPYTHONDIR"
|
"$BASE_COMMON\emacs.d" = "$Env:AppData\.emacs.d"
|
||||||
"$BASE_TOOLS\ipython" = "$Env:IPYTHONDIR"
|
"$BASE_TOOLS\ipython" = "$Env:IPYTHONDIR"
|
||||||
"$BASE_TOOLS\nvim" = "$Env:XDG_CONFIG_HOME\nvim"
|
"$BASE_TOOLS\nvim" = "$Env:XDG_CONFIG_HOME\nvim"
|
||||||
|
"$BASE_TOOLS\wezterm" = "$Env:XDG_CONFIG_HOME\wezterm"
|
||||||
|
"$BASE_TOOLS\yazi" = "$Env:AppData\yazi\config"
|
||||||
|
"$BASE_TOOLS\zed" = "$Env:AppData\Zed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach ($target in $linkDots.Keys) {
|
foreach ($src in $linkDots.Keys) {
|
||||||
$path = $linkDots[$target]
|
$dest = $linkDots[$src]
|
||||||
# Auto create directories (Untested)
|
# Auto create directories (Untested)
|
||||||
$dir = Split-Path $path
|
if (Test-Path -Path $src -PathType Container) {
|
||||||
if (!(Test-Path $dir)) {
|
New-Item -ItemType Directory -Path $dest -Force
|
||||||
New-Item -ItemType Directory -Path $dir -Force
|
|
||||||
}
|
}
|
||||||
New-Item -ItemType SymbolicLink -Target $target -Path $path -Force
|
else {
|
||||||
|
$Local:destParent = Split-Path -Path $dest -Parent
|
||||||
|
New-Item -ItemType Directory -Path $destParent -Force
|
||||||
|
}
|
||||||
|
if (Test-Path -Path $dest) {
|
||||||
|
Move-Item $dest "$dest.bak" -Force
|
||||||
|
}
|
||||||
|
New-Item -ItemType SymbolicLink -Target $src -Path $dest -Force
|
||||||
}
|
}
|
||||||
|
|
||||||
New-Item -ItemType SymbolicLink -Target "$BASE_WIN\Microsoft.PowerShell_profile.ps1" -Path "$Env:UserProfile\Documents\PowerShell\Microsoft.PowerShell_profile.ps1" -Force
|
New-Item -ItemType SymbolicLink -Target "$BASE_WIN\Microsoft.PowerShell_profile.ps1" -Path "$Env:UserProfile\Documents\PowerShell\Microsoft.PowerShell_profile.ps1" -Force
|
||||||
|
|
||||||
Copy-Item (Join-Path $BASE_WIN "ahk" "bin" "Caps.exe") $STARTUP
|
Copy-Item (Join-Path $BASE_WIN "ahk" "bin" "Caps.exe") $STARTUP
|
||||||
|
Copy-Item (Join-Path $BASE_COMMON "gitconfig") $Env:UserProfile
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
set -e
|
|
||||||
ZDOTDIR="${ZDOTDIR:-$XDG_CONFIG_HOME/zsh}"
|
|
||||||
mkdir -p $ZDOTDIR/plugins
|
|
||||||
|
|
||||||
#plugins=(
|
|
||||||
# "zsh-autosuggestions"
|
|
||||||
# "zsh-syntax-highlighting"
|
|
||||||
# "zsh-history-substring-search"
|
|
||||||
#)
|
|
||||||
git clone --depth 1 https://github.com/zsh-users/zsh-autosuggestions.git $ZDOTDIR/plugins/zsh-autosuggestions
|
|
||||||
git clone --depth 1 https://github.com/zsh-users/zsh-syntax-highlighting.git $ZDOTDIR/plugins/zsh-syntax-highlighting
|
|
||||||
git clone --depth 1 https://github.com/zsh-users/zsh-history-substring-search.git $ZDOTDIR/plugins/zsh-history-substring-search
|
|
||||||
|
|
@ -4,7 +4,9 @@
|
||||||
|
|
||||||
# Location;
|
# Location;
|
||||||
# Unix: $XDG_CONFIG_HOME/bat/config
|
# Unix: $XDG_CONFIG_HOME/bat/config
|
||||||
# Windows: %AppData%\bat\config
|
# Windows:
|
||||||
|
# - Default: %AppData%\bat\config
|
||||||
|
# - Portable: (scoop prefix bat) + config
|
||||||
# Linking:
|
# Linking:
|
||||||
# ln -sf $DOTFILES/common/bat.config $XDG_CONFIG_HOME/bat/config
|
# ln -sf $DOTFILES/common/bat.config $XDG_CONFIG_HOME/bat/config
|
||||||
|
|
||||||
|
|
@ -33,3 +35,6 @@
|
||||||
# Example 2: Use ".gitignore"-style highlighting for ".ignore" files
|
# Example 2: Use ".gitignore"-style highlighting for ".ignore" files
|
||||||
#--map-syntax "*.ino:C++"
|
#--map-syntax "*.ino:C++"
|
||||||
#--map-syntax ".ignore:Git Ignore"
|
#--map-syntax ".ignore:Git Ignore"
|
||||||
|
|
||||||
|
# Squeeze consecutive empty lines
|
||||||
|
--squeeze-blank
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,6 @@
|
||||||
# ================================================================================
|
# ================================================================================
|
||||||
# Reference:
|
# Reference:
|
||||||
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html
|
# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html
|
||||||
|
|
||||||
|
# Use system python by default for better script compatibility
|
||||||
auto_activate_base: false
|
auto_activate_base: false
|
||||||
|
|
|
||||||
|
|
@ -12,14 +12,17 @@
|
||||||
email = whoami@example.com
|
email = whoami@example.com
|
||||||
[alias]
|
[alias]
|
||||||
cl = clone
|
cl = clone
|
||||||
clnh = clone --depth 1
|
clnh = clone --depth 1 # Clone with no history
|
||||||
cma = commit -am
|
cma = commit -am # Add and commit
|
||||||
logs = log --oneline --graph --decorate --all
|
logs = log --oneline --graph --decorate --all # Show logs
|
||||||
last = log -1 HEAD
|
last = log -1 HEAD # Show last commit
|
||||||
undo = reset --hard HEAD
|
undo = reset --hard HEAD # Undo the last commit
|
||||||
[core]
|
[core]
|
||||||
editor = nvim
|
editor = nvim
|
||||||
pager = delta
|
pager = delta
|
||||||
|
# autocrlf:
|
||||||
|
# true: Keep crlf in Windows, lf in *nix
|
||||||
|
# input: Keep lf in all platforms
|
||||||
autocrlf = input
|
autocrlf = input
|
||||||
safecrlf = true
|
safecrlf = true
|
||||||
excludesfile = $XDG_CONFIG_HOME/git/ignore
|
excludesfile = $XDG_CONFIG_HOME/git/ignore
|
||||||
|
|
@ -36,7 +39,7 @@
|
||||||
[delta]
|
[delta]
|
||||||
navigate = true
|
navigate = true
|
||||||
dark = true
|
dark = true
|
||||||
features = catppuccin-mocha
|
features = catppuccin-mocha # Colorscheme
|
||||||
[diff]
|
[diff]
|
||||||
tool = nvimdiff
|
tool = nvimdiff
|
||||||
[difftool]
|
[difftool]
|
||||||
|
|
@ -61,6 +64,9 @@
|
||||||
process = git-lfs filter-process
|
process = git-lfs filter-process
|
||||||
required = true
|
required = true
|
||||||
# Force ssh
|
# Force ssh
|
||||||
|
# Don't use ssh in GitHub since ssh-agent doesn't work in non-interactive environment
|
||||||
|
# While GitHub holds many plugins, it's better to use https
|
||||||
|
# This prevents from Neovide `publickey` error when installing plugins
|
||||||
# [url "git@github.com:"]
|
# [url "git@github.com:"]
|
||||||
# insteadOf = https://github.com/
|
# insteadOf = https://github.com/
|
||||||
[url "git@codeberg.org:"]
|
[url "git@codeberg.org:"]
|
||||||
|
|
|
||||||
|
|
@ -9,20 +9,58 @@
|
||||||
# Linking:
|
# Linking:
|
||||||
# ln -sf $DOTFILES/common/inputrc ~/.inputrc
|
# ln -sf $DOTFILES/common/inputrc ~/.inputrc
|
||||||
|
|
||||||
|
# Use `man readline` to see all the options
|
||||||
|
# Reference: https://wiki.archlinux.org/title/Readline
|
||||||
|
|
||||||
# Colemak Key Remaps
|
# Colemak Key Remaps
|
||||||
set editing-mode vi
|
set editing-mode vi
|
||||||
set keymap vi
|
|
||||||
set show-mode-in-prompt on
|
|
||||||
|
|
||||||
set mark-directories on
|
set mark-directories on
|
||||||
set completion-ignore-case on
|
set completion-ignore-case on
|
||||||
|
# show all completions on a double tab without ringing the bell
|
||||||
set show-all-if-ambiguous on
|
set show-all-if-ambiguous on
|
||||||
|
# do not bell on tab-completion
|
||||||
set bell-style none
|
set bell-style none
|
||||||
|
|
||||||
|
|
||||||
|
# 34 - blue, 32 - green
|
||||||
|
set show-mode-in-prompt on
|
||||||
|
set vi-cmd-mode-string \1\e[1;34m\2N\1\e[0m\2
|
||||||
|
set vi-ins-mode-string \1\e[1;32m\2I\1\e[0m\2
|
||||||
|
set emacs-mode-string \1\e[1;32m\2@\1\e[0m\2
|
||||||
|
|
||||||
$if mode=vi
|
$if mode=vi
|
||||||
|
set keymap vi-command
|
||||||
"n": next-history
|
"n": next-history
|
||||||
"e": previous-history
|
"e": previous-history
|
||||||
"l": vi-insertion-mode
|
"l": vi-insertion-mode
|
||||||
"L": vi-insert-beg
|
"L": vi-insert-beg
|
||||||
"i": forward-char
|
"i": forward-char
|
||||||
|
"H": vi-first-print
|
||||||
|
"I": end-of-line
|
||||||
|
set keymap vi-insert
|
||||||
|
# Hybrid (Emacs) binds in Vi-Insert
|
||||||
|
# C-a as ^ instead of 0
|
||||||
|
"\C-a": vi-first-print
|
||||||
|
"\C-e": end-of-line
|
||||||
|
"\C-n": next-history
|
||||||
|
"\C-p": previous-history
|
||||||
|
# Bash will parse <C-Backspace> to C-h
|
||||||
|
"\C-h": unix-word-rubout
|
||||||
$endif
|
$endif
|
||||||
|
|
||||||
|
|
||||||
|
# Color files by types
|
||||||
|
# Note that this may cause completion text blink in some terminals (e.g. xterm).
|
||||||
|
set colored-stats On
|
||||||
|
# Append char to indicate type
|
||||||
|
set visible-stats On
|
||||||
|
# Mark symlinked directories
|
||||||
|
set mark-symlinked-directories On
|
||||||
|
# Color the common prefix
|
||||||
|
set colored-completion-prefix On
|
||||||
|
# Color the common prefix in menu-complete
|
||||||
|
set menu-complete-display-prefix On
|
||||||
|
|
||||||
|
# This will disable `^C` shown in the prompt when pressing `Ctrl+C`
|
||||||
|
set echo-control-characters off
|
||||||
|
|
|
||||||
|
|
@ -11,308 +11,308 @@
|
||||||
yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json
|
yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json
|
||||||
# Config relating to the Lazygit UI
|
# Config relating to the Lazygit UI
|
||||||
gui:
|
gui:
|
||||||
# The number of lines you scroll by when scrolling the main window
|
# The number of lines you scroll by when scrolling the main window
|
||||||
scrollHeight: 2
|
scrollHeight: 2
|
||||||
# If true, allow scrolling past the bottom of the content in the main window
|
# If true, allow scrolling past the bottom of the content in the main window
|
||||||
scrollPastBottom: true
|
scrollPastBottom: true
|
||||||
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#scroll-off-margin
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#scroll-off-margin
|
||||||
scrollOffMargin: 2
|
scrollOffMargin: 2
|
||||||
# One of: 'margin' (default) | 'jump'
|
# One of: 'margin' (default) | 'jump'
|
||||||
scrollOffBehavior: margin
|
scrollOffBehavior: margin
|
||||||
# If true, capture mouse events.
|
# If true, capture mouse events.
|
||||||
# When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.
|
# When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS.
|
||||||
mouseEvents: true
|
mouseEvents: true
|
||||||
# If true, do not show a warning when discarding changes in the staging view.
|
# If true, do not show a warning when discarding changes in the staging view.
|
||||||
skipDiscardChangeWarning: false
|
skipDiscardChangeWarning: false
|
||||||
# If true, do not show warning when applying/popping the stash
|
# If true, do not show warning when applying/popping the stash
|
||||||
skipStashWarning: false
|
skipStashWarning: false
|
||||||
# If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files.
|
# If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files.
|
||||||
skipNoStagedFilesWarning: false
|
skipNoStagedFilesWarning: false
|
||||||
# If true, do not show a warning when rewording a commit via an external editor
|
# If true, do not show a warning when rewording a commit via an external editor
|
||||||
skipRewordInEditorWarning: false
|
skipRewordInEditorWarning: false
|
||||||
# Fraction of the total screen width to use for the left side section. You may want to pick a small number (e.g. 0.2) if you're using a narrow screen, so that you can see more of the main section.
|
# Fraction of the total screen width to use for the left side section. You may want to pick a small number (e.g. 0.2) if you're using a narrow screen, so that you can see more of the main section.
|
||||||
# Number from 0 to 1.0.
|
# Number from 0 to 1.0.
|
||||||
sidePanelWidth: 0.3333
|
sidePanelWidth: 0.3333
|
||||||
# If true, increase the height of the focused side window; creating an accordion effect.
|
# If true, increase the height of the focused side window; creating an accordion effect.
|
||||||
expandFocusedSidePanel: false
|
expandFocusedSidePanel: false
|
||||||
# The weight of the expanded side panel, relative to the other panels. 2 means
|
# The weight of the expanded side panel, relative to the other panels. 2 means
|
||||||
# twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.
|
# twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true.
|
||||||
expandedSidePanelWeight: 2
|
expandedSidePanelWeight: 2
|
||||||
# Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split.
|
# Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split.
|
||||||
# Options are:
|
# Options are:
|
||||||
# - 'horizontal': split the window horizontally
|
# - 'horizontal': split the window horizontally
|
||||||
# - 'vertical': split the window vertically
|
# - 'vertical': split the window vertically
|
||||||
# - 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically
|
# - 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically
|
||||||
mainPanelSplitMode: flexible
|
mainPanelSplitMode: flexible
|
||||||
# How the window is split when in half screen mode (i.e. after hitting '+' once).
|
# How the window is split when in half screen mode (i.e. after hitting '+' once).
|
||||||
# Possible values:
|
# Possible values:
|
||||||
# - 'left': split the window horizontally (side panel on the left, main view on the right)
|
# - 'left': split the window horizontally (side panel on the left, main view on the right)
|
||||||
# - 'top': split the window vertically (side panel on top, main view below)
|
# - 'top': split the window vertically (side panel on top, main view below)
|
||||||
enlargedSideViewLocation: left
|
enlargedSideViewLocation: left
|
||||||
# One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru'
|
# One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru'
|
||||||
language: auto
|
language: auto
|
||||||
# Format used when displaying time e.g. commit time.
|
# Format used when displaying time e.g. commit time.
|
||||||
# Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
|
# Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
|
||||||
timeFormat: 02 Jan 06
|
timeFormat: 02 Jan 06
|
||||||
# Format used when displaying time if the time is less than 24 hours ago.
|
# Format used when displaying time if the time is less than 24 hours ago.
|
||||||
# Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
|
# Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
|
||||||
shortTimeFormat: 3:04PM
|
shortTimeFormat: 3:04PM
|
||||||
# Config relating to colors and styles.
|
# Config relating to colors and styles.
|
||||||
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes
|
||||||
theme:
|
theme:
|
||||||
activeBorderColor:
|
activeBorderColor:
|
||||||
- '#b4befe'
|
- "#b4befe"
|
||||||
- bold
|
- bold
|
||||||
inactiveBorderColor:
|
inactiveBorderColor:
|
||||||
- '#a6adc8'
|
- "#a6adc8"
|
||||||
optionsTextColor:
|
optionsTextColor:
|
||||||
- '#89b4fa'
|
- "#89b4fa"
|
||||||
selectedLineBgColor:
|
selectedLineBgColor:
|
||||||
- '#313244'
|
- "#313244"
|
||||||
cherryPickedCommitBgColor:
|
cherryPickedCommitBgColor:
|
||||||
- '#45475a'
|
- "#45475a"
|
||||||
cherryPickedCommitFgColor:
|
cherryPickedCommitFgColor:
|
||||||
- '#b4befe'
|
- "#b4befe"
|
||||||
unstagedChangesColor:
|
unstagedChangesColor:
|
||||||
- '#f38ba8'
|
- "#f38ba8"
|
||||||
defaultFgColor:
|
defaultFgColor:
|
||||||
- '#cdd6f4'
|
- "#cdd6f4"
|
||||||
searchingActiveBorderColor:
|
searchingActiveBorderColor:
|
||||||
- '#f9e2af'
|
- "#f9e2af"
|
||||||
|
|
||||||
authorColors:
|
authorColors:
|
||||||
'*': '#b4befe'
|
"*": "#b4befe"
|
||||||
# Background color of selected line when view doesn't have focus.
|
# Background color of selected line when view doesn't have focus.
|
||||||
inactiveViewSelectedLineBgColor:
|
inactiveViewSelectedLineBgColor:
|
||||||
- bold
|
- bold
|
||||||
# Foreground color of marked base commit (for rebase)
|
# Foreground color of marked base commit (for rebase)
|
||||||
markedBaseCommitFgColor:
|
markedBaseCommitFgColor:
|
||||||
- blue
|
- blue
|
||||||
# Background color of marked base commit (for rebase)
|
# Background color of marked base commit (for rebase)
|
||||||
markedBaseCommitBgColor:
|
markedBaseCommitBgColor:
|
||||||
- yellow
|
- yellow
|
||||||
# Config relating to the commit length indicator
|
# Config relating to the commit length indicator
|
||||||
commitLength:
|
commitLength:
|
||||||
# If true, show an indicator of commit message length
|
# If true, show an indicator of commit message length
|
||||||
show: true
|
show: true
|
||||||
# If true, show the '5 of 20' footer at the bottom of list views
|
# If true, show the '5 of 20' footer at the bottom of list views
|
||||||
showListFooter: true
|
showListFooter: true
|
||||||
# If true, display the files in the file views as a tree. If false, display the files as a flat list.
|
# If true, display the files in the file views as a tree. If false, display the files as a flat list.
|
||||||
# This can be toggled from within Lazygit with the '~' key, but that will not change the default.
|
# This can be toggled from within Lazygit with the '~' key, but that will not change the default.
|
||||||
showFileTree: true
|
showFileTree: true
|
||||||
# If true, show the number of lines changed per file in the Files view
|
# If true, show the number of lines changed per file in the Files view
|
||||||
showNumstatInFilesView: false
|
showNumstatInFilesView: false
|
||||||
# If true, show a random tip in the command log when Lazygit starts
|
# If true, show a random tip in the command log when Lazygit starts
|
||||||
showRandomTip: true
|
showRandomTip: true
|
||||||
# If true, show the command log
|
# If true, show the command log
|
||||||
showCommandLog: true
|
showCommandLog: true
|
||||||
# If true, show the bottom line that contains keybinding info and useful buttons. If false, this line will be hidden except to display a loader for an in-progress action.
|
# If true, show the bottom line that contains keybinding info and useful buttons. If false, this line will be hidden except to display a loader for an in-progress action.
|
||||||
showBottomLine: true
|
showBottomLine: true
|
||||||
# If true, show jump-to-window keybindings in window titles.
|
# If true, show jump-to-window keybindings in window titles.
|
||||||
showPanelJumps: true
|
showPanelJumps: true
|
||||||
# Deprecated: use nerdFontsVersion instead
|
# Deprecated: use nerdFontsVersion instead
|
||||||
showIcons: false
|
showIcons: false
|
||||||
# Nerd fonts version to use.
|
# Nerd fonts version to use.
|
||||||
# One of: '2' | '3' | empty string (default)
|
# One of: '2' | '3' | empty string (default)
|
||||||
# If empty, do not show icons.
|
# If empty, do not show icons.
|
||||||
nerdFontsVersion: ""
|
nerdFontsVersion: "3"
|
||||||
# If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty.
|
# If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty.
|
||||||
showFileIcons: true
|
showFileIcons: true
|
||||||
# Length of author name in (non-expanded) commits view. 2 means show initials only.
|
# Length of author name in (non-expanded) commits view. 2 means show initials only.
|
||||||
commitAuthorShortLength: 2
|
commitAuthorShortLength: 2
|
||||||
# Length of author name in expanded commits view. 2 means show initials only.
|
# Length of author name in expanded commits view. 2 means show initials only.
|
||||||
commitAuthorLongLength: 17
|
commitAuthorLongLength: 17
|
||||||
# Length of commit hash in commits view. 0 shows '*' if NF icons aren't on.
|
# Length of commit hash in commits view. 0 shows '*' if NF icons aren't on.
|
||||||
commitHashLength: 8
|
commitHashLength: 8
|
||||||
# If true, show commit hashes alongside branch names in the branches view.
|
# If true, show commit hashes alongside branch names in the branches view.
|
||||||
showBranchCommitHash: false
|
showBranchCommitHash: false
|
||||||
# Whether to show the divergence from the base branch in the branches view.
|
# Whether to show the divergence from the base branch in the branches view.
|
||||||
# One of: 'none' | 'onlyArrow' | 'arrowAndNumber'
|
# One of: 'none' | 'onlyArrow' | 'arrowAndNumber'
|
||||||
showDivergenceFromBaseBranch: none
|
showDivergenceFromBaseBranch: none
|
||||||
# Height of the command log view
|
# Height of the command log view
|
||||||
commandLogSize: 8
|
commandLogSize: 8
|
||||||
# Whether to split the main window when viewing file changes.
|
# Whether to split the main window when viewing file changes.
|
||||||
# One of: 'auto' | 'always'
|
# One of: 'auto' | 'always'
|
||||||
# If 'auto', only split the main window when a file has both staged and unstaged changes
|
# If 'auto', only split the main window when a file has both staged and unstaged changes
|
||||||
splitDiff: auto
|
splitDiff: auto
|
||||||
# Default size for focused window. Window size can be changed from within Lazygit with '+' and '_' (but this won't change the default).
|
# Default size for focused window. Window size can be changed from within Lazygit with '+' and '_' (but this won't change the default).
|
||||||
# One of: 'normal' (default) | 'half' | 'full'
|
# One of: 'normal' (default) | 'half' | 'full'
|
||||||
screenMode: normal
|
screenMode: normal
|
||||||
# Window border style.
|
# Window border style.
|
||||||
# One of 'rounded' (default) | 'single' | 'double' | 'hidden'
|
# One of 'rounded' (default) | 'single' | 'double' | 'hidden'
|
||||||
border: rounded
|
border: rounded
|
||||||
# If true, show a seriously epic explosion animation when nuking the working tree.
|
# If true, show a seriously epic explosion animation when nuking the working tree.
|
||||||
animateExplosion: true
|
animateExplosion: true
|
||||||
# Whether to stack UI components on top of each other.
|
# Whether to stack UI components on top of each other.
|
||||||
# One of 'auto' (default) | 'always' | 'never'
|
# One of 'auto' (default) | 'always' | 'never'
|
||||||
portraitMode: auto
|
portraitMode: auto
|
||||||
# How things are filtered when typing '/'.
|
# How things are filtered when typing '/'.
|
||||||
# One of 'substring' (default) | 'fuzzy'
|
# One of 'substring' (default) | 'fuzzy'
|
||||||
filterMode: substring
|
filterMode: substring
|
||||||
# Config relating to the spinner.
|
# Config relating to the spinner.
|
||||||
spinner:
|
spinner:
|
||||||
# The frames of the spinner animation.
|
# The frames of the spinner animation.
|
||||||
frames:
|
frames:
|
||||||
- "|"
|
- "|"
|
||||||
- /
|
- /
|
||||||
- "-"
|
- "-"
|
||||||
- \
|
- \
|
||||||
# The "speed" of the spinner in milliseconds.
|
# The "speed" of the spinner in milliseconds.
|
||||||
rate: 50
|
rate: 50
|
||||||
# Status panel view.
|
# Status panel view.
|
||||||
# One of 'dashboard' (default) | 'allBranchesLog'
|
# One of 'dashboard' (default) | 'allBranchesLog'
|
||||||
statusPanelView: dashboard
|
statusPanelView: dashboard
|
||||||
# If true, jump to the Files panel after popping a stash
|
# If true, jump to the Files panel after popping a stash
|
||||||
switchToFilesAfterStashPop: true
|
switchToFilesAfterStashPop: true
|
||||||
# If true, jump to the Files panel after applying a stash
|
# If true, jump to the Files panel after applying a stash
|
||||||
switchToFilesAfterStashApply: true
|
switchToFilesAfterStashApply: true
|
||||||
# If true, when using the panel jump keys (default 1 through 5) and target panel is already active, go to next tab instead
|
# If true, when using the panel jump keys (default 1 through 5) and target panel is already active, go to next tab instead
|
||||||
switchTabsWithPanelJumpKeys: false
|
switchTabsWithPanelJumpKeys: false
|
||||||
# Config relating to git
|
# Config relating to git
|
||||||
git:
|
git:
|
||||||
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md
|
||||||
paging:
|
paging:
|
||||||
# Value of the --color arg in the git diff command. Some pagers want this to be set to 'always' and some want it set to 'never'
|
# Value of the --color arg in the git diff command. Some pagers want this to be set to 'always' and some want it set to 'never'
|
||||||
colorArg: always
|
colorArg: always
|
||||||
# e.g.
|
# e.g.
|
||||||
# diff-so-fancy
|
# diff-so-fancy
|
||||||
# delta --dark --paging=never
|
# delta --dark --paging=never
|
||||||
# ydiff -p cat -s --wrap --width={{columnWidth}}
|
# ydiff -p cat -s --wrap --width={{columnWidth}}
|
||||||
pager: "delta --dark --paging=never"
|
pager: "delta --dark --paging=never"
|
||||||
# If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
|
# If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
|
||||||
useConfig: false
|
useConfig: false
|
||||||
# e.g. 'difft --color=always'
|
# e.g. 'difft --color=always'
|
||||||
externalDiffCommand: ""
|
externalDiffCommand: ""
|
||||||
# Config relating to committing
|
# Config relating to committing
|
||||||
commit:
|
commit:
|
||||||
# If true, pass '--signoff' flag when committing
|
# If true, pass '--signoff' flag when committing
|
||||||
signOff: false
|
signOff: false
|
||||||
# Automatic WYSIWYG wrapping of the commit message as you type
|
# Automatic WYSIWYG wrapping of the commit message as you type
|
||||||
autoWrapCommitMessage: true
|
autoWrapCommitMessage: true
|
||||||
# If autoWrapCommitMessage is true, the width to wrap to
|
# If autoWrapCommitMessage is true, the width to wrap to
|
||||||
autoWrapWidth: 72
|
autoWrapWidth: 72
|
||||||
# Config relating to merging
|
# Config relating to merging
|
||||||
merging:
|
merging:
|
||||||
# If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang
|
# If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang
|
||||||
# Only applicable to unix users.
|
# Only applicable to unix users.
|
||||||
manualCommit: false
|
manualCommit: false
|
||||||
# Extra args passed to `git merge`, e.g. --no-ff
|
# Extra args passed to `git merge`, e.g. --no-ff
|
||||||
args: ""
|
args: ""
|
||||||
# The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders.
|
# The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders.
|
||||||
squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}}
|
squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}}
|
||||||
# list of branches that are considered 'main' branches, used when displaying commits
|
# list of branches that are considered 'main' branches, used when displaying commits
|
||||||
mainBranches:
|
mainBranches:
|
||||||
- master
|
- master
|
||||||
- main
|
- main
|
||||||
# Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks will be skipped when the commit message starts with 'WIP'
|
# Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks will be skipped when the commit message starts with 'WIP'
|
||||||
skipHookPrefix: WIP
|
skipHookPrefix: WIP
|
||||||
# If true, periodically fetch from remote
|
# If true, periodically fetch from remote
|
||||||
autoFetch: true
|
autoFetch: true
|
||||||
# If true, periodically refresh files and submodules
|
# If true, periodically refresh files and submodules
|
||||||
autoRefresh: true
|
autoRefresh: true
|
||||||
# If true, pass the --all arg to git fetch
|
# If true, pass the --all arg to git fetch
|
||||||
fetchAll: true
|
fetchAll: true
|
||||||
# If true, lazygit will automatically stage files that used to have merge
|
# If true, lazygit will automatically stage files that used to have merge
|
||||||
# conflicts but no longer do; and it will also ask you if you want to
|
# conflicts but no longer do; and it will also ask you if you want to
|
||||||
# continue a merge or rebase if you've resolved all conflicts. If false, it
|
# continue a merge or rebase if you've resolved all conflicts. If false, it
|
||||||
# won't do either of these things.
|
# won't do either of these things.
|
||||||
autoStageResolvedConflicts: true
|
autoStageResolvedConflicts: true
|
||||||
# Command used when displaying the current branch git log in the main window
|
# Command used when displaying the current branch git log in the main window
|
||||||
branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --
|
branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} --
|
||||||
# Command used to display git log of all branches in the main window.
|
# Command used to display git log of all branches in the main window.
|
||||||
# Deprecated: Use `allBranchesLogCmds` instead.
|
# Deprecated: Use `allBranchesLogCmds` instead.
|
||||||
allBranchesLogCmd: git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium
|
allBranchesLogCmd: git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium
|
||||||
# If true, do not spawn a separate process when using GPG
|
# If true, do not spawn a separate process when using GPG
|
||||||
overrideGpg: false
|
overrideGpg: false
|
||||||
# If true, do not allow force pushes
|
# If true, do not allow force pushes
|
||||||
disableForcePushing: false
|
disableForcePushing: false
|
||||||
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix
|
||||||
commitPrefix:
|
commitPrefix:
|
||||||
# pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*"
|
# pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*"
|
||||||
pattern: ""
|
pattern: ""
|
||||||
# Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] "
|
# Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] "
|
||||||
replace: ""
|
replace: ""
|
||||||
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-branch-name-prefix
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-branch-name-prefix
|
||||||
branchPrefix: ""
|
branchPrefix: ""
|
||||||
# If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀
|
# If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀
|
||||||
# (This should really be under 'gui', not 'git')
|
# (This should really be under 'gui', not 'git')
|
||||||
parseEmoji: false
|
parseEmoji: false
|
||||||
# Config for showing the log in the commits view
|
# Config for showing the log in the commits view
|
||||||
log:
|
log:
|
||||||
# One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'
|
# One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default'
|
||||||
# 'topo-order' makes it easier to read the git log graph, but commits may not
|
# 'topo-order' makes it easier to read the git log graph, but commits may not
|
||||||
# appear chronologically. See https://git-scm.com/docs/
|
# appear chronologically. See https://git-scm.com/docs/
|
||||||
#
|
#
|
||||||
# Deprecated: Configure this with `Log menu -> Commit sort order` (<c-l> in the commits window by default).
|
# Deprecated: Configure this with `Log menu -> Commit sort order` (<c-l> in the commits window by default).
|
||||||
order: topo-order
|
order: topo-order
|
||||||
# This determines whether the git graph is rendered in the commits panel
|
# This determines whether the git graph is rendered in the commits panel
|
||||||
# One of 'always' | 'never' | 'when-maximised'
|
# One of 'always' | 'never' | 'when-maximised'
|
||||||
#
|
#
|
||||||
# Deprecated: Configure this with `Log menu -> Show git graph` (<c-l> in the commits window by default).
|
# Deprecated: Configure this with `Log menu -> Show git graph` (<c-l> in the commits window by default).
|
||||||
showGraph: always
|
showGraph: always
|
||||||
# displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
|
# displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
|
||||||
showWholeGraph: false
|
showWholeGraph: false
|
||||||
# When copying commit hashes to the clipboard, truncate them to this
|
# When copying commit hashes to the clipboard, truncate them to this
|
||||||
# length. Set to 40 to disable truncation.
|
# length. Set to 40 to disable truncation.
|
||||||
truncateCopiedCommitHashesTo: 12
|
truncateCopiedCommitHashesTo: 12
|
||||||
# Periodic update checks
|
# Periodic update checks
|
||||||
update:
|
update:
|
||||||
# One of: 'prompt' (default) | 'background' | 'never'
|
# One of: 'prompt' (default) | 'background' | 'never'
|
||||||
method: prompt
|
method: prompt
|
||||||
# Period in days between update checks
|
# Period in days between update checks
|
||||||
days: 14
|
days: 14
|
||||||
# Background refreshes
|
# Background refreshes
|
||||||
refresher:
|
refresher:
|
||||||
# File/submodule refresh interval in seconds.
|
# File/submodule refresh interval in seconds.
|
||||||
# Auto-refresh can be disabled via option 'git.autoRefresh'.
|
# Auto-refresh can be disabled via option 'git.autoRefresh'.
|
||||||
refreshInterval: 10
|
refreshInterval: 10
|
||||||
# Re-fetch interval in seconds.
|
# Re-fetch interval in seconds.
|
||||||
# Auto-fetch can be disabled via option 'git.autoFetch'.
|
# Auto-fetch can be disabled via option 'git.autoFetch'.
|
||||||
fetchInterval: 60
|
fetchInterval: 60
|
||||||
# If true, show a confirmation popup before quitting Lazygit
|
# If true, show a confirmation popup before quitting Lazygit
|
||||||
confirmOnQuit: false
|
confirmOnQuit: false
|
||||||
# If true, exit Lazygit when the user presses escape in a context where there is nothing to cancel/close
|
# If true, exit Lazygit when the user presses escape in a context where there is nothing to cancel/close
|
||||||
quitOnTopLevelReturn: false
|
quitOnTopLevelReturn: false
|
||||||
# Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc
|
# Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc
|
||||||
os:
|
os:
|
||||||
# Command for editing a file. Should contain "{{filename}}".
|
# Command for editing a file. Should contain "{{filename}}".
|
||||||
edit: ""
|
edit: ""
|
||||||
# Command for editing a file at a given line number. Should contain
|
# Command for editing a file at a given line number. Should contain
|
||||||
# "{{filename}}", and may optionally contain "{{line}}".
|
# "{{filename}}", and may optionally contain "{{line}}".
|
||||||
editAtLine: ""
|
editAtLine: ""
|
||||||
# Same as EditAtLine, except that the command needs to wait until the
|
# Same as EditAtLine, except that the command needs to wait until the
|
||||||
# window is closed.
|
# window is closed.
|
||||||
editAtLineAndWait: ""
|
editAtLineAndWait: ""
|
||||||
# For opening a directory in an editor
|
# For opening a directory in an editor
|
||||||
openDirInEditor: ""
|
openDirInEditor: ""
|
||||||
# A built-in preset that sets all of the above settings. Supported presets
|
# A built-in preset that sets all of the above settings. Supported presets
|
||||||
# are defined in the getPreset function in editor_presets.go.
|
# are defined in the getPreset function in editor_presets.go.
|
||||||
editPreset: ""
|
editPreset: "nvim"
|
||||||
# Command for opening a file, as if the file is double-clicked. Should
|
# Command for opening a file, as if the file is double-clicked. Should
|
||||||
# contain "{{filename}}", but doesn't support "{{line}}".
|
# contain "{{filename}}", but doesn't support "{{line}}".
|
||||||
open: ""
|
open: ""
|
||||||
# Command for opening a link. Should contain "{{link}}".
|
# Command for opening a link. Should contain "{{link}}".
|
||||||
openLink: ""
|
openLink: ""
|
||||||
# EditCommand is the command for editing a file.
|
# EditCommand is the command for editing a file.
|
||||||
# Deprecated: use Edit instead. Note that semantics are different:
|
# Deprecated: use Edit instead. Note that semantics are different:
|
||||||
# EditCommand is just the command itself, whereas Edit contains a
|
# EditCommand is just the command itself, whereas Edit contains a
|
||||||
# "{{filename}}" variable.
|
# "{{filename}}" variable.
|
||||||
editCommand: ""
|
editCommand: ""
|
||||||
# EditCommandTemplate is the command template for editing a file
|
# EditCommandTemplate is the command template for editing a file
|
||||||
# Deprecated: use EditAtLine instead.
|
# Deprecated: use EditAtLine instead.
|
||||||
editCommandTemplate: ""
|
editCommandTemplate: ""
|
||||||
# OpenCommand is the command for opening a file
|
# OpenCommand is the command for opening a file
|
||||||
# Deprecated: use Open instead.
|
# Deprecated: use Open instead.
|
||||||
openCommand: ""
|
openCommand: ""
|
||||||
# OpenLinkCommand is the command for opening a link
|
# OpenLinkCommand is the command for opening a link
|
||||||
# Deprecated: use OpenLink instead.
|
# Deprecated: use OpenLink instead.
|
||||||
openLinkCommand: ""
|
openLinkCommand: ""
|
||||||
# CopyToClipboardCmd is the command for copying to clipboard.
|
# CopyToClipboardCmd is the command for copying to clipboard.
|
||||||
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
|
||||||
copyToClipboardCmd: ""
|
copyToClipboardCmd: ""
|
||||||
# ReadFromClipboardCmd is the command for reading the clipboard.
|
# ReadFromClipboardCmd is the command for reading the clipboard.
|
||||||
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
|
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard
|
||||||
readFromClipboardCmd: ""
|
readFromClipboardCmd: ""
|
||||||
# If true, don't display introductory popups upon opening Lazygit.
|
# If true, don't display introductory popups upon opening Lazygit.
|
||||||
disableStartupPopups: false
|
disableStartupPopups: false
|
||||||
# What to do when opening Lazygit outside of a git repo.
|
# What to do when opening Lazygit outside of a git repo.
|
||||||
|
|
@ -325,164 +325,164 @@ notARepository: prompt
|
||||||
promptToReturnFromSubprocess: true
|
promptToReturnFromSubprocess: true
|
||||||
# Keybindings
|
# Keybindings
|
||||||
keybinding:
|
keybinding:
|
||||||
universal:
|
universal:
|
||||||
quit: q
|
quit: q
|
||||||
quit-alt1: <c-c>
|
quit-alt1: <c-c>
|
||||||
return: <esc>
|
return: <esc>
|
||||||
quitWithoutChangingDirectory: Q
|
quitWithoutChangingDirectory: Q
|
||||||
togglePanel: <tab>
|
togglePanel: <tab>
|
||||||
prevItem: <up>
|
prevItem: <up>
|
||||||
nextItem: <down>
|
nextItem: <down>
|
||||||
prevItem-alt: e
|
prevItem-alt: e
|
||||||
nextItem-alt: "n"
|
nextItem-alt: "n"
|
||||||
prevPage: ","
|
prevPage: ","
|
||||||
nextPage: .
|
nextPage: .
|
||||||
scrollLeft: H
|
scrollLeft: H
|
||||||
scrollRight: L
|
scrollRight: L
|
||||||
gotoTop: <
|
gotoTop: <
|
||||||
gotoBottom: ">"
|
gotoBottom: ">"
|
||||||
toggleRangeSelect: v
|
toggleRangeSelect: v
|
||||||
rangeSelectDown: <s-down>
|
rangeSelectDown: <s-down>
|
||||||
rangeSelectUp: <s-up>
|
rangeSelectUp: <s-up>
|
||||||
prevBlock: <left>
|
prevBlock: <left>
|
||||||
nextBlock: <right>
|
nextBlock: <right>
|
||||||
prevBlock-alt: h
|
prevBlock-alt: h
|
||||||
nextBlock-alt: i
|
nextBlock-alt: i
|
||||||
nextBlock-alt2: <tab>
|
nextBlock-alt2: <tab>
|
||||||
prevBlock-alt2: <backtab>
|
prevBlock-alt2: <backtab>
|
||||||
jumpToBlock:
|
jumpToBlock:
|
||||||
- "1"
|
- "1"
|
||||||
- "2"
|
- "2"
|
||||||
- "3"
|
- "3"
|
||||||
- "4"
|
- "4"
|
||||||
- "5"
|
- "5"
|
||||||
nextMatch: "k"
|
nextMatch: "k"
|
||||||
prevMatch: "K"
|
prevMatch: "K"
|
||||||
startSearch: /
|
startSearch: /
|
||||||
optionMenu: <disabled>
|
optionMenu: <disabled>
|
||||||
optionMenu-alt1: "?"
|
optionMenu-alt1: "?"
|
||||||
select: <space>
|
select: <space>
|
||||||
goInto: <enter>
|
goInto: <enter>
|
||||||
confirm: <enter>
|
confirm: <enter>
|
||||||
confirmInEditor: <a-enter>
|
confirmInEditor: <a-enter>
|
||||||
remove: d
|
remove: d
|
||||||
new: "n"
|
new: "n"
|
||||||
edit: l
|
edit: l
|
||||||
openFile: o
|
openFile: o
|
||||||
scrollUpMain: <pgup>
|
scrollUpMain: <pgup>
|
||||||
scrollDownMain: <pgdown>
|
scrollDownMain: <pgdown>
|
||||||
scrollUpMain-alt1: K
|
scrollUpMain-alt1: E
|
||||||
scrollDownMain-alt1: J
|
scrollDownMain-alt1: "N"
|
||||||
scrollUpMain-alt2: <c-u>
|
scrollUpMain-alt2: <c-u>
|
||||||
scrollDownMain-alt2: <c-d>
|
scrollDownMain-alt2: <c-d>
|
||||||
executeShellCommand: ":"
|
executeShellCommand: ":"
|
||||||
createRebaseOptionsMenu: m
|
createRebaseOptionsMenu: m
|
||||||
# 'Files' appended for legacy reasons
|
# 'Files' appended for legacy reasons
|
||||||
pushFiles: P
|
pushFiles: P
|
||||||
# 'Files' appended for legacy reasons
|
# 'Files' appended for legacy reasons
|
||||||
pullFiles: p
|
pullFiles: p
|
||||||
refresh: R
|
refresh: R
|
||||||
createPatchOptionsMenu: <c-p>
|
createPatchOptionsMenu: <c-p>
|
||||||
nextTab: "]"
|
nextTab: "]"
|
||||||
prevTab: "["
|
prevTab: "["
|
||||||
nextScreenMode: +
|
nextScreenMode: +
|
||||||
prevScreenMode: _
|
prevScreenMode: _
|
||||||
undo: z
|
undo: z
|
||||||
redo: <c-z>
|
redo: <c-z>
|
||||||
filteringMenu: <c-s>
|
filteringMenu: <c-s>
|
||||||
diffingMenu: W
|
diffingMenu: W
|
||||||
diffingMenu-alt: <c-e>
|
diffingMenu-alt: <c-e>
|
||||||
copyToClipboard: <c-o>
|
copyToClipboard: <c-o>
|
||||||
openRecentRepos: <c-r>
|
openRecentRepos: <c-r>
|
||||||
submitEditorText: <enter>
|
submitEditorText: <enter>
|
||||||
extrasMenu: "@"
|
extrasMenu: "@"
|
||||||
toggleWhitespaceInDiffView: <c-w>
|
toggleWhitespaceInDiffView: <c-w>
|
||||||
increaseContextInDiffView: "}"
|
increaseContextInDiffView: "}"
|
||||||
decreaseContextInDiffView: "{"
|
decreaseContextInDiffView: "{"
|
||||||
increaseRenameSimilarityThreshold: )
|
increaseRenameSimilarityThreshold: )
|
||||||
decreaseRenameSimilarityThreshold: (
|
decreaseRenameSimilarityThreshold: (
|
||||||
openDiffTool: <c-t>
|
openDiffTool: <c-t>
|
||||||
status:
|
status:
|
||||||
checkForUpdate: u
|
checkForUpdate: u
|
||||||
recentRepos: <enter>
|
recentRepos: <space>
|
||||||
allBranchesLogGraph: a
|
allBranchesLogGraph: a
|
||||||
files:
|
files:
|
||||||
commitChanges: c
|
commitChanges: c
|
||||||
commitChangesWithoutHook: w
|
commitChangesWithoutHook: w
|
||||||
amendLastCommit: A
|
amendLastCommit: A
|
||||||
commitChangesWithEditor: C
|
commitChangesWithEditor: C
|
||||||
findBaseCommitForFixup: <c-f>
|
findBaseCommitForFixup: <c-f>
|
||||||
confirmDiscard: x
|
confirmDiscard: x
|
||||||
ignoreFile: i
|
ignoreFile: i
|
||||||
refreshFiles: r
|
refreshFiles: r
|
||||||
stashAllChanges: s
|
stashAllChanges: s
|
||||||
viewStashOptions: S
|
viewStashOptions: S
|
||||||
toggleStagedAll: a
|
toggleStagedAll: a
|
||||||
viewResetOptions: D
|
viewResetOptions: D
|
||||||
fetch: f
|
fetch: f
|
||||||
toggleTreeView: "`"
|
toggleTreeView: "t"
|
||||||
openMergeTool: M
|
openMergeTool: M
|
||||||
openStatusFilter: <c-b>
|
openStatusFilter: <c-b>
|
||||||
copyFileInfoToClipboard: "y"
|
copyFileInfoToClipboard: "y"
|
||||||
branches:
|
branches:
|
||||||
createPullRequest: o
|
createPullRequest: o
|
||||||
viewPullRequestOptions: O
|
viewPullRequestOptions: O
|
||||||
copyPullRequestURL: <c-y>
|
copyPullRequestURL: <c-y>
|
||||||
checkoutBranchByName: c
|
checkoutBranchByName: c
|
||||||
forceCheckoutBranch: F
|
forceCheckoutBranch: F
|
||||||
rebaseBranch: r
|
rebaseBranch: r
|
||||||
renameBranch: R
|
renameBranch: R
|
||||||
mergeIntoCurrentBranch: M
|
mergeIntoCurrentBranch: M
|
||||||
viewGitFlowOptions: i
|
viewGitFlowOptions: l
|
||||||
fastForward: f
|
fastForward: f
|
||||||
createTag: T
|
createTag: T
|
||||||
pushTag: P
|
pushTag: P
|
||||||
setUpstream: u
|
setUpstream: u
|
||||||
fetchRemote: f
|
fetchRemote: f
|
||||||
sortOrder: s
|
sortOrder: s
|
||||||
worktrees:
|
worktrees:
|
||||||
viewWorktreeOptions: w
|
viewWorktreeOptions: w
|
||||||
commits:
|
commits:
|
||||||
squashDown: s
|
squashDown: s
|
||||||
renameCommit: r
|
renameCommit: r
|
||||||
renameCommitWithEditor: R
|
renameCommitWithEditor: R
|
||||||
viewResetOptions: g
|
viewResetOptions: g
|
||||||
markCommitAsFixup: f
|
markCommitAsFixup: f
|
||||||
createFixupCommit: F
|
createFixupCommit: F
|
||||||
squashAboveCommits: S
|
squashAboveCommits: S
|
||||||
moveDownCommit: <c-j>
|
moveDownCommit: <c-j>
|
||||||
moveUpCommit: <c-k>
|
moveUpCommit: <c-k>
|
||||||
amendToCommit: A
|
amendToCommit: A
|
||||||
resetCommitAuthor: a
|
resetCommitAuthor: a
|
||||||
pickCommit: p
|
pickCommit: p
|
||||||
revertCommit: t
|
revertCommit: t
|
||||||
cherryPickCopy: C
|
cherryPickCopy: C
|
||||||
pasteCommits: V
|
pasteCommits: V
|
||||||
markCommitAsBaseForRebase: B
|
markCommitAsBaseForRebase: B
|
||||||
tagCommit: T
|
tagCommit: T
|
||||||
checkoutCommit: <space>
|
checkoutCommit: <space>
|
||||||
resetCherryPick: <c-R>
|
resetCherryPick: <c-R>
|
||||||
copyCommitAttributeToClipboard: "y"
|
copyCommitAttributeToClipboard: "y"
|
||||||
openLogMenu: <c-l>
|
openLogMenu: <c-l>
|
||||||
openInBrowser: o
|
openInBrowser: o
|
||||||
viewBisectOptions: b
|
viewBisectOptions: b
|
||||||
startInteractiveRebase: i
|
startInteractiveRebase: I
|
||||||
amendAttribute:
|
amendAttribute:
|
||||||
resetAuthor: a
|
resetAuthor: a
|
||||||
setAuthor: A
|
setAuthor: A
|
||||||
addCoAuthor: c
|
addCoAuthor: c
|
||||||
stash:
|
stash:
|
||||||
popStash: g
|
popStash: g
|
||||||
renameStash: r
|
renameStash: r
|
||||||
commitFiles:
|
commitFiles:
|
||||||
checkoutCommitFile: c
|
checkoutCommitFile: c
|
||||||
main:
|
main:
|
||||||
toggleSelectHunk: a
|
toggleSelectHunk: a
|
||||||
pickBothHunks: b
|
pickBothHunks: b
|
||||||
editSelectHunk: E
|
editSelectHunk: E
|
||||||
submodules:
|
submodules:
|
||||||
init: i
|
init: I
|
||||||
update: u
|
update: u
|
||||||
bulkMenu: b
|
bulkMenu: b
|
||||||
commitMessage:
|
commitMessage:
|
||||||
commitMenu: <c-o>
|
commitMenu: <c-o>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
# Arrow Remap (hnei -> hjkl)
|
# Arrow Remap (hnei -> hjkl)
|
||||||
n forw-line
|
n forw-line
|
||||||
e back-line
|
e back-line
|
||||||
|
N forw-line-force
|
||||||
|
E back-line-force
|
||||||
|
|
||||||
# search with k : ne[k]st
|
# search with k : ne[k]st
|
||||||
k repeat-search
|
k repeat-search
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
# Location: $XDG_CONFIG_HOME/lsd/config.yaml
|
# Location:
|
||||||
|
# *nix: $XDG_CONFIG_HOME/lsd/config.yaml
|
||||||
|
# Windows: %APPDATA%\lsd\config.yaml
|
||||||
# Linking:
|
# Linking:
|
||||||
# ln -sf $DOTFILES/common/lsd.yaml $XDG_CONFIG_HOME/lsd/config.yaml
|
# ln -sf $DOTFILES/common/lsd.yaml $XDG_CONFIG_HOME/lsd/config.yaml
|
||||||
# == Classic ==
|
# == Classic ==
|
||||||
|
|
@ -68,6 +70,8 @@ icons:
|
||||||
# A list of globs to ignore when listing.
|
# A list of globs to ignore when listing.
|
||||||
ignore-globs:
|
ignore-globs:
|
||||||
- .git
|
- .git
|
||||||
|
- .gitkeep # .gitkeep is for keeping empty directories in git
|
||||||
|
- .DS_Store
|
||||||
|
|
||||||
# == Indicators ==
|
# == Indicators ==
|
||||||
# Whether to add indicator characters to certain listed files.
|
# Whether to add indicator characters to certain listed files.
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
# Location: $XDG_CONFIG_HOME/starship.toml
|
# Location: $XDG_CONFIG_HOME/starship.toml
|
||||||
# Linking: ln -s $DOTFILES/common/starship.toml $XDG_CONFIG_HOME/starship.toml
|
# Linking: ln -s $DOTFILES/common/starship.toml $XDG_CONFIG_HOME/starship.toml
|
||||||
|
|
||||||
|
# Modified from the Powerline Preset
|
||||||
|
|
||||||
"$schema" = 'https://starship.rs/config-schema.json'
|
"$schema" = 'https://starship.rs/config-schema.json'
|
||||||
palette = "catppuccin_mocha"
|
palette = "catppuccin_mocha"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,3 +68,7 @@ ${function:tmux} = { wsl.exe tmux $args }
|
||||||
if (Get-Command "sfsu.exe" -ErrorAction SilentlyContinue) {
|
if (Get-Command "sfsu.exe" -ErrorAction SilentlyContinue) {
|
||||||
Invoke-Expression (&sfsu.exe hook)
|
Invoke-Expression (&sfsu.exe hook)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Elevate in current shell
|
||||||
|
# Set Windows Sudo to `inlined` sudo
|
||||||
|
${function:su} = { sudo.exe pwsh }
|
||||||
|
|
|
||||||
9
scripts/PSHistStat.ps1
Normal file
9
scripts/PSHistStat.ps1
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
$PSHistPath = (Get-PSReadlineOption).HistorySavePath
|
||||||
|
|
||||||
|
if (Test-Path $PSHistPath) {
|
||||||
|
$PSHist = Get-Content $PSHistPath
|
||||||
|
$PSHist | Group-Object | Sort-Object Count -Descending | Select-Object -First 10 Count, Name
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Host "No history file found."
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
@Description neovim 配置文件
|
@Description neovim 配置文件
|
||||||
]]
|
]]
|
||||||
|
|
||||||
|
-- Entry point of neovim configuration
|
||||||
require("config.options")
|
require("config.options")
|
||||||
require("config.plugins")
|
require("config.plugins")
|
||||||
require("config.colorscheme")
|
require("config.colorscheme")
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||||
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
|
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
|
||||||
"auto-session": { "branch": "main", "commit": "021b64ed7d4ac68a37be3ad28d8e1cba5bec582c" },
|
"auto-session": { "branch": "main", "commit": "16016db7f79d942a1538eaafb15a39f033f7a359" },
|
||||||
"betterTerm.nvim": { "branch": "main", "commit": "5d3f41d9e8b3553d49764906a14e45a08dbe2308" },
|
"betterTerm.nvim": { "branch": "main", "commit": "5d3f41d9e8b3553d49764906a14e45a08dbe2308" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"catppuccin": { "branch": "main", "commit": "f67b886d65a029f12ffa298701fb8f1efd89295d" },
|
"catppuccin": { "branch": "main", "commit": "f67b886d65a029f12ffa298701fb8f1efd89295d" },
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "d8918f06624dd53b9a82bd0e29c31bcfd541b40d" },
|
"gitsigns.nvim": { "branch": "main", "commit": "d8918f06624dd53b9a82bd0e29c31bcfd541b40d" },
|
||||||
"grug-far.nvim": { "branch": "main", "commit": "635e69adf3a714621bd0a289314bc23c5848babb" },
|
"grug-far.nvim": { "branch": "main", "commit": "82a81e0b5638667893d0d89f232dbb510cc5ab14" },
|
||||||
"hover.nvim": { "branch": "main", "commit": "140c4d0ae9397b76baa46b87c574f5377de09309" },
|
"hover.nvim": { "branch": "main", "commit": "140c4d0ae9397b76baa46b87c574f5377de09309" },
|
||||||
"kanagawa.nvim": { "branch": "master", "commit": "988082eb00b845e4afbcaa4fd8e903da8a3ab3b9" },
|
"kanagawa.nvim": { "branch": "master", "commit": "988082eb00b845e4afbcaa4fd8e903da8a3ab3b9" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" },
|
"lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" },
|
||||||
|
|
@ -28,10 +28,10 @@
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" },
|
"nvim-cmp": { "branch": "main", "commit": "12509903a5723a876abd65953109f926f4634c30" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "e5bf88e5ea1c4cea5ea96b1e970cb264f7a401a1" },
|
"nvim-lspconfig": { "branch": "master", "commit": "1f941b3668151963fca3e1230922c433ea4b7b64" },
|
||||||
"nvim-surround": { "branch": "main", "commit": "ae298105122c87bbe0a36b1ad20b06d417c0433e" },
|
"nvim-surround": { "branch": "main", "commit": "ae298105122c87bbe0a36b1ad20b06d417c0433e" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "d529a99f88e0dff02e0aa275db2f595cd252a2c8" },
|
"nvim-tree.lua": { "branch": "master", "commit": "d529a99f88e0dff02e0aa275db2f595cd252a2c8" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "d34e62afd3e483fe0fa2f24b6323f3bb1d35ddcc" },
|
"nvim-treesitter": { "branch": "master", "commit": "2206739829518c9ea59dbdb9003e0147fdaf2d1c" },
|
||||||
"nvim-treesitter-context": { "branch": "master", "commit": "bece284c5322ddf6946fa4bdc383a2bc033269d7" },
|
"nvim-treesitter-context": { "branch": "master", "commit": "bece284c5322ddf6946fa4bdc383a2bc033269d7" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "1c9136332840edee0c593f2f4f89598c8ed97f5f" },
|
"nvim-web-devicons": { "branch": "master", "commit": "1c9136332840edee0c593f2f4f89598c8ed97f5f" },
|
||||||
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
|
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
-- This file *currently* contains the colorscheme for lualine (status line)
|
||||||
local colors = {
|
local colors = {
|
||||||
bg = "#202328",
|
bg = "#202328",
|
||||||
fg = "#bbc2cf",
|
fg = "#bbc2cf",
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
|
-- Change the colorscheme here, use SPACE u i or :Telescope colorscheme to change colorscheme
|
||||||
vim.cmd.colorscheme("catppuccin-mocha")
|
vim.cmd.colorscheme("catppuccin-mocha")
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
local signs = require("config.icons").diagnostics
|
local signs = require("config.icons").diagnostics
|
||||||
|
|
||||||
|
-- This provides the diagnostics signs near the line numbers
|
||||||
for type, icon in pairs(signs) do
|
for type, icon in pairs(signs) do
|
||||||
local hl = "DiagnosticSign" .. type
|
local hl = "DiagnosticSign" .. type
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
-- icons.lua
|
||||||
|
-- All icons used in the configuration are defined in this file.
|
||||||
|
-- Currently are only used in diagnostics, lualine, gitsigns
|
||||||
local M = {
|
local M = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
Error = "",
|
Error = "",
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
|
-- Entry point of keymaps configuration
|
||||||
require("keymaps")
|
require("keymaps")
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,25 @@
|
||||||
-- <leader> is space
|
-- <leader> is space
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.g.maplocalleader = "\\"
|
vim.g.maplocalleader = "\\"
|
||||||
-- Disable netrw
|
-- Disable netrw (file explorer) use NvimTree instead
|
||||||
vim.g.loaded_netrw = 1
|
vim.g.loaded_netrw = 1
|
||||||
vim.g.loaded_netrwPlugin = 1
|
vim.g.loaded_netrwPlugin = 1
|
||||||
-- Disable Perl
|
-- Disable Perl
|
||||||
vim.g.loaded_perl_provider = 0 -- Don't load Perl
|
vim.g.loaded_perl_provider = 0 -- Don't load Perl
|
||||||
|
|
||||||
|
-- Format on save
|
||||||
vim.g.autoformat = true
|
vim.g.autoformat = true
|
||||||
|
|
||||||
local opt = vim.opt
|
local opt = vim.opt
|
||||||
|
|
||||||
-- Clipboard
|
-- Clipboard
|
||||||
|
-- `unnamedplus` for system clipboard
|
||||||
opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus"
|
opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus"
|
||||||
-- Line number
|
-- Line number
|
||||||
opt.number = true
|
opt.number = true
|
||||||
opt.relativenumber = true
|
opt.relativenumber = true
|
||||||
|
|
||||||
|
-- Confirm before dangerous operations
|
||||||
opt.confirm = true
|
opt.confirm = true
|
||||||
|
|
||||||
-- Word wrap
|
-- Word wrap
|
||||||
|
|
@ -32,26 +35,30 @@ opt.shiftround = true
|
||||||
opt.ignorecase = true
|
opt.ignorecase = true
|
||||||
opt.smartcase = true
|
opt.smartcase = true
|
||||||
|
|
||||||
|
-- Highlight current line
|
||||||
opt.cursorline = true
|
opt.cursorline = true
|
||||||
|
-- opt.cursorcolumn = true -- Highlight current column
|
||||||
-- Terminal GUI
|
-- Terminal GUI
|
||||||
opt.termguicolors = true
|
opt.termguicolors = true
|
||||||
|
|
||||||
-- Fold
|
--- Fold
|
||||||
opt.foldmethod = "expr"
|
opt.foldmethod = "expr"
|
||||||
|
-- Folding provided by treesitter
|
||||||
opt.foldexpr = "nvim_treesitter#foldexpr()"
|
opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
opt.foldlevel = 99
|
opt.foldlevel = 99
|
||||||
opt.foldlevelstart = 1
|
opt.foldlevelstart = 1
|
||||||
|
|
||||||
-- Statusline
|
-- Disable status line: Use `lualine` instead
|
||||||
opt.laststatus = 0
|
opt.laststatus = 0
|
||||||
|
|
||||||
-- Hide Command Line if empty
|
-- Hide Command Line if empty
|
||||||
opt.cmdheight = 0
|
opt.cmdheight = 0
|
||||||
|
|
||||||
-- Scroll
|
-- Scroll
|
||||||
opt.scrolloff = 5
|
opt.scrolloff = 5 -- Always show 5 lines above/below cursor
|
||||||
opt.sidescrolloff = 10
|
opt.sidescrolloff = 10 -- Always show 10 columns left/right of cursor
|
||||||
|
|
||||||
|
-- Conceal: Hide some characters, might be useful for markdown and LaTeX
|
||||||
opt.conceallevel = 2
|
opt.conceallevel = 2
|
||||||
|
|
||||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
|
-- Entry point for all plugins
|
||||||
require("plugins")
|
require("plugins")
|
||||||
|
|
|
||||||
|
|
@ -2,33 +2,37 @@
|
||||||
--- Check https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md
|
--- Check https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md
|
||||||
--- for available server and name
|
--- for available server and name
|
||||||
local M = {}
|
local M = {}
|
||||||
|
-- Ensure that the following servers are installed and set
|
||||||
|
-- Use :Mason to list all available servers
|
||||||
M.servers = {
|
M.servers = {
|
||||||
"ast_grep",
|
"ast_grep",
|
||||||
"bashls", -- Bash
|
"bashls", -- Bash
|
||||||
"clangd", -- C/C++
|
"clangd", -- C/C++
|
||||||
"cssls", -- CSS
|
"cssls", -- CSS
|
||||||
"denols", -- Deno
|
"denols", -- Deno
|
||||||
-- "cmake", -- CMake
|
-- "cmake", -- CMake
|
||||||
"eslint", -- JavaScript
|
"eslint", -- JavaScript
|
||||||
"gopls", -- Go
|
"gopls", -- Go
|
||||||
"hls", -- Haskell
|
"hls", -- Haskell
|
||||||
"html", -- HTML
|
"html", -- HTML
|
||||||
"jsonls", -- JSON
|
"jsonls", -- JSON
|
||||||
"lua_ls", -- Lua
|
"lua_ls", -- Lua
|
||||||
"markdown_oxide", -- Markdown
|
"markdown_oxide", -- Markdown
|
||||||
"omnisharp", -- C# & F#
|
"omnisharp", -- C# & F#
|
||||||
"powershell_es", -- PowerShell
|
"powershell_es", -- PowerShell
|
||||||
"pyright", -- Python
|
"pyright", -- Python
|
||||||
"rust_analyzer", -- Rust
|
"rust_analyzer", -- Rust
|
||||||
"svelte", -- Svelte
|
"svelte", -- Svelte
|
||||||
"svlangserver", -- SystemVerilog
|
"svlangserver", -- SystemVerilog
|
||||||
"tailwindcss", -- TailwindCSS
|
"tailwindcss", -- TailwindCSS
|
||||||
"taplo", -- TOML
|
"taplo", -- TOML
|
||||||
"ts_ls", -- TypeScript
|
"ts_ls", -- TypeScript
|
||||||
"vimls", -- vimscript
|
"vimls", -- vimscript
|
||||||
"yamlls", -- YAML
|
"yamlls", -- YAML
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-- Configuration for each server defines here
|
||||||
M.server_config = {
|
M.server_config = {
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
capabilities = vim.lsp.protocol.make_client_capabilities(),
|
capabilities = vim.lsp.protocol.make_client_capabilities(),
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
|
-- Note that this plugin is a fork for colemak
|
||||||
|
-- Use mouse to select multiple cursors
|
||||||
vim.g.VM_mouse_mappings = 1
|
vim.g.VM_mouse_mappings = 1
|
||||||
|
-- Disable default mappings
|
||||||
vim.g.VM_default_mappings = 0
|
vim.g.VM_default_mappings = 0
|
||||||
vim.g.VM_custom_motions = {
|
vim.g.VM_custom_motions = {
|
||||||
-- https://github.com/mg979/vim-visual-multi/issues/93
|
-- https://github.com/mg979/vim-visual-multi/issues/93
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,18 @@
|
||||||
return {
|
return {
|
||||||
{ "catppuccin/nvim", name = "catppuccin" },
|
-- Colorschemes
|
||||||
|
{ "catppuccin/nvim", name = "catppuccin" },
|
||||||
{ "olimorris/onedarkpro.nvim" },
|
{ "olimorris/onedarkpro.nvim" },
|
||||||
{ "rebelot/kanagawa.nvim" },
|
{ "rebelot/kanagawa.nvim" },
|
||||||
|
-- Highlight objects under the cursor
|
||||||
{ "RRethy/vim-illuminate" },
|
{ "RRethy/vim-illuminate" },
|
||||||
{
|
{ -- Modern Status Line
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.mod.lualine")
|
require("plugins.mod.lualine")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{ -- Highlight yanked text
|
||||||
"gbprod/yanky.nvim",
|
"gbprod/yanky.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("yanky").setup({
|
require("yanky").setup({
|
||||||
|
|
@ -22,10 +24,10 @@ return {
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ import = "plugins.mod.alpha-nvim" },
|
{ import = "plugins.mod.alpha-nvim" }, -- Dashboard
|
||||||
{ import = "plugins.mod.winbar-nvim" },
|
{ import = "plugins.mod.winbar-nvim" }, -- Breadcrumb
|
||||||
{ import = "plugins.mod.bufferline" },
|
{ import = "plugins.mod.bufferline" }, -- Buffer Top Bar
|
||||||
{
|
{ -- Git Blames, Changes
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("gitsigns").setup({
|
require("gitsigns").setup({
|
||||||
|
|
@ -33,7 +35,7 @@ return {
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{ -- Highlight and navigate between TODOs
|
||||||
"folke/todo-comments.nvim",
|
"folke/todo-comments.nvim",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
opts = {},
|
opts = {},
|
||||||
|
|
|
||||||
|
|
@ -209,7 +209,10 @@ config.mouse_bindings = {
|
||||||
--#endregion
|
--#endregion
|
||||||
|
|
||||||
--#region Environment
|
--#region Environment
|
||||||
config.set_environment_variables = {}
|
config.set_environment_variables = {
|
||||||
|
TERM = "xterm-256color",
|
||||||
|
TERM_PROGRAM = "wezterm"
|
||||||
|
}
|
||||||
--#endregion
|
--#endregion
|
||||||
|
|
||||||
--#region Launching
|
--#region Launching
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue