Lumis code block decorators — MDEx v0.14.7
Lumis code block decorators Copy Markdown View Source Mix . install ( [ { :mdex , "~> 0.13" } , { :lumis_wasm_elixir , "~> 0.26" } , { :kino , "~> 0.16" } ] , config : [ mdex_native : [ syntax_highlighter : :lumis ] ] ) Intro Code block decorators are supported by Lumis syntax highlighting. They add key-value pairs to the code fence info string, which Lumis can use for things like line highlights and per-block themes.
All options and more examples at Guides / Code Block Decorators Decorator: highlight_lines import MDEx.Sigil ~MD""" ```elixir highlight_lines=2,5,8-10 theme=github_light defmodule Lines do @langs ["elixir", "rust"] def langs do @langs end def libs do [:comrak, :ammonia, :lumis] end end ``` """HTML |> Kino.HTML . new ( ) Decorator: theme import MDEx.Sigil ~MD""" ```elixir theme=gruvbox_light defmodule Lines do @langs ["elixir", "rust"] def langs do @langs end def libs do [:comrak, :ammonia, :lumis] end end ``` """HTML |> Kino.HTML . new ( ) Decorator: highlight_lines_style import MDEx.Sigil ~MD""" ```elixir highlight_lines=2 highlight_lines_style="background-color: purple; font-weight: bold; font-size: 18px" defmodule Lines do @langs ["elixir", "rust"] def langs do @langs end def libs do [:comrak, :ammonia, :lumis] end end ``` """HTML |> Kino.HTML . new ( ) Decorator: include_highlights ~MD""" ```elixir include_highlights defmodule Lines do @langs ["elixir", "rust"] def langs do @langs end def libs do [:comrak, :ammonia, :lumis] end end ``` """HTML |> Kino.HTML . new ( ) ← Previous Page Lumis custom theme Next Page → Mermaid