liuderchi / ide-html

:atom: Atom-IDE for HTML, Go Template, Mustache and other Templates
https://atom.io/packages/ide-html
MIT License
20 stars 5 forks source link

Refine additional grammar #5

Closed liuderchi closed 6 years ago

liuderchi commented 6 years ago

refine #4

liuderchi commented 6 years ago

a quick note on how to list current supported grammars

editor = atom.workspace.getActiveTextEditor()
grammars = editor.getGrammar()
console.log(
  grammars.registry.getGrammars()
    .map(({ scopeName }) => scopeName)
    .filter(name => name.search('text.html') >= 0)
    .sort()
)
/*
[ "text.html.basic", 
  "text.html.erb", 
  "text.html.gohtml", 
  "text.html.jsp", 
  "text.html.mustache", 
  "text.html.php", 
  "text.html.ruby"
]
*/