Question: Why when I press ‘enter’ in terminal in ‘stripe/gocode’ is very slow to me? Why? Is this related to the configuration I have for p10k?
Claude: ⏺ This is almost certainly related to p10k (Powerlevel10k) running git status on every prompt render. The stripe/gocode repo is massive, and git status checks are slow on large repos.
From Claude:
4. Nuclear option: disable git segment in gocode
Add to ~/.zshrc before sourcing p10k:
Disable VCS segment in specific directories
if [[ $PWD == /stripe/gocode ]]; then typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN=‘/stripe/gocode’ fi
Or more elegantly in ~/.p10k.zsh: typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN=‘/stripe/gocode’
TLDR
File: ~/.p10k.zsh, search for this line:
# Don't show Git status in prompt for repositories whose workdir matches this pattern.
# For example, if set to '~', the Git repository at $HOME/.git will be ignored.
# Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'.
typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'Example:
typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~|*/parent_folder/big-repo-1*|*/parent_folder/big-repo-2*|*/parent_folder/big-repo-3*'