-
-
Notifications
You must be signed in to change notification settings - Fork 84
Add text-based surrounding pair implementation #218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Why do we want to switch to this method for languages with syntax tree? |
The main driver for me was being able to select inside brackets within a string, esp eg in talon capture definitions. I could see an alternative where we first run the text-based version if we're within a string or comment, then switch to syntax tree version if we don't find delimiters within the given string / comment. But @AndreasArvidsson may have other thoughts |
Fwiw one disadvantage of text-based approach in languages with syntax tree is that it might be tougher to support those pair types where we know it's a pair because of its node type, eg for html tags |
Combining text with parse tree sounds good |
ok @maciejklimek your code lives to see another day 😊. I updated issue title / description. Lmk if makes sense to you |
I think a good general rule is to have a wide choice of different modifiers available at the backend(vscode side), what do you think? |
Not sure I totally follow, but would a VSCode extension setting not make sense here? Can you give an example of the type of configuration you're after? |
I wasn't sure if the behavior in the second case(the one with the string), would be always preferred. But this case is infrequent enough, that i am also fine with the version you proposed :) |
I think we can start with one behavior and if people find that they have problem with it we can always add a setting or an additional word/modifier later. Does that work for every one? |
👍 |
works for me. fwiw we could potentially get around needing the override behaviour using #124, or by making it so that the scope finder code will expand again if you currently have something of that scope type selected. With the latter you'd just repeat the command to get the bigger scope |
The text was updated successfully, but these errors were encountered: