Commit graph

6 commits

Author SHA1 Message Date
Barrett Ruth
c5c69e9ec2
fix: prevent infinite loop when started from non-filesystem buffer (#35)
Some checks failed
quality / changes (push) Has been cancelled
quality / Lua Format Check (push) Has been cancelled
quality / Lua Lint Check (push) Has been cancelled
quality / Lua Type Check (push) Has been cancelled
quality / Markdown Format Check (push) Has been cancelled
## Problem

Calling \`:LiveServerStart\` from an oil.nvim buffer (or any URI-scheme
buffer) caused two issues: first, \`find_cached_dir\` entered an
infinite loop as \`fnamemodify(cur, ':h')\` degenerated to \`.\`,
freezing Neovim and pegging the CPU; second, even after fixing the loop,
the server would error out instead of doing the right thing — serving
the directory being browsed.

## Solution

Add a progress check to \`find_cached_dir\` so it bails if the path
stops changing. Fix \`resolve_dir\` to detect URI-scheme buffer names
(e.g. \`oil:///path/to/dir\`) and extract the real filesystem path from
them, so \`:LiveServerStart\` correctly serves the browsed directory.
Also corrects the bug report repro template (\`require('lazy')\`, \`lazy
= false\`, no deprecated \`opts\`) and ignores \`repro.lua\`.

Closes #34
2026-03-06 11:58:46 -05:00
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
0745539d40 fix: suppress deprecation stack trace for cleaner UX 2026-02-03 21:05:52 -05:00
8f4693452a feat: run pre-commit 2026-02-03 21:03:18 -05:00
657575ae30 chore: add CI, pre-commit, and luarocks configs
- Add CI workflows (format, lint, typecheck)
- Add quality workflow
- Add luarocks publishing workflow
- Add pre-commit configuration
- Add luarocks rockspec
- Add selene.toml for linting
- Remove issue template
2026-02-03 21:01:57 -05:00
Barrett Ruth
46df6ae7e6 issue template 2023-01-07 21:53:58 -06:00