lexer/formatter/style/filter search order

Issue #1189 new
Richárd Bánn
created an issue

In functions like get_lexer_by_name plugin objects should be searched first. This way it would be possible to write plugins with alternative lexers, formatters, etc. for existing languages, formats.

Today, using an alternative lexer for say javascript is only possible by monkeypatching pygments. (Am I missing something?)

The only possible drawback I can think of is having existing pygments plugins (or packages that define plugins as a side effect) with alternative built-in lexer (formatter, etc.) implementation, which can be installed by the user "accidentally" and hiding the default pygments implementation.

What do you think?