Skip to content

VS Code CustomLanguage support doesn't handle lineComment config object #58

Description

@wabain

When using a particular file format in VS Code I noticed that this extension wasn't performing wrapping for line comments. It looks like this happened because the CustomLanguage handling that populates rewrap's config from a language-configuration.json expects the comments.lineComment field to be a string. VS Code now allows that field to be either a string or an object containing a "comment" property, like:

{
  "comments": {
    "lineComment": {
      "comment": "//",
      "noIndent": true
    },
    "blockComment": ["/*", "*/"]
  }
}

Note: I'm not actually sure what noIndent is supposed to do, although it seems like it might be relevant for this extension. In my case the language configuration didn't actually need to use the object format, so I just changed it to use a string and confirmed that rewrap started working.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions