While using naming conventions to determine the file-type has always been a dumb idea, it has historical reasons. I wonder why anyone would think it to be a good idea to break with that concept. But let’s stay on topic.
From what I can tell, you cannot use RegEx for
fileType matches. However, it lets you specify full file-names, even though this has limitations (e.g.
some.file.type also matches the type
file.type). So, if your prefix never changes, you could simply provide
But I guess it’s not that simple.
I haven’t tested this, but you could try omitting the
fileType altogether and programmatically set the grammar using in the
onDidOpen event. Match whether the file-name fits the structure, then set the grammar:
const editor = atom.workspace.getActiveTextEditor();
const grammar = atom.grammars.grammarForScopeName('source.singularity');
Note: the Atom blog mentions that “the existing APIs that deal with configuring a grammar on an editor are being altered.”