Creating simplest possible lang package


#1

I tried to create the simplest possible lang package just to highlight specific words in my log files. So I have mylog.cson:

'fileTypes': [
  'log'
]
'name': 'mylog'
'patterns': [
  {
    'match': '(mykeyword|mykeyword2)'
    'name': 'keyword.control.category.mylog'
  }
]
'scopeName': 'source.mylog'

Saved, reloaded, opened sample.log file, language detected correctly, but content is not parsed, as using Dev Tools, Find, it always says span.source.mylog for each line and doesn’t detect my keywords. Lines look like:

[2016.03.23-15.54.37:056][482]mykeyword:level: something

#2

Take a look at my language-generic-config package for an example of a really, really simple language package.


#3

thanks, unfortunately it’s not so simple as it uses such an advanced things like pattern/include and repository in its grammar, that doesn’t help me to understand what I did wrong