I ran into PATH issue on MacVim(GUI vim for MacOS). What I found after I googled around is using .zprofile over .zshrc.

I put .zprofile which is a really simple one.

if [ -f ~/.zshrc ]; then
    . ~/.zshrc
fi

I let .zprofile reads .zshrc to avoid duplicate variable definitions.

A major difference in both files is the shells in which startup files are read.

file shell
.zshrc interactive shell
.zprofile login shell

When we use terminal, such as Terminal, iTerm, zsh is run in interactive shell. However, MacVim is running non-interactive shell. Therefore, user-defined paths in .zshrc won’t be read on MacVim


discussion