docs: Add documentational comments

This commit is contained in:
js0ny 2025-01-28 14:24:30 +00:00
parent 1b050a13a8
commit 68ff1bb357
30 changed files with 732 additions and 562 deletions

View file

@ -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

View 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

View file

@ -4,45 +4,64 @@
# Set symlinks for dotfiles on Windows
# 在 Windows 上设置 配置文件的符号链接
# Run this with Administrator privileges
$DOTFILES = Join-Path $Env:UserProfile ".dotfiles"
$BASE_COMMON = Join-Path $DOTFILES "common"
$BASE_TOOLS = Join-Path $DOTFILES "tools"
$BASE_WIN = Join-Path $DOTFILES "platforms" "win"
$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 = @{
"$BASE_WIN\wslconfig" = "$Env:UserProfile\.wslconfig"
"$BASE_WIN\glzr" = "$Env:UserProfile\.glzr"
"$BASE_WIN\neovide.toml" = "$Env:AppData\neovide\config.toml"
"$BASE_WIN\vsvimrc" = "$Env:UserProfile\.vsvimrc"
"$BASE_COMMON\bat.config" = "$BAT_CONF"
"$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\haskeline" = "$Env:UserProfile\.haskeline"
"$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\lsd" = "$Env:AppData\lsd\config.yaml"
"$BASE_COMMON\npmrc" = "$Env:NPM_CONFIG_USERCONFIG"
"$BASE_COMMON\NuGet.Config" = "$Env:AppData\NuGet\NuGet.Config"
"$BASE_COMMON\starship.toml" = "$Env:UserProfile\.config\starship.toml"
"$BASE_COMMON\pip.conf" = "$Env:AppData\pip\pip.ini"
"$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\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) {
$path = $linkDots[$target]
foreach ($src in $linkDots.Keys) {
$dest = $linkDots[$src]
# Auto create directories (Untested)
$dir = Split-Path $path
if (!(Test-Path $dir)) {
New-Item -ItemType Directory -Path $dir -Force
if (Test-Path -Path $src -PathType Container) {
New-Item -ItemType Directory -Path $dest -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
Copy-Item (Join-Path $BASE_WIN "ahk" "bin" "Caps.exe") $STARTUP
Copy-Item (Join-Path $BASE_COMMON "gitconfig") $Env:UserProfile

View file

@ -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

View file

@ -4,7 +4,9 @@
# Location;
# Unix: $XDG_CONFIG_HOME/bat/config
# Windows: %AppData%\bat\config
# Windows:
# - Default: %AppData%\bat\config
# - Portable: (scoop prefix bat) + config
# Linking:
# ln -sf $DOTFILES/common/bat.config $XDG_CONFIG_HOME/bat/config
@ -33,3 +35,6 @@
# Example 2: Use ".gitignore"-style highlighting for ".ignore" files
#--map-syntax "*.ino:C++"
#--map-syntax ".ignore:Git Ignore"
# Squeeze consecutive empty lines
--squeeze-blank

View file

@ -9,4 +9,6 @@
# ================================================================================
# Reference:
# 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

View file

@ -12,14 +12,17 @@
email = whoami@example.com
[alias]
cl = clone
clnh = clone --depth 1
cma = commit -am
logs = log --oneline --graph --decorate --all
last = log -1 HEAD
undo = reset --hard HEAD
clnh = clone --depth 1 # Clone with no history
cma = commit -am # Add and commit
logs = log --oneline --graph --decorate --all # Show logs
last = log -1 HEAD # Show last commit
undo = reset --hard HEAD # Undo the last commit
[core]
editor = nvim
pager = delta
# autocrlf:
# true: Keep crlf in Windows, lf in *nix
# input: Keep lf in all platforms
autocrlf = input
safecrlf = true
excludesfile = $XDG_CONFIG_HOME/git/ignore
@ -36,7 +39,7 @@
[delta]
navigate = true
dark = true
features = catppuccin-mocha
features = catppuccin-mocha # Colorscheme
[diff]
tool = nvimdiff
[difftool]
@ -61,6 +64,9 @@
process = git-lfs filter-process
required = true
# 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:"]
# insteadOf = https://github.com/
[url "git@codeberg.org:"]

View file

@ -9,20 +9,58 @@
# Linking:
# ln -sf $DOTFILES/common/inputrc ~/.inputrc
# Use `man readline` to see all the options
# Reference: https://wiki.archlinux.org/title/Readline
# Colemak Key Remaps
set editing-mode vi
set keymap vi
set show-mode-in-prompt on
set mark-directories on
set completion-ignore-case on
# show all completions on a double tab without ringing the bell
set show-all-if-ambiguous on
# do not bell on tab-completion
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
set keymap vi-command
"n": next-history
"e": previous-history
"l": vi-insertion-mode
"L": vi-insert-beg
"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
# 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

View file

@ -11,308 +11,308 @@
yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json
# Config relating to the Lazygit UI
gui:
# The number of lines you scroll by when scrolling the main window
scrollHeight: 2
# If true, allow scrolling past the bottom of the content in the main window
scrollPastBottom: true
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#scroll-off-margin
scrollOffMargin: 2
# One of: 'margin' (default) | 'jump'
scrollOffBehavior: margin
# 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.
mouseEvents: true
# If true, do not show a warning when discarding changes in the staging view.
skipDiscardChangeWarning: false
# If true, do not show warning when applying/popping the stash
skipStashWarning: false
# If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files.
skipNoStagedFilesWarning: false
# If true, do not show a warning when rewording a commit via an external editor
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.
# Number from 0 to 1.0.
sidePanelWidth: 0.3333
# If true, increase the height of the focused side window; creating an accordion effect.
expandFocusedSidePanel: false
# 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.
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.
# Options are:
# - 'horizontal': split the window horizontally
# - 'vertical': split the window vertically
# - 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically
mainPanelSplitMode: flexible
# How the window is split when in half screen mode (i.e. after hitting '+' once).
# Possible values:
# - '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)
enlargedSideViewLocation: left
# One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru'
language: auto
# Format used when displaying time e.g. commit time.
# Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
timeFormat: 02 Jan 06
# 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
shortTimeFormat: 3:04PM
# Config relating to colors and styles.
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes
theme:
activeBorderColor:
- '#b4befe'
- bold
inactiveBorderColor:
- '#a6adc8'
optionsTextColor:
- '#89b4fa'
selectedLineBgColor:
- '#313244'
cherryPickedCommitBgColor:
- '#45475a'
cherryPickedCommitFgColor:
- '#b4befe'
unstagedChangesColor:
- '#f38ba8'
defaultFgColor:
- '#cdd6f4'
searchingActiveBorderColor:
- '#f9e2af'
# The number of lines you scroll by when scrolling the main window
scrollHeight: 2
# If true, allow scrolling past the bottom of the content in the main window
scrollPastBottom: true
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#scroll-off-margin
scrollOffMargin: 2
# One of: 'margin' (default) | 'jump'
scrollOffBehavior: margin
# 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.
mouseEvents: true
# If true, do not show a warning when discarding changes in the staging view.
skipDiscardChangeWarning: false
# If true, do not show warning when applying/popping the stash
skipStashWarning: false
# If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files.
skipNoStagedFilesWarning: false
# If true, do not show a warning when rewording a commit via an external editor
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.
# Number from 0 to 1.0.
sidePanelWidth: 0.3333
# If true, increase the height of the focused side window; creating an accordion effect.
expandFocusedSidePanel: false
# 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.
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.
# Options are:
# - 'horizontal': split the window horizontally
# - 'vertical': split the window vertically
# - 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically
mainPanelSplitMode: flexible
# How the window is split when in half screen mode (i.e. after hitting '+' once).
# Possible values:
# - '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)
enlargedSideViewLocation: left
# One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru'
language: auto
# Format used when displaying time e.g. commit time.
# Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format
timeFormat: 02 Jan 06
# 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
shortTimeFormat: 3:04PM
# Config relating to colors and styles.
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes
theme:
activeBorderColor:
- "#b4befe"
- bold
inactiveBorderColor:
- "#a6adc8"
optionsTextColor:
- "#89b4fa"
selectedLineBgColor:
- "#313244"
cherryPickedCommitBgColor:
- "#45475a"
cherryPickedCommitFgColor:
- "#b4befe"
unstagedChangesColor:
- "#f38ba8"
defaultFgColor:
- "#cdd6f4"
searchingActiveBorderColor:
- "#f9e2af"
authorColors:
'*': '#b4befe'
# Background color of selected line when view doesn't have focus.
inactiveViewSelectedLineBgColor:
- bold
# Foreground color of marked base commit (for rebase)
markedBaseCommitFgColor:
- blue
# Background color of marked base commit (for rebase)
markedBaseCommitBgColor:
- yellow
# Config relating to the commit length indicator
commitLength:
# If true, show an indicator of commit message length
show: true
# If true, show the '5 of 20' footer at the bottom of list views
showListFooter: true
# 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.
showFileTree: true
# If true, show the number of lines changed per file in the Files view
showNumstatInFilesView: false
# If true, show a random tip in the command log when Lazygit starts
showRandomTip: true
# If true, show the command log
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.
showBottomLine: true
# If true, show jump-to-window keybindings in window titles.
showPanelJumps: true
# Deprecated: use nerdFontsVersion instead
showIcons: false
# Nerd fonts version to use.
# One of: '2' | '3' | empty string (default)
# If empty, do not show icons.
nerdFontsVersion: ""
# If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty.
showFileIcons: true
# Length of author name in (non-expanded) commits view. 2 means show initials only.
commitAuthorShortLength: 2
# Length of author name in expanded commits view. 2 means show initials only.
commitAuthorLongLength: 17
# Length of commit hash in commits view. 0 shows '*' if NF icons aren't on.
commitHashLength: 8
# If true, show commit hashes alongside branch names in the branches view.
showBranchCommitHash: false
# Whether to show the divergence from the base branch in the branches view.
# One of: 'none' | 'onlyArrow' | 'arrowAndNumber'
showDivergenceFromBaseBranch: none
# Height of the command log view
commandLogSize: 8
# Whether to split the main window when viewing file changes.
# One of: 'auto' | 'always'
# If 'auto', only split the main window when a file has both staged and unstaged changes
splitDiff: auto
# 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'
screenMode: normal
# Window border style.
# One of 'rounded' (default) | 'single' | 'double' | 'hidden'
border: rounded
# If true, show a seriously epic explosion animation when nuking the working tree.
animateExplosion: true
# Whether to stack UI components on top of each other.
# One of 'auto' (default) | 'always' | 'never'
portraitMode: auto
# How things are filtered when typing '/'.
# One of 'substring' (default) | 'fuzzy'
filterMode: substring
# Config relating to the spinner.
spinner:
# The frames of the spinner animation.
frames:
- "|"
- /
- "-"
- \
# The "speed" of the spinner in milliseconds.
rate: 50
# Status panel view.
# One of 'dashboard' (default) | 'allBranchesLog'
statusPanelView: dashboard
# If true, jump to the Files panel after popping a stash
switchToFilesAfterStashPop: true
# If true, jump to the Files panel after applying a stash
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
switchTabsWithPanelJumpKeys: false
authorColors:
"*": "#b4befe"
# Background color of selected line when view doesn't have focus.
inactiveViewSelectedLineBgColor:
- bold
# Foreground color of marked base commit (for rebase)
markedBaseCommitFgColor:
- blue
# Background color of marked base commit (for rebase)
markedBaseCommitBgColor:
- yellow
# Config relating to the commit length indicator
commitLength:
# If true, show an indicator of commit message length
show: true
# If true, show the '5 of 20' footer at the bottom of list views
showListFooter: true
# 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.
showFileTree: true
# If true, show the number of lines changed per file in the Files view
showNumstatInFilesView: false
# If true, show a random tip in the command log when Lazygit starts
showRandomTip: true
# If true, show the command log
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.
showBottomLine: true
# If true, show jump-to-window keybindings in window titles.
showPanelJumps: true
# Deprecated: use nerdFontsVersion instead
showIcons: false
# Nerd fonts version to use.
# One of: '2' | '3' | empty string (default)
# If empty, do not show icons.
nerdFontsVersion: "3"
# If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty.
showFileIcons: true
# Length of author name in (non-expanded) commits view. 2 means show initials only.
commitAuthorShortLength: 2
# Length of author name in expanded commits view. 2 means show initials only.
commitAuthorLongLength: 17
# Length of commit hash in commits view. 0 shows '*' if NF icons aren't on.
commitHashLength: 8
# If true, show commit hashes alongside branch names in the branches view.
showBranchCommitHash: false
# Whether to show the divergence from the base branch in the branches view.
# One of: 'none' | 'onlyArrow' | 'arrowAndNumber'
showDivergenceFromBaseBranch: none
# Height of the command log view
commandLogSize: 8
# Whether to split the main window when viewing file changes.
# One of: 'auto' | 'always'
# If 'auto', only split the main window when a file has both staged and unstaged changes
splitDiff: auto
# 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'
screenMode: normal
# Window border style.
# One of 'rounded' (default) | 'single' | 'double' | 'hidden'
border: rounded
# If true, show a seriously epic explosion animation when nuking the working tree.
animateExplosion: true
# Whether to stack UI components on top of each other.
# One of 'auto' (default) | 'always' | 'never'
portraitMode: auto
# How things are filtered when typing '/'.
# One of 'substring' (default) | 'fuzzy'
filterMode: substring
# Config relating to the spinner.
spinner:
# The frames of the spinner animation.
frames:
- "|"
- /
- "-"
- \
# The "speed" of the spinner in milliseconds.
rate: 50
# Status panel view.
# One of 'dashboard' (default) | 'allBranchesLog'
statusPanelView: dashboard
# If true, jump to the Files panel after popping a stash
switchToFilesAfterStashPop: true
# If true, jump to the Files panel after applying a stash
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
switchTabsWithPanelJumpKeys: false
# Config relating to git
git:
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md
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'
colorArg: always
# e.g.
# diff-so-fancy
# delta --dark --paging=never
# ydiff -p cat -s --wrap --width={{columnWidth}}
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).
useConfig: false
# e.g. 'difft --color=always'
externalDiffCommand: ""
# Config relating to committing
commit:
# If true, pass '--signoff' flag when committing
signOff: false
# Automatic WYSIWYG wrapping of the commit message as you type
autoWrapCommitMessage: true
# If autoWrapCommitMessage is true, the width to wrap to
autoWrapWidth: 72
# Config relating to merging
merging:
# If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang
# Only applicable to unix users.
manualCommit: false
# Extra args passed to `git merge`, e.g. --no-ff
args: ""
# The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders.
squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}}
# list of branches that are considered 'main' branches, used when displaying commits
mainBranches:
- master
- 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'
skipHookPrefix: WIP
# If true, periodically fetch from remote
autoFetch: true
# If true, periodically refresh files and submodules
autoRefresh: true
# If true, pass the --all arg to git fetch
fetchAll: true
# 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
# continue a merge or rebase if you've resolved all conflicts. If false, it
# won't do either of these things.
autoStageResolvedConflicts: true
# 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}} --
# Command used to display git log of all branches in the main window.
# Deprecated: Use `allBranchesLogCmds` instead.
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
overrideGpg: false
# If true, do not allow force pushes
disableForcePushing: false
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix
commitPrefix:
# pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*"
pattern: ""
# Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] "
replace: ""
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-branch-name-prefix
branchPrefix: ""
# If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀
# (This should really be under 'gui', not 'git')
parseEmoji: false
# Config for showing the log in the commits view
log:
# 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
# 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).
order: topo-order
# This determines whether the git graph is rendered in the commits panel
# One of 'always' | 'never' | 'when-maximised'
#
# Deprecated: Configure this with `Log menu -> Show git graph` (<c-l> in the commits window by default).
showGraph: always
# displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
showWholeGraph: false
# When copying commit hashes to the clipboard, truncate them to this
# length. Set to 40 to disable truncation.
truncateCopiedCommitHashesTo: 12
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md
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'
colorArg: always
# e.g.
# diff-so-fancy
# delta --dark --paging=never
# ydiff -p cat -s --wrap --width={{columnWidth}}
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).
useConfig: false
# e.g. 'difft --color=always'
externalDiffCommand: ""
# Config relating to committing
commit:
# If true, pass '--signoff' flag when committing
signOff: false
# Automatic WYSIWYG wrapping of the commit message as you type
autoWrapCommitMessage: true
# If autoWrapCommitMessage is true, the width to wrap to
autoWrapWidth: 72
# Config relating to merging
merging:
# If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang
# Only applicable to unix users.
manualCommit: false
# Extra args passed to `git merge`, e.g. --no-ff
args: ""
# The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders.
squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}}
# list of branches that are considered 'main' branches, used when displaying commits
mainBranches:
- master
- 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'
skipHookPrefix: WIP
# If true, periodically fetch from remote
autoFetch: true
# If true, periodically refresh files and submodules
autoRefresh: true
# If true, pass the --all arg to git fetch
fetchAll: true
# 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
# continue a merge or rebase if you've resolved all conflicts. If false, it
# won't do either of these things.
autoStageResolvedConflicts: true
# 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}} --
# Command used to display git log of all branches in the main window.
# Deprecated: Use `allBranchesLogCmds` instead.
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
overrideGpg: false
# If true, do not allow force pushes
disableForcePushing: false
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix
commitPrefix:
# pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*"
pattern: ""
# Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] "
replace: ""
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-branch-name-prefix
branchPrefix: ""
# If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀
# (This should really be under 'gui', not 'git')
parseEmoji: false
# Config for showing the log in the commits view
log:
# 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
# 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).
order: topo-order
# This determines whether the git graph is rendered in the commits panel
# One of 'always' | 'never' | 'when-maximised'
#
# Deprecated: Configure this with `Log menu -> Show git graph` (<c-l> in the commits window by default).
showGraph: always
# displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`)
showWholeGraph: false
# When copying commit hashes to the clipboard, truncate them to this
# length. Set to 40 to disable truncation.
truncateCopiedCommitHashesTo: 12
# Periodic update checks
update:
# One of: 'prompt' (default) | 'background' | 'never'
method: prompt
# Period in days between update checks
days: 14
# One of: 'prompt' (default) | 'background' | 'never'
method: prompt
# Period in days between update checks
days: 14
# Background refreshes
refresher:
# File/submodule refresh interval in seconds.
# Auto-refresh can be disabled via option 'git.autoRefresh'.
refreshInterval: 10
# Re-fetch interval in seconds.
# Auto-fetch can be disabled via option 'git.autoFetch'.
fetchInterval: 60
# File/submodule refresh interval in seconds.
# Auto-refresh can be disabled via option 'git.autoRefresh'.
refreshInterval: 10
# Re-fetch interval in seconds.
# Auto-fetch can be disabled via option 'git.autoFetch'.
fetchInterval: 60
# If true, show a confirmation popup before quitting Lazygit
confirmOnQuit: false
# If true, exit Lazygit when the user presses escape in a context where there is nothing to cancel/close
quitOnTopLevelReturn: false
# Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc
os:
# Command for editing a file. Should contain "{{filename}}".
edit: ""
# Command for editing a file at a given line number. Should contain
# "{{filename}}", and may optionally contain "{{line}}".
editAtLine: ""
# Same as EditAtLine, except that the command needs to wait until the
# window is closed.
editAtLineAndWait: ""
# For opening a directory in an editor
openDirInEditor: ""
# A built-in preset that sets all of the above settings. Supported presets
# are defined in the getPreset function in editor_presets.go.
editPreset: ""
# Command for opening a file, as if the file is double-clicked. Should
# contain "{{filename}}", but doesn't support "{{line}}".
open: ""
# Command for opening a link. Should contain "{{link}}".
openLink: ""
# EditCommand is the command for editing a file.
# Deprecated: use Edit instead. Note that semantics are different:
# EditCommand is just the command itself, whereas Edit contains a
# "{{filename}}" variable.
editCommand: ""
# EditCommandTemplate is the command template for editing a file
# Deprecated: use EditAtLine instead.
editCommandTemplate: ""
# OpenCommand is the command for opening a file
# Deprecated: use Open instead.
openCommand: ""
# OpenLinkCommand is the command for opening a link
# Deprecated: use OpenLink instead.
openLinkCommand: ""
# 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
copyToClipboardCmd: ""
# 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
readFromClipboardCmd: ""
# Command for editing a file. Should contain "{{filename}}".
edit: ""
# Command for editing a file at a given line number. Should contain
# "{{filename}}", and may optionally contain "{{line}}".
editAtLine: ""
# Same as EditAtLine, except that the command needs to wait until the
# window is closed.
editAtLineAndWait: ""
# For opening a directory in an editor
openDirInEditor: ""
# A built-in preset that sets all of the above settings. Supported presets
# are defined in the getPreset function in editor_presets.go.
editPreset: "nvim"
# Command for opening a file, as if the file is double-clicked. Should
# contain "{{filename}}", but doesn't support "{{line}}".
open: ""
# Command for opening a link. Should contain "{{link}}".
openLink: ""
# EditCommand is the command for editing a file.
# Deprecated: use Edit instead. Note that semantics are different:
# EditCommand is just the command itself, whereas Edit contains a
# "{{filename}}" variable.
editCommand: ""
# EditCommandTemplate is the command template for editing a file
# Deprecated: use EditAtLine instead.
editCommandTemplate: ""
# OpenCommand is the command for opening a file
# Deprecated: use Open instead.
openCommand: ""
# OpenLinkCommand is the command for opening a link
# Deprecated: use OpenLink instead.
openLinkCommand: ""
# 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
copyToClipboardCmd: ""
# 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
readFromClipboardCmd: ""
# If true, don't display introductory popups upon opening Lazygit.
disableStartupPopups: false
# What to do when opening Lazygit outside of a git repo.
@ -325,164 +325,164 @@ notARepository: prompt
promptToReturnFromSubprocess: true
# Keybindings
keybinding:
universal:
quit: q
quit-alt1: <c-c>
return: <esc>
quitWithoutChangingDirectory: Q
togglePanel: <tab>
prevItem: <up>
nextItem: <down>
prevItem-alt: e
nextItem-alt: "n"
prevPage: ","
nextPage: .
scrollLeft: H
scrollRight: L
gotoTop: <
gotoBottom: ">"
toggleRangeSelect: v
rangeSelectDown: <s-down>
rangeSelectUp: <s-up>
prevBlock: <left>
nextBlock: <right>
prevBlock-alt: h
nextBlock-alt: i
nextBlock-alt2: <tab>
prevBlock-alt2: <backtab>
jumpToBlock:
- "1"
- "2"
- "3"
- "4"
- "5"
nextMatch: "k"
prevMatch: "K"
startSearch: /
optionMenu: <disabled>
optionMenu-alt1: "?"
select: <space>
goInto: <enter>
confirm: <enter>
confirmInEditor: <a-enter>
remove: d
new: "n"
edit: l
openFile: o
scrollUpMain: <pgup>
scrollDownMain: <pgdown>
scrollUpMain-alt1: K
scrollDownMain-alt1: J
scrollUpMain-alt2: <c-u>
scrollDownMain-alt2: <c-d>
executeShellCommand: ":"
createRebaseOptionsMenu: m
# 'Files' appended for legacy reasons
pushFiles: P
# 'Files' appended for legacy reasons
pullFiles: p
refresh: R
createPatchOptionsMenu: <c-p>
nextTab: "]"
prevTab: "["
nextScreenMode: +
prevScreenMode: _
undo: z
redo: <c-z>
filteringMenu: <c-s>
diffingMenu: W
diffingMenu-alt: <c-e>
copyToClipboard: <c-o>
openRecentRepos: <c-r>
submitEditorText: <enter>
extrasMenu: "@"
toggleWhitespaceInDiffView: <c-w>
increaseContextInDiffView: "}"
decreaseContextInDiffView: "{"
increaseRenameSimilarityThreshold: )
decreaseRenameSimilarityThreshold: (
openDiffTool: <c-t>
status:
checkForUpdate: u
recentRepos: <enter>
allBranchesLogGraph: a
files:
commitChanges: c
commitChangesWithoutHook: w
amendLastCommit: A
commitChangesWithEditor: C
findBaseCommitForFixup: <c-f>
confirmDiscard: x
ignoreFile: i
refreshFiles: r
stashAllChanges: s
viewStashOptions: S
toggleStagedAll: a
viewResetOptions: D
fetch: f
toggleTreeView: "`"
openMergeTool: M
openStatusFilter: <c-b>
copyFileInfoToClipboard: "y"
branches:
createPullRequest: o
viewPullRequestOptions: O
copyPullRequestURL: <c-y>
checkoutBranchByName: c
forceCheckoutBranch: F
rebaseBranch: r
renameBranch: R
mergeIntoCurrentBranch: M
viewGitFlowOptions: i
fastForward: f
createTag: T
pushTag: P
setUpstream: u
fetchRemote: f
sortOrder: s
worktrees:
viewWorktreeOptions: w
commits:
squashDown: s
renameCommit: r
renameCommitWithEditor: R
viewResetOptions: g
markCommitAsFixup: f
createFixupCommit: F
squashAboveCommits: S
moveDownCommit: <c-j>
moveUpCommit: <c-k>
amendToCommit: A
resetCommitAuthor: a
pickCommit: p
revertCommit: t
cherryPickCopy: C
pasteCommits: V
markCommitAsBaseForRebase: B
tagCommit: T
checkoutCommit: <space>
resetCherryPick: <c-R>
copyCommitAttributeToClipboard: "y"
openLogMenu: <c-l>
openInBrowser: o
viewBisectOptions: b
startInteractiveRebase: i
amendAttribute:
resetAuthor: a
setAuthor: A
addCoAuthor: c
stash:
popStash: g
renameStash: r
commitFiles:
checkoutCommitFile: c
main:
toggleSelectHunk: a
pickBothHunks: b
editSelectHunk: E
submodules:
init: i
update: u
bulkMenu: b
commitMessage:
commitMenu: <c-o>
universal:
quit: q
quit-alt1: <c-c>
return: <esc>
quitWithoutChangingDirectory: Q
togglePanel: <tab>
prevItem: <up>
nextItem: <down>
prevItem-alt: e
nextItem-alt: "n"
prevPage: ","
nextPage: .
scrollLeft: H
scrollRight: L
gotoTop: <
gotoBottom: ">"
toggleRangeSelect: v
rangeSelectDown: <s-down>
rangeSelectUp: <s-up>
prevBlock: <left>
nextBlock: <right>
prevBlock-alt: h
nextBlock-alt: i
nextBlock-alt2: <tab>
prevBlock-alt2: <backtab>
jumpToBlock:
- "1"
- "2"
- "3"
- "4"
- "5"
nextMatch: "k"
prevMatch: "K"
startSearch: /
optionMenu: <disabled>
optionMenu-alt1: "?"
select: <space>
goInto: <enter>
confirm: <enter>
confirmInEditor: <a-enter>
remove: d
new: "n"
edit: l
openFile: o
scrollUpMain: <pgup>
scrollDownMain: <pgdown>
scrollUpMain-alt1: E
scrollDownMain-alt1: "N"
scrollUpMain-alt2: <c-u>
scrollDownMain-alt2: <c-d>
executeShellCommand: ":"
createRebaseOptionsMenu: m
# 'Files' appended for legacy reasons
pushFiles: P
# 'Files' appended for legacy reasons
pullFiles: p
refresh: R
createPatchOptionsMenu: <c-p>
nextTab: "]"
prevTab: "["
nextScreenMode: +
prevScreenMode: _
undo: z
redo: <c-z>
filteringMenu: <c-s>
diffingMenu: W
diffingMenu-alt: <c-e>
copyToClipboard: <c-o>
openRecentRepos: <c-r>
submitEditorText: <enter>
extrasMenu: "@"
toggleWhitespaceInDiffView: <c-w>
increaseContextInDiffView: "}"
decreaseContextInDiffView: "{"
increaseRenameSimilarityThreshold: )
decreaseRenameSimilarityThreshold: (
openDiffTool: <c-t>
status:
checkForUpdate: u
recentRepos: <space>
allBranchesLogGraph: a
files:
commitChanges: c
commitChangesWithoutHook: w
amendLastCommit: A
commitChangesWithEditor: C
findBaseCommitForFixup: <c-f>
confirmDiscard: x
ignoreFile: i
refreshFiles: r
stashAllChanges: s
viewStashOptions: S
toggleStagedAll: a
viewResetOptions: D
fetch: f
toggleTreeView: "t"
openMergeTool: M
openStatusFilter: <c-b>
copyFileInfoToClipboard: "y"
branches:
createPullRequest: o
viewPullRequestOptions: O
copyPullRequestURL: <c-y>
checkoutBranchByName: c
forceCheckoutBranch: F
rebaseBranch: r
renameBranch: R
mergeIntoCurrentBranch: M
viewGitFlowOptions: l
fastForward: f
createTag: T
pushTag: P
setUpstream: u
fetchRemote: f
sortOrder: s
worktrees:
viewWorktreeOptions: w
commits:
squashDown: s
renameCommit: r
renameCommitWithEditor: R
viewResetOptions: g
markCommitAsFixup: f
createFixupCommit: F
squashAboveCommits: S
moveDownCommit: <c-j>
moveUpCommit: <c-k>
amendToCommit: A
resetCommitAuthor: a
pickCommit: p
revertCommit: t
cherryPickCopy: C
pasteCommits: V
markCommitAsBaseForRebase: B
tagCommit: T
checkoutCommit: <space>
resetCherryPick: <c-R>
copyCommitAttributeToClipboard: "y"
openLogMenu: <c-l>
openInBrowser: o
viewBisectOptions: b
startInteractiveRebase: I
amendAttribute:
resetAuthor: a
setAuthor: A
addCoAuthor: c
stash:
popStash: g
renameStash: r
commitFiles:
checkoutCommitFile: c
main:
toggleSelectHunk: a
pickBothHunks: b
editSelectHunk: E
submodules:
init: I
update: u
bulkMenu: b
commitMessage:
commitMenu: <c-o>

View file

@ -19,6 +19,8 @@
# Arrow Remap (hnei -> hjkl)
n forw-line
e back-line
N forw-line-force
E back-line-force
# search with k : ne[k]st
k repeat-search

View file

@ -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:
# ln -sf $DOTFILES/common/lsd.yaml $XDG_CONFIG_HOME/lsd/config.yaml
# == Classic ==
@ -68,6 +70,8 @@ icons:
# A list of globs to ignore when listing.
ignore-globs:
- .git
- .gitkeep # .gitkeep is for keeping empty directories in git
- .DS_Store
# == Indicators ==
# Whether to add indicator characters to certain listed files.

View file

@ -5,6 +5,8 @@
# Location: $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'
palette = "catppuccin_mocha"

View file

@ -68,3 +68,7 @@ ${function:tmux} = { wsl.exe tmux $args }
if (Get-Command "sfsu.exe" -ErrorAction SilentlyContinue) {
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
View 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."
}

View file

@ -6,6 +6,7 @@
@Description neovim
]]
-- Entry point of neovim configuration
require("config.options")
require("config.plugins")
require("config.colorscheme")

View file

@ -1,7 +1,7 @@
{
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
"auto-session": { "branch": "main", "commit": "021b64ed7d4ac68a37be3ad28d8e1cba5bec582c" },
"auto-session": { "branch": "main", "commit": "16016db7f79d942a1538eaafb15a39f033f7a359" },
"betterTerm.nvim": { "branch": "main", "commit": "5d3f41d9e8b3553d49764906a14e45a08dbe2308" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"catppuccin": { "branch": "main", "commit": "f67b886d65a029f12ffa298701fb8f1efd89295d" },
@ -16,7 +16,7 @@
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"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" },
"kanagawa.nvim": { "branch": "master", "commit": "988082eb00b845e4afbcaa4fd8e903da8a3ab3b9" },
"lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" },
@ -28,10 +28,10 @@
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
"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-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-web-devicons": { "branch": "master", "commit": "1c9136332840edee0c593f2f4f89598c8ed97f5f" },
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },

View file

@ -1,3 +1,4 @@
-- This file *currently* contains the colorscheme for lualine (status line)
local colors = {
bg = "#202328",
fg = "#bbc2cf",

View file

@ -1 +1,2 @@
-- Change the colorscheme here, use SPACE u i or :Telescope colorscheme to change colorscheme
vim.cmd.colorscheme("catppuccin-mocha")

View file

@ -1,5 +1,6 @@
local signs = require("config.icons").diagnostics
-- This provides the diagnostics signs near the line numbers
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })

