Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Advanced Codeblock

lijyzelijyze17k downloads

Add additional features to code blocks.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates9

Add additioinal features to code blocks.

Demo

demo

Feature

  1. Add line numbers to code block
  2. Add line highlight to code block

Usage

All features won't apply universally, if you need any feature, you need to correctly specify params to specific code block. Params should be split by ' '.

Feature param description
show line numbers nums
highlight line {a, b-c} brackets matter

Notice

  • Code block won't update in preview mode if you only change params of blocks.

    Obsidian cache every section of artical, but it directly ignore anything follows the first space after ```language. Which means if you only change params of a code block, obsidian will think nothing has been changed, so it won't call any post processor in preview view render process.

Manually installing the plugin

  • Copy over main.js, styles.css, manifest.json to your vault VaultFolder/.obsidian/plugins/obsidian-advanced-codeblock/.

Releases

1.1.0

  1. Funcitonalities are available in live-preview mode!

Donating

59%
HealthFair
ReviewCaution
About
Add line numbers and line highlights to code blocks. Append space-separated params after the code-fence language (for example nums or highlight 3 or highlight 2-4) to enable features; features apply only when correct params are specified and work in live-preview mode.
CodeFormatting
Details
Current version
1.1.5
Last updated
3 years ago
Created
4 years ago
Updates
9 releases
Downloads
17k
Compatible with
Obsidian 0.12.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
lijyzelijyze
github.com/lijyze
GitHublijyze
  1. Community
  2. Plugins
  3. Code
  4. Advanced Codeblock

Related plugins

Templater

Create and use dynamic templates.

Mermaid Tools

Improved Mermaid.js experience: visual toolbar with common elements and more.

Linter

Format and style your notes. Linter can be used to format YAML tags, aliases, arrays, and metadata; footnotes; headings; spacing; math blocks; regular Markdown contents like list, italics, and bold styles; and more with the use of custom rule options.

Easy Typing

Auto format when typing.

PlantUML

Generate PlantUML diagrams.

Admonition

Admonition block-styled content.

Kroki

Render Kroki diagrams.

Colored Text

Color the selected texts.

Blur

Create obfuscated blocks of text.

VSCode Editor

Edit Code Files like VSCode.