wooorm / refractor

Lightweight, robust, elegant virtual syntax highlighting using Prism
MIT License
722 stars 33 forks source link

Add listLanguages method to refractor #17

Closed mearns closed 5 years ago

mearns commented 5 years ago

This is a little hacky because Prism doesn't keep an explicit list of languages, and languages aren't registered directly (a grammar is registered, which can arbitrarily modify the languages collection). Instead, prism has an object that it uses to track its languages, but that object also has methods attached to it, so its own properties include both languages and methods.