Fretboard Renderer for VSCode
Render guitar fretboard diagrams — chord shapes, scale boxes, whatever — as SVG, directly in VSCode's built-in Markdown preview. Write a lightweight YAML shorthand in a ```fretboard fenced code block; the preview renders it as a diagram.
This is the VSCode counterpart to the Fretboard Renderer Obsidian plugin — same YAML syntax, same rendering engine, shared from the same repository.
Example
```fretboard
startFret: 0
notes:
- {s: 6, f: 0, label: root}
- [5, 2]
- [4, 2]
- [3, 1]
- [2, 0]
- [1, 0]
```
Open Markdown Preview (Ctrl+Shift+V / Cmd+Shift+V) to see it rendered.
Syntax
Full YAML syntax reference — every field, absolute/relative mode, chord and scale naming, virtual notes, and so on — lives in the main repository's README. This extension implements the same syntax; nothing VSCode-specific about it.
Configuration
Settings are layered the same way as the Obsidian plugin (System < Global < Local), with System and Global mapped onto VSCode's own mechanisms:
System (installation-wide default): open VSCode's Settings (Ctrl+, / Cmd+,) and search for "Fretboard Renderer", or edit settings.json directly under the fretboardRenderer.* keys (e.g. fretboardRenderer.orientation, fretboardRenderer.labelMode). Every field from the Obsidian plugin's settings tab is available here.
Global (workspace-wide override): add a fretboard-renderer.yaml file at the workspace root — same format as the Obsidian plugin's vault-wide config file:
orientation: vertical
fretCount: 5
labelMode: note
Local (per-diagram override): any key inside a ```fretboard block itself, same as in Obsidian.
Autocomplete
Inside a ```fretboard block, IntelliSense suggests keys and values as you go — same context-aware behavior as the Obsidian plugin (keys before :, values after, scoped to notes/boxes/barre/diagrams nesting).
VSCode only auto-invokes the suggestion popup on non-word characters, so it appears automatically right after typing : or a space. To bring it up anywhere else (e.g. the very first letter of a key), press Ctrl+Space (Cmd+Space on macOS).
Known limitations (MVP)
- Global config (
fretboard-renderer.yaml) is re-read on every preview render, not watched for changes independent of the note itself.
License
MIT