I'm trying to make a new, quite simple grammar for Atom, just for my text editing needs. Either that or be able to modify the Markdown grammar. My problem is I cannot seem to even get a test working...
This is the guide I followed, I've also tried Atom's flight manual.
Here's my package.json:
{
"name": "language-mylanguage",
"version": "0.0.0",
"description": "Mylanguage language support in Atom",
"engines": {
"atom": "*"
},
"dependencies": {},
"repository": {
"type": "git",
"url": ""
},
"bugs": {
"url": ""
},
"license": "MIT"
}
And styles/language-mylanguage.less:
@import "ui-variables";
.mylanguage {
color: red;
}
.text {
color: blue;
}
And grammars/mylanguage.cson:
'scopeName': 'source.mylanguage'
'name': 'Mylanguage'
'fileTypes': ['md', 'txt']
'patterns': [
{
'match': '\\bLorem\\b'
'name': 'text.mylanguage'
}
]
And finally my test file:
# H1
## H2
### H3
#### H4
Lorem Ipsum
[Text 1]
{Text 2}
%Text 3%
^Text 4^
> Text 5
++ Comment ++
Those are the only files I have in the package folder. I have so far tried refreshing through view menu, and quitting & restarting. Please help!
Edit: From the code I have currently I expected Lorem to be in blue, while rest is in red.