Hide YAML frontmatter from editor view

- Add frontmatterHide extension that hides --- ... --- block at top of files
- Shows collapsed --- indicator, reveals on cursor focus
- Place initial cursor after frontmatter so content is visible on load
- Remove frontmatter detection from livePreview (handled by dedicated extension)
- Add Playwright test for frontmatter hiding

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
lucaronin
2026-02-14 20:25:02 +01:00
parent 94530e9161
commit f3b6b4ed4a

View File

@@ -30,6 +30,7 @@ class HrWidget extends WidgetType {
function buildDecorations(view: EditorView): DecorationSet {
const decs: Range<Decoration>[] = []
const tree = syntaxTree(view.state)
tree.iterate({