Skip to content

feat: emit User autocommand events for server lifecycle#40

Merged
barrettruth merged 2 commits into
mainfrom
feat/user-events
Mar 22, 2026
Merged

feat: emit User autocommand events for server lifecycle#40
barrettruth merged 2 commits into
mainfrom
feat/user-events

Conversation

@barrettruth

Copy link
Copy Markdown
Owner

Problem

There was no way for external code to react to live-server state changes such as starting, stopping, or reloading.

Solution

Fire LiveServerStarted, LiveServerStopped, and LiveServerReload User autocommands with relevant data (port, root, css_only) at each lifecycle point. Document the new events in vimdoc under a new EVENTS section.

Problem: There was no way for external code to react to live-server
state changes such as starting, stopping, or reloading.

Solution: Fire `LiveServerStarted`, `LiveServerStopped`, and
`LiveServerReload` `User` autocommands with relevant data at each
lifecycle point. Document the new events in vimdoc.
Problem: `quality.yaml` had a formatting issue flagged by prettier, and
vimdoc used `|tag|` references for runtime tags not resolvable under
`--no-runtime-tags`.

Solution: Auto-format `quality.yaml` via prettier and replace `|User|`,
`|VimLeavePre|`, and `|vim.notify()|` with backtick-quoted literals.
@barrettruth barrettruth merged commit b69ceae into main Mar 22, 2026
6 checks passed
@barrettruth barrettruth deleted the feat/user-events branch May 5, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant