lektor-markdown-highlighter icon indicating copy to clipboard operation
lektor-markdown-highlighter copied to clipboard

Support adding custom lexers

Open item4 opened this issue 9 years ago • 3 comments

I want to add custom lexer what pygments do not support yet.

How can I do it?

item4 avatar Jan 19 '16 23:01 item4

Bump Any news?

kiddten avatar Nov 08 '16 20:11 kiddten

Plugins are installed with pip, so you could tell the pip instance that comes with Lektor (~/.local/lib/lektor/bin/pip on my PC) to install a different version of Pygments, for example from a local directory or from version control. See the pip docs for details.

To automate this, I guess you'd have to clone the plugin and then override the Pygments version requirement in setup.py.

mthuurne avatar Jan 19 '19 11:01 mthuurne

@item4 @kiddick Adding custom lexers is possible, but not quite as easy as custom renderers. Have a look how i've done it for my Lektor plugin: https://github.com/davidferguson/lektor-markdown-mactutor

davidferguson avatar Jun 11 '19 10:06 davidferguson