Register
4coder»Forums»How to create a custom lexer?
Samuel Deboni Fraga
1 posts
How to create a custom lexer?
1 month, 1 week ago Edited by Samuel Deboni Fraga on Oct. 21, 2020, 3:16 p.m. Reason: Initial post
I'm new to the 4coder customization layer, and I'm trying do add support for the zig programming language.

How can I create a custom lexer? and use it to have syntax highlighting on zig files.
Simon Anciaux
919 posts
How to create a custom lexer?
1 month, 1 week ago
If you only want basic syntax highlighting you can do something like "Adding keywords to the syntax highlighting" from the wiki (using the draw_string_highlights method).

If you really want a lexer, you'd better ask Allen on the 4coder discord or by e-mail. To my knowledge it's kind of hard to do in the current version, but I've never tried it.