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

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

Closed
wkillerud opened this issue May 28, 2022 · 2 comments · Fixed by #150599
Closed
Assignees
Labels
css-less-scss Issues and items concerning CSS,Less,SCSS styling feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@wkillerud
Copy link
Contributor

wkillerud commented May 28, 2022

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

@aeschli aeschli added this to the May 2022 milestone May 30, 2022
@aeschli aeschli added css-less-scss Issues and items concerning CSS,Less,SCSS styling feature-request Request for new features or functionality labels May 30, 2022
aeschli added a commit that referenced this issue May 30, 2022
Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label May 30, 2022
@aeschli aeschli added the verification-needed Verification of issue is requested label May 30, 2022
@VSCodeTriageBot VSCodeTriageBot added insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels May 31, 2022
@rchiodo rchiodo added the verified Verification succeeded label May 31, 2022
@rchiodo
Copy link
Contributor

rchiodo commented May 31, 2022

I'm not sure if this is working or not? Is it supposed to automatically add comments on hitting return?

I get this:
scss

@rchiodo rchiodo reopened this May 31, 2022
@rchiodo rchiodo added verification-found Issue verification failed and removed verified Verification succeeded labels May 31, 2022
@VSCodeTriageBot VSCodeTriageBot removed the insiders-released Patch has been released in VS Code Insiders label May 31, 2022
@rchiodo
Copy link
Contributor

rchiodo commented May 31, 2022

Sorry my mistake. It's only doc comments that it does that. ///

@rchiodo rchiodo closed this as completed May 31, 2022
@rchiodo rchiodo added verified Verification succeeded and removed verification-found Issue verification failed labels May 31, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
css-less-scss Issues and items concerning CSS,Less,SCSS styling feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants