Skip to content
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

Continue comment when pressing "Enter" within a comment #42

Closed
maxdeviant opened this issue May 30, 2023 · 0 comments · Fixed by #43
Closed

Continue comment when pressing "Enter" within a comment #42

maxdeviant opened this issue May 30, 2023 · 0 comments · Fixed by #43

Comments

@maxdeviant
Copy link
Member

Something nice that VS Code does when working with Rust code is continuing the current comment when you press Enter while in the comment.

For example, if we had the following code with our cursor at the end of the /// This is a commnent line:

/// This is a comment
fn example() {}

Pressing Enter would result in the comment being extended to the next line:

/// This is a comment
/// 
fn example() {}

From a bit of exploration it seems like we need to do something like this within the extension: https://github.com/rust-lang/rust-analyzer/blob/bc8295255c5bcc293251d47590dcbfd320eaab87/editors/code/src/config.ts#L119-L165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant