Editing Atom's Grammar Files

How do I find the grammar files (such as source.cpp, which I think is the grammar for c++)? I would like to edit the grammar files slightly. I found the repos on GitHub, but I do not want to create an entirely new grammar. Rather, I just want to make a few tweaks to what’s already there. Any tips?

(Also, I’m relatively new to Atom. I’ve tried searching for quite a bit about this topic but couldn’t find anything, so sorry if it’s simpler than I thought.)

1 Like

You want to read this chapter of the Flight Manual and then run apm develop language-c in your terminal. It will clone the language-c repo into the folder Atom thinks your GitHub projects should be in (you can configure this) and create a symlink from that package into .atom/packages/. You can then make changes and see them reflected in Atom as soon as you reload it.

2 Likes