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

Canvas Code Links

OleksandrOleksandr15 downloads

Open code files at specific lines using relative paths directly from Canvas cards and markdown links.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates2

English | Русский

Canvas Code Links

Link Canvas cards and notes straight to a line of source code. Write [Player](../src/Player.cs#L105) and a click opens the file at that line in VS Code, Cursor, Rider or Obsidian. Built for documenting a game or any code base that lives next to your vault.

Works on desktop and on mobile (iOS / Android).

Features

  • Relative paths. Links are resolved from the folder of the current .canvas / note first, then from the vault root. Links stay portable across Windows, macOS and Linux.
  • Exact line and column. :42, :42:15, #L42, #L42C10.
  • Several editors. VS Code (also Insiders), Cursor, JetBrains Rider, Obsidian itself, or your own URI / CLI template.
  • Insert Code Link command. Builds a link from the clipboard (path:line), computes the relative path and checks the file exists.
  • Badges. Code links in Canvas cards and notes get an icon and tooltip.
  • Mobile. Built-in read-only code viewer, or open your repository on the web (GitHub, GitLab, github.dev).

Link syntax

Format Example
Line [script.cs:42](./scripts/script.cs:42)
Line and column [script.cs](./scripts/script.cs:42:15)
GitHub style [Player.cs](../src/Player.cs#L105)
Explicit scheme [script.cs](code:./src/script.cs:50)
Wikilink [[./scripts/script.cs:42]]
Obsidian URI obsidian://canvas-code-link?file=./script.cs&line=42

A link is treated as code when it has a recognized extension (configurable) or an explicit code: / file:// / vscode://file/ prefix.

Installation

Until the plugin is available in the community list, install it manually:

  1. Download main.js, manifest.json and styles.css from the latest release.
  2. Copy them to <vault>/.obsidian/plugins/canvas-code-links/.
  3. In Obsidian: Settings → Community plugins, turn off Restricted mode, reload, and enable Canvas Code Links.

On mobile, sync the vault (including the .obsidian folder) with Obsidian Sync, iCloud, Syncthing or similar, then enable the plugin on the phone.

Mobile

A phone cannot launch desktop editors, so choose a mode in Settings → Canvas Code Links → Mobile:

Mode What it does
Built-in code viewer (default) Shows the file with the target line highlighted. Works offline.
Open web URL Opens a repository URL built from a template, e.g. https://github.com/OWNER/REPO/blob/main/{relpath}#L{line}

The code must be inside the vault (for example a game repo synced with Obsidian Git). Links in the editor are followed with Ctrl/Cmd+click, so on a phone use reading view or rendered Canvas cards.

Settings

  • Default Code Editor, plus custom URI and CLI templates ({path}, {uripath}, {line}, {col}).
  • Preferred path resolution root and fallback resolution.
  • Recognized code file extensions.
  • Decorate code links and show notification on open.
  • Mobile open mode and web URL template.

Privacy and disclosures

  • No telemetry, no accounts, no ads.
  • Network: the plugin makes no requests of its own. In Open web URL mode on mobile it asks your system to open the URL you configured in the browser.
  • External programs (desktop): it opens editor URIs (vscode://, cursor://, jetbrains://, or your custom URI) through the operating system. With the Custom CLI Command editor it runs the shell command you typed in the settings, with the file path, line and column substituted in. Only set commands you trust.
  • Files outside the vault (desktop): to check that a linked file exists, the plugin looks at paths resolved from the vault and, for absolute paths, anywhere on disk. It only reads file existence; it never reads or changes file contents on desktop. The mobile viewer reads the linked file from inside the vault to display it.

Development

npm install
npm test          # tests run against the real src/*.ts (obsidian is mocked)
npm run build     # type-check and produce main.js
npm run dev       # watch mode

To release: bump version in manifest.json and package.json, add the version to versions.json, then push a tag that equals the version (for example 1.1.1). The Release workflow builds and publishes main.js, manifest.json and styles.css.

License

MIT

HealthExcellent
ReviewSatisfactory
About
Link Canvas cards and notes to exact lines and columns in source files and open them in VS Code, Cursor, JetBrains Rider, Obsidian, or via custom URIs. Resolve relative paths cross-platform, display code-link badges and tooltips, support GitHub-style and wikilink syntax, and offer a mobile read-only viewer.
CanvasCodeLinks
Details
Current version
1.1.1
Last updated
4 days ago
Created
4 days ago
Updates
2 releases
Downloads
15
Compatible with
Obsidian 1.4.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
OleksandrOleksandroleksandr-bidiuk
GitHuboleksandr-bidiuk
  1. Community
  2. Plugins
  3. Canvas
  4. Canvas Code Links

Related plugins

ZettelFlow

Turn your Obsidian vault into a visual thinking space for connecting ideas, exploring knowledge, and building your own thinking system.

Excalidraw

Visual PKM powerhouse. Create and edit Excalidraw drawings.

Advanced Canvas

Supercharge your canvas experience. Create presentations, flowcharts and more.

Templater

Create and use dynamic templates.

ExcaliBrain

An interactive, structured mind-map of your Obsidian vault.

Smart Connections

Find related notes and excerpts while writing. Your AI link building copilot displays relevant content in graph + list view. A local embedding model powers semantic search. Zero setup. No API key.

Advanced URI

Control everything with URI.

Breadcrumbs

Visualise the hierarchy of your vault using a breadcrumb trail or matrix view.

Mermaid Tools

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

Supercharged Links

Add attributes to internal links with the values of target note's frontmatter attributes.