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

.scss autocomplete block formatting #313

Open
k7y6t5 opened this issue Apr 5, 2018 · 3 comments
Open

.scss autocomplete block formatting #313

k7y6t5 opened this issue Apr 5, 2018 · 3 comments
Labels

Comments

@k7y6t5
Copy link
Contributor

k7y6t5 commented Apr 5, 2018

Entering /** + Enter expands to

/**
 *
 */

when working in .css and .sass files. However, this is the result when working in .scss:

/**
/// 

Here's an example from my current project:

/**
/// [container description]
/// @param  {[type]} $size [description]
/// @return {[type]}       [description]

@mixin container($size) {
...
}

Atom 1.25.1
docblockr 0.13.7
MacOS 10.12.6

@invmatt
Copy link

invmatt commented Apr 19, 2018

In addition to the above comment entering /** will cause the rest of the document to act as it's commented out as it's not closing the comment */

This issue only happens when you're using the extension .scss as .less, .sass, .css all work as intended.

Atom: 1.26.0
Docblockr: 0.13.7

Edit: Added pull request which fixes this issue

@lemnis
Copy link
Contributor

lemnis commented May 24, 2018

It was indeed intended to use //* as starting point, some limitations within the current code forced me to do so.

Switching to block comments will not work, because sassdoc will not pick them up.

e.g.

/// Test
/// @type Number
$var1: 1;

/**
 * Another test
 * @type Number
 */
$var2: 2;

//*
/// Test
/// @type Number
$var3: 3;

Will only output documentation for $var1 and $var3

JSON output of sassdoc
[
  {
    "description": "Test\n",
    "commentRange": {
      "start": 1,
      "end": 2
    },
    "context": {
      "type": "variable",
      "name": "var1",
      "value": "1",
      "scope": "private",
      "line": {
        "start": 3,
        "end": 3
      }
    },
    "type": "Number",
    "access": "public",
    "group": [
      "undefined"
    ],
    "file": {
      "path": "test.scss",
      "name": "test.scss"
    }
  },
  {
    "description": "Test\n",
    "commentRange": {
      "start": 12,
      "end": 13
    },
    "context": {
      "type": "variable",
      "name": "var3",
      "value": "3",
      "scope": "private",
      "line": {
        "start": 14,
        "end": 14
      }
    },
    "type": "Number",
    "access": "public",
    "group": [
      "undefined"
    ],
    "file": {
      "path": "test.scss",
      "name": "test.scss"
    }
  }
]

@MoritzKn
Copy link
Collaborator

So I think it would be best, if /* would extent to this:

/**
 *
 */

but not tigger the generation of a doc comment template. Right?

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

No branches or pull requests

4 participants