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
Better ToggleComments support for Comment and Doc #10113
Comments
Yeah, back in #6713 we've ommited |
Oh, now I get why we didn't add support for
How would you decide that we should insert |
What if we check what type of prefix is the nearest Comment before or after the current line. Then use the same prefix with matching one of the I am not sure if this can be done. Even that, with the Uncomment case, we can that to remove the right prefix by matching the |
…n language config (#10126) This does not try to heuristically pick a comment style based on surroundings anyhow. It does improve our story around uncommenting though. Fixes #10113. Release Notes: - Fixed "Toggle comment" action not working in presence of non-default line comments such as doc comments in Rust ([#10113](#10113)).
Check for existing issues
Describe the feature
We have
line_comments
in language config.toml.For example the Rust:
But by my test, the Toggle Comments command just work for the first item in line_comments.
If applicable, add mockups / screenshots to help present your vision of the feature
As shown in the screen recording, if ToggleComments can correctly handle Rust's
///
and//!
, it will be more convenient for us to write documents.For example, many times we need to write a large section of Rust code example. So we many write the code first, and then add
///
prefix to them. If the ToggleComments can handle that, we can just select the all new addition code and run ToggleComments to add the prefix.The text was updated successfully, but these errors were encountered: