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
|
||||||
|
|
|
||||||
|
|
@ -61,27 +61,27 @@ gui:
|
||||||
# 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
|
||||||
|
|
@ -115,7 +115,7 @@ gui:
|
||||||
# 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.
|
||||||
|
|
@ -287,7 +287,7 @@ os:
|
||||||
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: ""
|
||||||
|
|
@ -371,8 +371,8 @@ keybinding:
|
||||||
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: ":"
|
||||||
|
|
@ -404,7 +404,7 @@ keybinding:
|
||||||
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
|
||||||
|
|
@ -420,7 +420,7 @@ keybinding:
|
||||||
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"
|
||||||
|
|
@ -433,7 +433,7 @@ keybinding:
|
||||||
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
|
||||||
|
|
@ -466,7 +466,7 @@ keybinding:
|
||||||
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
|
||||||
|
|
@ -481,7 +481,7 @@ keybinding:
|
||||||
pickBothHunks: b
|
pickBothHunks: b
|
||||||
editSelectHunk: E
|
editSelectHunk: E
|
||||||
submodules:
|
submodules:
|
||||||
init: i
|
init: I
|
||||||
update: u
|
update: u
|
||||||
bulkMenu: b
|
bulkMenu: b
|
||||||
commitMessage:
|
commitMessage:
|
||||||
|
|
|
||||||
|
|
@ -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,6 +2,8 @@
|
||||||
--- 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
|
||||||
|
|
@ -29,6 +31,8 @@ M.servers = {
|
||||||
"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 {
|
||||||
|
-- Colorschemes
|
||||||
{ "catppuccin/nvim", name = "catppuccin" },
|
{ "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