Compare commits
9
Commits
594f8f1fb3
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f056a099f | ||
|
|
881a5dadff | ||
|
|
58bec27062 | ||
|
|
cdba097f95 | ||
|
|
49dd51c6e0 | ||
|
|
a15edc6734 | ||
|
|
e8abad6a27 | ||
|
|
dfb94e5cdc | ||
|
|
7dadd34249 |
No files matched your search
@@ -0,0 +1,2 @@
|
||||
# Never track the host-local zsh dir, even if it gets recreated here.
|
||||
zsh/.zsh/local/
|
||||
@@ -67,14 +67,19 @@
|
||||
|
||||
suup = submodule update
|
||||
suupr = submodule update --remote
|
||||
|
||||
[core]
|
||||
editor = nvim
|
||||
excludesFile = ~/.gitignore
|
||||
excludesFile = ~/.config/git/global-excludes
|
||||
quotepath = false
|
||||
|
||||
[pull]
|
||||
rebase = false
|
||||
|
||||
[push]
|
||||
autoSetupRemote = true
|
||||
default = current
|
||||
|
||||
[diff]
|
||||
external = difft
|
||||
|
||||
@@ -83,3 +88,11 @@
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
|
||||
[url "[email protected]:castai/"]
|
||||
insteadOf = https://github.com/castai/
|
||||
|
||||
[fetch]
|
||||
prune = true
|
||||
[url "[email protected]:"]
|
||||
insteadOf = https://github.com/
|
||||
File renamed without changes.
@@ -15,8 +15,9 @@ local function toggle_or_focus_explorer()
|
||||
return
|
||||
end
|
||||
|
||||
-- No explorer open; open one at the project root
|
||||
Snacks.explorer({ cwd = LazyVim.root() })
|
||||
-- No explorer open; open one at the actual working directory.
|
||||
-- (inside the explorer, <c-r> toggles between project cwd and module root)
|
||||
Snacks.explorer()
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>e", toggle_or_focus_explorer, { desc = "Explorer (toggle/focus)" })
|
||||
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
optional = true,
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
sql = { "sqlfluff" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -6,7 +6,6 @@ return {
|
||||
gopls = {
|
||||
settings = {
|
||||
gopls = {
|
||||
experimentalWorkspaceModule = true,
|
||||
hints = {
|
||||
assignVariableTypes = false,
|
||||
-- compositeLiteralFields = false,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
"mason-org/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"delve",
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 configs
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,17 @@
|
||||
# starship-prompt
|
||||
|
||||
The minimal, blazing-fast, and infinitely customizable prompt for any shell!
|
||||
|
||||
# Getting started
|
||||
|
||||
```
|
||||
brew install starship
|
||||
|
||||
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
|
||||
|
||||
git clone https://git.naterciomoniz.net/configs/starship-prompt.git ~/.config/starship
|
||||
|
||||
echo 'export STARSHIP_CONFIG=~/.config/starship/starship.toml' >> ~/.zshrc
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$directory\
|
||||
$git_branch\
|
||||
$git_state\
|
||||
$git_status\
|
||||
$all\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$character"""
|
||||
|
||||
# Modules
|
||||
|
||||
[aws]
|
||||
symbol = " "
|
||||
|
||||
[buf]
|
||||
symbol = " "
|
||||
|
||||
[bun]
|
||||
symbol = " "
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](purple)"
|
||||
error_symbol = "[❯](red)"
|
||||
vimcmd_symbol = "[❮](green)"
|
||||
|
||||
[directory]
|
||||
style = "blue"
|
||||
read_only = " "
|
||||
|
||||
[c]
|
||||
symbol = " "
|
||||
|
||||
[cmake]
|
||||
symbol = " "
|
||||
#format = '([$symbol ]($style))'
|
||||
|
||||
[cmd_duration]
|
||||
format = "[$duration]($style) "
|
||||
style = "yellow"
|
||||
|
||||
[cpp]
|
||||
symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[crystal]
|
||||
symbol = " "
|
||||
|
||||
[dart]
|
||||
symbol = " "
|
||||
|
||||
[deno]
|
||||
symbol = " "
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[fennel]
|
||||
symbol = " "
|
||||
|
||||
[fossil_branch]
|
||||
symbol = " "
|
||||
|
||||
[gcloud]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
format = "[$symbol$branch ]($style)"
|
||||
style = "bright-black"
|
||||
symbol = " "
|
||||
|
||||
[git_commit]
|
||||
tag_symbol = ' '
|
||||
|
||||
[git_status]
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style) "
|
||||
conflicted = ""
|
||||
untracked = ""
|
||||
modified = ""
|
||||
staged = ""
|
||||
renamed = ""
|
||||
deleted = ""
|
||||
stashed = "≡"
|
||||
|
||||
[git_state]
|
||||
format = '\([$state( $progress_current/$progress_total)]($style)\) '
|
||||
style = "bright-black"
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
format = '[$symbol ]($style)'
|
||||
|
||||
[guix_shell]
|
||||
symbol = " "
|
||||
|
||||
[haskell]
|
||||
symbol = " "
|
||||
|
||||
[haxe]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[hostname]
|
||||
ssh_symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[kotlin]
|
||||
symbol = " "
|
||||
|
||||
[kubernetes]
|
||||
format = '[$symbol$context( \($namespace\))]($style) '
|
||||
disabled = false
|
||||
|
||||
[lua]
|
||||
symbol = " "
|
||||
format = '[$symbol ]($style)'
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
|
||||
[meson]
|
||||
symbol = " "
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[ocaml]
|
||||
symbol = " "
|
||||
|
||||
[os.symbols]
|
||||
Alpaquita = " "
|
||||
Alpine = " "
|
||||
AlmaLinux = " "
|
||||
Amazon = " "
|
||||
Android = " "
|
||||
Arch = " "
|
||||
Artix = " "
|
||||
CachyOS = " "
|
||||
CentOS = " "
|
||||
Debian = " "
|
||||
DragonFly = " "
|
||||
Emscripten = " "
|
||||
EndeavourOS = " "
|
||||
Fedora = " "
|
||||
FreeBSD = " "
|
||||
Garuda = " "
|
||||
Gentoo = " "
|
||||
HardenedBSD = " "
|
||||
Illumos = " "
|
||||
Kali = " "
|
||||
Linux = " "
|
||||
Mabox = " "
|
||||
Macos = " "
|
||||
Manjaro = " "
|
||||
Mariner = " "
|
||||
MidnightBSD = " "
|
||||
Mint = " "
|
||||
NetBSD = " "
|
||||
NixOS = " "
|
||||
Nobara = " "
|
||||
OpenBSD = " "
|
||||
openSUSE = " "
|
||||
OracleLinux = " "
|
||||
Pop = " "
|
||||
Raspbian = " "
|
||||
Redhat = " "
|
||||
RedHatEnterprise = " "
|
||||
RockyLinux = " "
|
||||
Redox = " "
|
||||
Solus = " "
|
||||
SUSE = " "
|
||||
Ubuntu = " "
|
||||
Unknown = " "
|
||||
Void = " "
|
||||
Windows = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[perl]
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = " "
|
||||
|
||||
[pijul_channel]
|
||||
symbol = " "
|
||||
|
||||
[pixi]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
format = "$symbol[$virtualenv]($style) "
|
||||
|
||||
[rlang]
|
||||
symbol = " "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[scala]
|
||||
symbol = " "
|
||||
|
||||
[swift]
|
||||
symbol = " "
|
||||
|
||||
[zig]
|
||||
symbol = " "
|
||||
|
||||
[gradle]
|
||||
symbol = " "
|
||||
@@ -0,0 +1,27 @@
|
||||
# This file REPLACES stow's built-in default ignore list, so the useful
|
||||
# defaults are repeated here on purpose. Transcribed from Stow.pm
|
||||
# (stow 2.4.1) plus a few macOS/editor extras. Re-check on stow upgrades.
|
||||
|
||||
# --- this package's housekeeping ---
|
||||
README.md
|
||||
^local$
|
||||
.zsh/completions
|
||||
.zsh/local
|
||||
|
||||
# --- Git ---
|
||||
\.git
|
||||
\.gitignore
|
||||
\.gitmodules
|
||||
|
||||
# --- editor / OS junk (stow defaults + extras) ---
|
||||
.+~ # emacs backup files
|
||||
\#.*\# # emacs autosave files
|
||||
\.DS_Store # macOS Finder junk
|
||||
\._.+ # macOS AppleDouble files
|
||||
\.sw[a-z] # vim/neovim swap files
|
||||
.*\.sw[a-z]
|
||||
|
||||
# --- docs stow would otherwise link into $HOME (stow defaults) ---
|
||||
^/README.*
|
||||
^/LICENSE.*
|
||||
^/COPYING
|
||||
@@ -0,0 +1,17 @@
|
||||
alias g=git
|
||||
alias ktl=kubectl
|
||||
alias ktx=kubectx
|
||||
alias ls='eza'
|
||||
alias ll='eza -l'
|
||||
alias la='eza -la'
|
||||
alias lau='eza -la -s modified'
|
||||
alias las='eza -la -s size'
|
||||
alias ..='cd ..'
|
||||
alias ...='cd ../..'
|
||||
|
||||
alias -s go=$EDITOR
|
||||
alias -s yaml=$EDITOR
|
||||
alias -s yml=$EDITOR
|
||||
alias -s json=$EDITOR
|
||||
alias -s conf=$EDITOR
|
||||
alias -s md=$EDITOR
|
||||
@@ -0,0 +1,47 @@
|
||||
# zsh
|
||||
|
||||
GNU Stow package for my zsh setup. Stowed from the repo root with the
|
||||
`.stowrc` defaults (`--dotfiles --target=$HOME`), i.e.:
|
||||
|
||||
```sh
|
||||
stow zsh # stow (idempotent, safe to re-run)
|
||||
stow -R zsh # re-stow after adding/removing files in this package
|
||||
stow -D zsh # unstow
|
||||
```
|
||||
|
||||
## Layout
|
||||
|
||||
| In this repo | Becomes (symlink) |
|
||||
|-------------------------|-----------------------|
|
||||
| `dot-zshrc` | `~/.zshrc` |
|
||||
| `.zsh/alias.zsh` | `~/.zsh/alias.zsh` |
|
||||
|
||||
Other dirs under `~/.zsh/` (e.g. `local/`, `completions/`) are **not**
|
||||
managed by stow — they are plain host-side directories and never touch
|
||||
this repo.
|
||||
|
||||
## Host-local config: `~/.zsh/local`
|
||||
|
||||
`~/.zshrc` sources every `*.zsh` file in `~/.zsh/local/` at the **end**
|
||||
of the file, in alphabetical order — so anything there can override
|
||||
aliases, PATH, env vars, etc. set earlier.
|
||||
|
||||
This is the place for **host-specific, non-shared** config: business/work
|
||||
inits, private env vars, machine-specific paths, per-host aliases and
|
||||
functions.
|
||||
|
||||
The directory is **not** in the repo — it exists only on each host, so
|
||||
after cloning + stowing on a new machine, create it once:
|
||||
|
||||
```sh
|
||||
mkdir -p ~/.zsh/local
|
||||
```
|
||||
|
||||
(The sourcing loop in `.zshrc` tolerates the directory being missing.)
|
||||
|
||||
## Notes
|
||||
|
||||
- Editing existing files (`.zshrc`, `alias.zsh`) needs no restow — they're
|
||||
symlinks. Only new/deleted files in this package require `stow -R zsh`.
|
||||
- zinit, Powerlevel10k and the plugins auto-clone on first shell start;
|
||||
first launch may take a minute.
|
||||
@@ -0,0 +1,94 @@
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# Set the directory we want to store zinit and plugins
|
||||
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
|
||||
|
||||
# Download Zinit, if it's NOT there yet
|
||||
if [ ! -d "$ZINIT_HOME" ]; then
|
||||
mkdir -p "$(dirname $ZINIT_HOME)"
|
||||
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
|
||||
fi
|
||||
|
||||
# Source/Load zinit
|
||||
source "${ZINIT_HOME}/zinit.zsh"
|
||||
|
||||
# Add in Powerlevel10k
|
||||
zinit ice depth=1; zinit light romkatv/powerlevel10k
|
||||
|
||||
# Add in zsh plugins
|
||||
zinit light zsh-users/zsh-syntax-highlighting
|
||||
zinit light zsh-users/zsh-completions
|
||||
zinit light zsh-users/zsh-autosuggestions
|
||||
zinit light Aloxaf/fzf-tab
|
||||
|
||||
# Add in snippets
|
||||
zinit snippet OMZP::aws
|
||||
zinit snippet OMZP::gcloud
|
||||
zinit snippet OMZP::kubectl
|
||||
zinit snippet OMZP::kubectx
|
||||
zinit snippet OMZP::command-not-found
|
||||
|
||||
# Load completions
|
||||
autoload -Uz compinit && compinit
|
||||
|
||||
# Load zmv
|
||||
autoload zmv
|
||||
|
||||
# Recomended
|
||||
zinit cdreplay -q
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
# Keybindings
|
||||
bindkey -v
|
||||
bindkey '^p' history-search-backward
|
||||
bindkey '^n' history-search-forward
|
||||
|
||||
# History
|
||||
HISTSIZE=10000
|
||||
HISTFILE=~/.zsh_history
|
||||
SAVEHIST=$HISTSIZE
|
||||
HISTDUP=erase
|
||||
setopt appendhistory
|
||||
setopt sharehistory
|
||||
setopt hist_ignore_space
|
||||
setopt hist_ignore_all_dups
|
||||
setopt hist_save_no_dups
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_find_no_dups
|
||||
|
||||
# Completion styling
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||
zstyle ':completion:*' menu no
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
|
||||
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath'
|
||||
|
||||
EDITOR=nvim
|
||||
|
||||
# Shell integrations
|
||||
eval "$(fzf --zsh)"
|
||||
eval "$(zoxide init --cmd cd zsh)"
|
||||
|
||||
# Go
|
||||
export PATH="$HOME/go/bin:$PATH"
|
||||
|
||||
# Odin
|
||||
export PATH="$HOME/Repos/odin-lang/Odin:$PATH"
|
||||
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="$HOME/.local/share/nvim/mason/bin:$PATH"
|
||||
|
||||
source "$HOME/.zsh/alias.zsh"
|
||||
|
||||
# Host-local inits: every *.zsh in ~/.zsh/local is sourced in alphabetical
|
||||
# order. Files there are not tracked by the dotfiles repo.
|
||||
for f in "$HOME/.zsh/local"/*.zsh(N); do
|
||||
source "$f"
|
||||
done
|
||||
Reference in new issue
Block a user