If you add set path+=**5 to your vimrc then suddenly gf works how you'd want with site-packages and node_modules e.g. when my cursor is on anthropic.types on the import line gf takes me to the directory venv/lib/python3.12/site-packages/anthropic/types/