Is it possible to add line numbers to code blocks?

WHAT DO YOU RECOMMEND

A simple option to choose whether a code block will have line numbers or not.

HOW COULD IT BE DONE

Up to developers to decide, seems pretty standard solution, design-wise.

REAL WORLD USE CASES

I find it very hard to refer to code parts when doing some code explanations and such. It would be nice to have a code block with the code and line numbers so I can refer to line numbers in paragraphs below.

7 Likes

Added my +1 for this. I intend to use Anytype for doing some code explanations as well and just having a toggle on/off for line number displays would be so helpful.