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

@ -61,27 +61,27 @@ gui:
# See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes
theme:
activeBorderColor:
- '#b4befe'
- "#b4befe"
- bold
inactiveBorderColor:
- '#a6adc8'
- "#a6adc8"
optionsTextColor:
- '#89b4fa'
- "#89b4fa"
selectedLineBgColor:
- '#313244'
- "#313244"
cherryPickedCommitBgColor:
- '#45475a'
- "#45475a"
cherryPickedCommitFgColor:
- '#b4befe'
- "#b4befe"
unstagedChangesColor:
- '#f38ba8'
- "#f38ba8"
defaultFgColor:
- '#cdd6f4'
- "#cdd6f4"
searchingActiveBorderColor:
- '#f9e2af'
- "#f9e2af"
authorColors:
'*': '#b4befe'
"*": "#b4befe"
# Background color of selected line when view doesn't have focus.
inactiveViewSelectedLineBgColor:
- bold
@ -115,7 +115,7 @@ gui:
# Nerd fonts version to use.
# One of: '2' | '3' | empty string (default)
# 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.
showFileIcons: true
# Length of author name in (non-expanded) commits view. 2 means show initials only.
@ -287,7 +287,7 @@ os:
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: ""
editPreset: "nvim"
# Command for opening a file, as if the file is double-clicked. Should
# contain "{{filename}}", but doesn't support "{{line}}".
open: ""
@ -371,8 +371,8 @@ keybinding:
openFile: o
scrollUpMain: <pgup>
scrollDownMain: <pgdown>
scrollUpMain-alt1: K
scrollDownMain-alt1: J
scrollUpMain-alt1: E
scrollDownMain-alt1: "N"
scrollUpMain-alt2: <c-u>
scrollDownMain-alt2: <c-d>
executeShellCommand: ":"
@ -404,7 +404,7 @@ keybinding:
openDiffTool: <c-t>
status:
checkForUpdate: u
recentRepos: <enter>
recentRepos: <space>
allBranchesLogGraph: a
files:
commitChanges: c
@ -420,7 +420,7 @@ keybinding:
toggleStagedAll: a
viewResetOptions: D
fetch: f
toggleTreeView: "`"
toggleTreeView: "t"
openMergeTool: M
openStatusFilter: <c-b>
copyFileInfoToClipboard: "y"
@ -433,7 +433,7 @@ keybinding:
rebaseBranch: r
renameBranch: R
mergeIntoCurrentBranch: M
viewGitFlowOptions: i
viewGitFlowOptions: l
fastForward: f
createTag: T
pushTag: P
@ -466,7 +466,7 @@ keybinding:
openLogMenu: <c-l>
openInBrowser: o
viewBisectOptions: b
startInteractiveRebase: i
startInteractiveRebase: I
amendAttribute:
resetAuthor: a
setAuthor: A
@ -481,7 +481,7 @@ keybinding:
pickBothHunks: b
editSelectHunk: E
submodules:
init: i
init: I
update: u
bulkMenu: b
commitMessage:

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,6 +2,8 @@
--- 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
@ -29,6 +31,8 @@ M.servers = {
"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 {
-- 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