View file

@ -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 = {
diagnostics = {
Error = "",

View file

@ -1 +1,2 @@
-- Entry point of keymaps configuration
require("keymaps")

View file

@ -1,22 +1,25 @@
-- <leader> is space
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Disable netrw
-- Disable netrw (file explorer) use NvimTree instead
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- Disable Perl
vim.g.loaded_perl_provider = 0 -- Don't load Perl
-- Format on save
vim.g.autoformat = true
local opt = vim.opt
-- Clipboard
-- `unnamedplus` for system clipboard
opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus"
-- Line number
opt.number = true
opt.relativenumber = true
-- Confirm before dangerous operations
opt.confirm = true
-- Word wrap
@ -32,26 +35,30 @@ opt.shiftround = true
opt.ignorecase = true
opt.smartcase = true
-- Highlight current line
opt.cursorline = true
-- opt.cursorcolumn = true -- Highlight current column
-- Terminal GUI
opt.termguicolors = true
-- Fold
--- Fold
opt.foldmethod = "expr"
-- Folding provided by treesitter
opt.foldexpr = "nvim_treesitter#foldexpr()"
opt.foldlevel = 99
opt.foldlevelstart = 1
-- Statusline
-- Disable status line: Use `lualine` instead
opt.laststatus = 0
-- Hide Command Line if empty
opt.cmdheight = 0
-- Scroll
opt.scrolloff = 5
opt.sidescrolloff = 10
opt.scrolloff = 5 -- Always show 5 lines above/below cursor
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
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"

View file

@ -1 +1,2 @@
-- Entry point for all plugins
require("plugins")

View file

@ -2,33 +2,37 @@
--- Check https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md
--- for available server and name
local M = {}
-- Ensure that the following servers are installed and set
-- Use :Mason to list all available servers
M.servers = {
"ast_grep",
"bashls", -- Bash
"clangd", -- C/C++
"cssls", -- CSS
"denols", -- Deno
"bashls", -- Bash
"clangd", -- C/C++
"cssls", -- CSS
"denols", -- Deno
-- "cmake", -- CMake
"eslint", -- JavaScript
"gopls", -- Go
"hls", -- Haskell
"html", -- HTML
"jsonls", -- JSON
"lua_ls", -- Lua
"eslint", -- JavaScript
"gopls", -- Go
"hls", -- Haskell
"html", -- HTML
"jsonls", -- JSON
"lua_ls", -- Lua
"markdown_oxide", -- Markdown
"omnisharp", -- C# & F#
"powershell_es", -- PowerShell
"pyright", -- Python
"rust_analyzer", -- Rust
"svelte", -- Svelte
"svlangserver", -- SystemVerilog
"tailwindcss", -- TailwindCSS
"taplo", -- TOML
"ts_ls", -- TypeScript
"vimls", -- vimscript
"yamlls", -- YAML
"omnisharp", -- C# & F#
"powershell_es", -- PowerShell
"pyright", -- Python
"rust_analyzer", -- Rust
"svelte", -- Svelte
"svlangserver", -- SystemVerilog
"tailwindcss", -- TailwindCSS
"taplo", -- TOML
"ts_ls", -- TypeScript
"vimls", -- vimscript
"yamlls", -- YAML
}
-- Configuration for each server defines here
M.server_config = {
lua_ls = {
capabilities = vim.lsp.protocol.make_client_capabilities(),

View file

@ -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
-- Disable default mappings
vim.g.VM_default_mappings = 0
vim.g.VM_custom_motions = {
-- https://github.com/mg979/vim-visual-multi/issues/93

View file

@ -1,16 +1,18 @@
return {
{ "catppuccin/nvim", name = "catppuccin" },
-- Colorschemes
{ "catppuccin/nvim", name = "catppuccin" },
{ "olimorris/onedarkpro.nvim" },
{ "rebelot/kanagawa.nvim" },
-- Highlight objects under the cursor
{ "RRethy/vim-illuminate" },
{
{ -- Modern Status Line
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("plugins.mod.lualine")
end,
},
{
{ -- Highlight yanked text
"gbprod/yanky.nvim",
config = function()
require("yanky").setup({
@ -22,10 +24,10 @@ return {
})
end,
},
{ import = "plugins.mod.alpha-nvim" },
{ import = "plugins.mod.winbar-nvim" },
{ import = "plugins.mod.bufferline" },
{
{ import = "plugins.mod.alpha-nvim" }, -- Dashboard
{ import = "plugins.mod.winbar-nvim" }, -- Breadcrumb
{ import = "plugins.mod.bufferline" }, -- Buffer Top Bar
{ -- Git Blames, Changes
"lewis6991/gitsigns.nvim",
config = function()
require("gitsigns").setup({
@ -33,7 +35,7 @@ return {
})
end,
},
{
{ -- Highlight and navigate between TODOs
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {},

View file

@ -209,7 +209,10 @@ config.mouse_bindings = {
--#endregion
--#region Environment
config.set_environment_variables = {}
config.set_environment_variables = {
TERM = "xterm-256color",
TERM_PROGRAM = "wezterm"
}
--#endregion
--#region Launching