-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Disable auto-pairing for '
in Rust
#1347
Comments
So this was a TODO in the original implementation that @dead10ck removed in 94535fa#diff-50a1c8d85a9ae0f5840c9cf42a8de23831e9fa1c8454573136cdeb2deb0f48ddL50 so I assumed it was resolved? If not we should disable |
This definitely doesn't encapsulate everywhere where lifetimes can appear. I'd more think that, rather than this sort of incredibly specific special case, auto pairing |
Ah, I think I deleted that todo by mistake; I had meant to put it at the top in the consolidated list of todo's, but I must have missed that one, sorry about that. This problem can't be solved currently without completely disabling auto pairing ' for every language, which would be kind of unfortunate. It's worth noting that there are lots of languages that have single-quoted strings, like Python and bash to name but two; Rust is the only language I know of with this problem. This issue can only be addressed by #992, which is on my to do list; I've just been trying to order things by my own impression of what would give the best quality of life improvements for the largest common denominator. I'm currently working on delete removing auto pairs, and I planned on doing the language config stuff after that. If we wanted a quick and dirty fix, we could make a global auto pairs config option to let people choose what they want to pair globally, and follow it up with the more complicated per language config. Though this would mean quickly introducing and then deprecating a config option. @archseer what do you think? Edit: come to think of it, maybe it wouldn't have to be thrown away. The global option could serve as the default that all languages inherit without explicit config, and for documents without a supported language. And it wouldn't be too difficult I don't think. The only thing I've been pondering is whether the auto pairs hook should move into term so it has access to Editor for the config, or if the pairs should just be passed into the hook function. |
Just as a heads up, I've started work on a global config option like I mentioned above. |
Is it possible for auto-pairing for
'
to be disabled for Rust specifically? As it's quite annoying for lifetimes, and IMO adding the closing'
manually for character literals is much less of a hassle than manually removing the closing'
for lifetimes.The text was updated successfully, but these errors were encountered: