# Is it possible to show line numbers in code block?

**URL:** <https://meta.discourse.org/t/is-it-possible-to-show-line-numbers-in-code-block/204178>\
**Category:** Product Support\
**Created:** [September 22, 2021, 7:44am UTC](https://meta.discourse.org/t/is-it-possible-to-show-line-numbers-in-code-block/204178 "2021-09-22T07:44:22Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Ivan\_Rapekas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ivan_rapekas/32/248924_2.png) [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)\
**Post date:** [December 5, 2021, 5:21pm UTC](https://meta.discourse.org/t/is-it-possible-to-show-line-numbers-in-code-block/204178/6 "2021-12-05T17:21:12Z")

</div>

Fantastic work was done! 👏 👏 👏

Many thanks, Arjan! Everything works both in default light and dark theme.

 ![изображение](https://global.discourse-cdn.com/meta/original/3X/4/3/43bc0adf47e4314244857be3faf34dce678fd16c.png)  
 ![изображение](https://global.discourse-cdn.com/meta/original/3X/c/6/c604729548d1a2c72bb0dd01bfc8c988248e8746.png)

Share my configuration:  
[css.txt](https://meta.discourse.org/uploads/short-url/uArEESVYTSvCXvjPXyFFrmyk1aX.txt) (5.7 KB)  
[head.txt](https://meta.discourse.org/uploads/short-url/7e1uHlb1oeCv7xGKEzbSIIJUbpf.txt) (1.2 KB)

CSS customizations:

```plaintext
// Inline code colors
// Green thumbs-up
// Green assignee icon
// Grey or blue headers
// Center images
// Word wrap in code block + full content
// Fix huge topic margins
// Gitlab theme component font color fix (darker)
// Original <kbd> over Gitlab Markdown flavors theme component
// Line numbering in code blocks by @Arjan

```

Components installed:

```plaintext
https://github.com/discourse/discourse-search-banner
https://github.com/keegangeorge/discourse-markdown-flavors.git
https://github.com/pacharanero/discourse-topic-width-desktop.git

```

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-show-line-numbers-in-code-block/204178)._
