Since this issue has been resolved it’s worth adding this answer.
You can now accomplish this in your settings by modifiying the "editor.wordSeparators" setting.
Here is the default:
"editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"
To allow the selection of $foo you can remove the $ from the above string.