I am building a package which, at some point, inserts text into a .feature file.
Is there any option when creating the new text editor in which I can specify which syntax I would like to use (if available, since gherkin syntax doesn’t come built in Atom)?
This is how I am generating the editor:
gsText = document.createElement 'atom-text-editor'; gsText.setAttribute 'mini','' gsText.setAttribute 'gutter-hidden','' gfText.dataset.grammar = "source feature"
I would like to avoid taking those textEditor later and using
textEditor.setGrammar('language') since it doesn’t work as expected.
EDIT: I am doing things right. It’s just the syntax highlighting package for gherking language which is not behaving as I wanted to.
thank you for your clues!