diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml index 840f693..3b503f6 100644 --- a/.github/workflows/demo.yml +++ b/.github/workflows/demo.yml @@ -16,7 +16,7 @@ jobs: with: neovim: true version: stable - - uses: charmbracelet/vhs-action@v2 + - uses: charmbracelet/vhs-action@v3 with: path: demo/demo.tape - uses: actions/upload-artifact@v4 diff --git a/demo/demo.gif b/demo/demo.gif new file mode 100644 index 0000000..6e676ec Binary files /dev/null and b/demo/demo.gif differ diff --git a/demo/demo.tape b/demo/demo.tape index 6e19a5e..fdee5cf 100644 --- a/demo/demo.tape +++ b/demo/demo.tape @@ -73,6 +73,12 @@ Sleep 4s Type "q" Sleep 300ms +# 6. Reopen the file: the statusline count and the boxes come back. +Type ":w | bd | e pkg/controller/reconcile.go" +Sleep 500ms +Enter +Sleep 2.5s + # Clean up. Hide Type ":qa!" diff --git a/demo/init.lua b/demo/init.lua index 38cbffc..01357d8 100644 --- a/demo/init.lua +++ b/demo/init.lua @@ -1,4 +1,10 @@ -- Minimal config for the VHS demo: `vhs demo/demo.tape` from the repo root. +-- Older Neovims draw Vim's legacy 16-color scheme: fail instead of recording it. +if vim.fn.has("nvim-0.10") == 0 then + io.stderr:write("demo needs Neovim 0.10+, got " .. table.concat({ vim.version().major, vim.version().minor, vim.version().patch }, ".") .. "\n") + vim.cmd("cquit") +end + local repo = vim.fs.dirname(vim.fs.dirname(debug.getinfo(1, "S").source:sub(2))) vim.opt.runtimepath:prepend(repo) @@ -7,8 +13,12 @@ vim.opt.number = true vim.opt.signcolumn = "yes" vim.opt.termguicolors = true vim.opt.swapfile = false +vim.opt.hlsearch = false -- keep search matches from lingering in the recording vim.opt.shortmess:append("I") +vim.opt.showcmd = false -- no pending "]" of "]a" in the corner vim.opt.laststatus = 3 +-- File on the left, the buffer's annotation count ("NOTE 2") on the right. +vim.opt.statusline = " %f %m%=%#DiagnosticInfo#%{v:lua.require'annotate'.statusline()}%* %l:%c " require("annotate").setup({ -- Throwaway store, so the demo never touches real annotations.