Skip to content

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

Closed

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

  1. dnut commented on Oct 24, 2026

    @dnut
    Owner

    This has been fixed and released in version 18.3.0.

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

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions