tmbb
I’ve published the first version of my Makeup library. It’s a syntax highlighter for Elixir in the spirit of Pygments, Currently it highlights Elixir and HTML5 and formats the results as HTML.
GitHub repo: GitHub - elixir-makeup/makeup: Syntax highlighter for Elixir inspired by Pygments · GitHub
Hex package: makeup | Hex
The Elixir highlighter is already quite good in my opinion. The HTML5 hasn’t been tested as thoroughly.
Demo here: https://tmbb.github.io/makeup_demo/ (navigate the links to find the demos for Elixir and HTML5).
Contributions are accepted and highly encouraged, especially new lexers. Documentation on how to write them is pretty much inexistent at the moment, though.
Trending in Announcing
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library.
The progre...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hi everyone :waving_hand:
I’ve been working on PhiaUI, an open-source UI component library for Phoenix LiveView, and I wanted to share i...
New
Other Trending Topics
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
If you haven’t tried Hologram yet, what’s stopped you?
Here’s why I’m asking. Building a framework turns out to be two jobs, the framewo...
New
With advancements in AI gathering pace and set to increasingly accelerate, perhaps it’s worth having an annual thread on the topic - feel...
New
Popcorn, the library that runs Elixir code in the browser, is now stable :popcorn:
This is possible because it now builds on a very stab...
New
In my third year of college, around 2010, I found Erlang. A few years later, I found Elixir. I liked the ideas at once: many small proces...
New
I’ve been tinkering with Lynx (by José) via hold_ledger. I used AI to write the code, a separate specification, the tests, and the Lean p...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #code-sync
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #elixirconf-us
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #blog-post
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #security
- #elixirconf-eu
- #processes
- #api
- #forms
- #hex











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
michalmuskala
Nice! I’m sure this will be useful.
tmbb
It can integrate with earmark with no code changes on the earmark side (and trivial changes on makeup itself). This could probably be used in
ex_docsfor better syntax highlighting of elixir code (the current syntax highlighting isn’t exactly great).But I’d need to write a lexer for iex sessions so that doctests would render fine (the current elixir lexer doesn’t work very well for doctests in some situations.
Eiji
@tmbb:
defvsdefpdefmacrovsdefmacropfunction_callvsmacro_callAt least in some of my libraries I use macros to generate modules and/or functions and I would like to see easy
function_callvsmacro_callespecially after bigger time break between developing code.Overwievbutton on demo page does not work - 404 error pageearmarkandiexwould be awesome!Currently I have different colors in atom and different colors in console, so making them same would be really good point.
Let me know if you need a help with
ex_doc. I was need to know how at least some parts works in it, so I look at code deeper and in case you want to develop fork then I could help. Maybe we could makeex_docmuch more configurable starting from choose tool for syntax highlighting.tmbb
Probably, since atom uses HTML and CSS… But makeup is optimized for offline use, not for interactive editing. And the overhead of communicating with Atom is probably intolerable. The use case for this is to display code on webpages and such.
tmbb
Assuming you want to color the words
def,defp, etc., yes. I mean, not currently, but I can easily add an option in which you pass a map of identifiers to colors (%{"def" => "red", "defp" => "pink", ...}). It won’t play well with styles (you need to set colors that play well with the style), but it’s possible. In fact, Pygments styles have some serious limitations, but they were readily available so I used them. Maybe I’ll overhaul the whole thing.tmbb
No out of the box. Makeup can put pretty colors on your code, but it operates on lexical analysis only. what you want need a deep knowledge about your code.
It can be done pretty easily with the new elixir debug tools, though. I will certainly integrate with it so that you can draw distinctions between functions and mactos, and even have hyperlinks from the function call to its definition. This eas the whole reason for me to want a tool in pure elixir, otherwise I’d just use Python
But that’s still in the future (I have the architecture more or less sketched out in my head, but implementing it might take a while).
tmbb
Again, not possible out of the box. Unlike the feature above, this is not on the roadmap. The focus is on rendering code that’s already been tested and compiles. Again, makeup os veeery stupid and obly cares about the surface details of your code [insert joke about makeup here]
tmbb
Thanks! This button wasn’t even meant to exist. The HTML is a gutted version of the webpage of a PHP project, and I’ve forgotten to remove this button. I’ll remove it tonight.
tmbb
I’ve never mentioned integration with iex. It’s a completely different scope! Adding syntax highlighting to iex is something different (even thiugh makeup might be able to help with that someday).
What I said is that I wanted to have a way of highlighting doctests, which are written as if they were an iex session, including the iex prompt. My elixir lexer won’t deal well with that.
This is a problem if this is meant to integrate with ex_docs.
tmbb
ex_doc can already choose the markdown implementarion, and I think Ican easily create a dummy “markdown implementation” which is just earmark configured to use makeup as a code rendering function (that’s an option you can set). The only thing that would require changin ex_docs source is adding makeup’s stylesheet. I don’t think a full fork is needed… But any help is welcome!