Add comment toggle to the custom grammar


Hello guys, need your support

I created my own syntax highlight scheme for the very specific stuff (it works well) but I can not add my new language grammar (called it “snn”) to the existing comment toggle (“Ctrl+/”). I spent several days in searching of the solution, tried to install and modify some packages but unsuccessfully. In my case I need the same “#” comments mark for the line as Python language has.
I believe that it can be done quite easily, but how can I do it?

Thank you in advance.


I’m pretty sure it is controlled by this line in the language settings file, not the grammar definition:


Hi leedohm,

Thank you for your reply - you have directed me to the right way. So I just added the next file /my_language/settings/language-snn.cson with the next content:

    'commentStart': '# '

… and that’s it - problem solved!

Thanx a lot for the support!