Inheriting language-json styles


#1

I’m defining a new file type .action and want it to inherit language-json styles. My grammar definition is dead simple to start with…

'name': 'Voyent Action' 'scopeName': 'source.action' 'fileTypes': [ 'action' ] 'patterns': [ { 'include': 'source.json' } ]

Now if I have a the exact same text in files test-action.json and test.action, they don’t look the same in the editor…

test-action.json

test.action

Specifically the key/value pairs are red/green for .json and green/green for .action. When I inspect the elements they all have the same scope string.quoted.double.json.

I seem to be missing something here, but not quite sure what.


#2

One of my colleagues figured this out. The scope name has to be source.json.action to inherit json styles.