Skip to content

Continue // line comment on Enter in SCSS#319325

Open
yogeshwaran-c wants to merge 1 commit into
microsoft:mainfrom
yogeshwaran-c:fix/scss-line-comment-onenter
Open

Continue // line comment on Enter in SCSS#319325
yogeshwaran-c wants to merge 1 commit into
microsoft:mainfrom
yogeshwaran-c:fix/scss-line-comment-onenter

Conversation

@yogeshwaran-c
Copy link
Copy Markdown
Contributor

@
Pressing Enter from within a // line comment in an SCSS file does not continue the comment, even though SCSS uses // as its line comment ("lineComment": "//").

This behavior was added for languages using // line comments in #235407 (which fixed #118929), covering cpp, csharp, go, groovy, java, json, less, objective-c, php, rust and swift — but SCSS was missed.

This PR adds the same onEnterRule to extensions/scss/language-configuration.json, matching the form already used in the sibling LESS configuration, so SCSS gets parity. The existing /// doc-comment rule is kept and placed first so the more specific rule still wins.

Refs #118929
@

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates the SCSS language configuration to auto-continue // line comments when pressing Enter.

Changes:

  • Adds a new onEnterRules entry intended to append // on the next line when inside a line comment.

Comment on lines +52 to 57
"action": {
"indent": "none",
"appendText": "// "
}
},
]
}
}
},
// Add // when pressing enter from inside line comment
Comment on lines +46 to +55
"beforeText": {
"pattern": "\/\/.*"
},
"afterText": {
"pattern": "^(?!\\s*$).+"
},
"action": {
"indent": "none",
"appendText": "// "
}
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 this pull request may close these issues.

Automatic indentation within braces does not occur if comment succeeds opening brace

3 participants