How to make 'toggle comments' work with my language?


#1

What do I have to do to make ‘toggle comments’ work with my language? I assume it is some part of the syntax, but couldn’t find it easily looking at other languages.


Extending a grammar
#2

You need to specify editor.commentStart and optionally editor.commentEnd (if your language needs it) in your package’s scoped-properties.

For example from the JavaScript package:

'.source.js':
  'editor':
    'commentStart': '// '

#3

How do I go about doing this with the current version of Atom?


#4

It is still the same as above. The file just moved in the repository. You can see it at its new location here.


#5

Thank you!