Commit graph

4 commits

Author SHA1 Message Date
Barrett Ruth
f42f958c24
feat: replace npm live-server with pure-Lua HTTP server (#29)
## Problem

The plugin requires users to install Node.js and the `live-server` npm
package globally. This is a heavyweight external dependency for what
amounts to a simple local dev-server workflow, and it creates friction
for users who don't otherwise need Node.js.

## Solution

Replace the npm shell-out with a pure-Lua HTTP server built on `vim.uv`
(libuv bindings), eliminating all external dependencies. The new server
supports static file serving, SSE-based live reload, CSS hot-swap
without full page reload, directory listings, and recursive file
watching with configurable debounce.

Minimum Neovim version is bumped to 0.10 for `vim.uv` and `vim.ui.open`.
The old `args`-based config is automatically migrated with a deprecation
warning.

Closes #28.
2026-03-02 23:16:35 -05:00
Barrett Ruth
baeb211719
fix: add one-time deprecation notice for Neovim < 0.10 (#31)
## Problem

v0.2.0 will replace the npm `live-server` dependency with a pure-Lua
HTTP
server that requires Neovim >= 0.10 (`vim.uv`, `vim.ui.open`). Users on
older Neovim versions who auto-update will get a cryptic Lua error with
no
explanation or migration path.

## Solution

Add a one-time notification at plugin load time for Neovim < 0.10 users.
The notice tells them v0.2.0 will require Neovim >= 0.10 and shows how
to
pin to the `v0.1.6` tag. A marker file in `stdpath('data')` ensures the
message fires exactly once, ever. The plugin continues to work normally
after the notice — no functionality is removed.

This is the last release supporting Neovim < 0.10 and npm `live-server`.
Tag as `v0.1.6` after merge.
2026-02-23 13:08:52 -05:00
Barrett Ruth
26dafe2f08
feat: add <Plug> mappings (#27)
## Problem

Users who want keybindings must call Lua functions directly or wrap
commands in closures. There is no stable public API for key binding.

## Solution

Define <Plug> mappings in the plugin file and document them in a new
MAPPINGS section in the vimdoc.
2026-02-07 14:02:00 -05:00
af7255b0a0 refactor: use vim.g config and lazy loading
Replace setup() with vim.g.live_server configuration. Add plugin/ file
with load guard and user commands for proper lazy loading.
2026-02-03 20:13:12 -05:00