0
votes

I am building a custom language extension, and am having issues with lineComment in language-configuration.json. My language, oddly, uses "@@" as a line Comment, and I cannot get this to work.

I have tried @@, @@, and so on.

Any tips?

(Updated from a comment):

This is the entirety of my language-configuration.json:

{
     "comments": {
         // single line comment
         "lineComment": "@@"
     },
     // symbols used as brackets
     "brackets": [
         ["{", "}"],
         ["[", "]"],
         ["(", ")"]
     ],
     "autoClosingPairs": [
         ["{", "}"],
         ["[", "]"],
         ["(", ")"]
     ],
     "surroundingPairs": [
         ["{", "}"],
         ["[", "]"],
         ["(", ")"]
     ] }
1

1 Answers

0
votes

This is very similar to the traditional C++ line comment. Here's what I use in my syntax repository:

    {
      "name": "comment.line.double-slash",
      "match": "\/\/.*"
    }

I guess you tried already:

    {
      "name": "comment.line.double-at",
      "match": "\@\@.*"
    }

? I'm not sure if you even need to escape the @ sign, since it has no special meaning in JS regular expressions AFAIK.