Update snippets.js

Updating the $getScope to return the code scope based on the cursor position.