Skip to content

Add an onEnterRule to SCSS language config for SassDoc documentation blocks to append ///  #150598

@wkillerud

Description

@wkillerud

Issue Type: Feature Request

When I write documentation in JavaScript or TypeScript and hit Enter, VS Code appends * so I can keep writing documentation without dealing with comment syntax on the next line. I would love to have that opportunity when writing SassDoc as well.

I experimented with an updated language-configuration.json in an extension I maintain, which seems to do the trick. Would love to have this land upstream so I can avoid duplicating the whole language configuration for SCSS.

{
  "onEnterRules": [
    {
      // Continue with a docblock line when in that context
      "beforeText": "^[\\s]*///.*$",
      "action": {
        "indent": "none",
        "appendText": "/// "
      }
    }
  ]
}

Here's a screen recording demoing the difference in experience today.

CleanShot.2022-05-28.at.11.22.25.mp4

And here it is with the additional onEnterRules.

CleanShot.2022-05-28.at.11.38.23.mp4

VS Code version: Code 1.67.2 (Universal) (c3511e6, 2022-05-17T18:20:57.384Z)
OS version: Darwin arm64 21.5.0
Restricted Mode: No

Metadata

Metadata

Assignees

Labels

css-less-scssIssues and items concerning CSS,Less,SCSS stylingfeature-requestRequest for new features or functionalityverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions