Add configurable host binding for external access#13
Add configurable host binding for external access#13crankycoder wants to merge 1 commit intoselimacerbas:mainfrom
Conversation
- Add host config option (default: 127.0.0.1, set to 0.0.0.0 for external access) - Pass host to live-server when starting - Update lock.is_server_alive and remote.send_event to accept host parameter - Update browser URL to use configured host - Add minimal test harness
selimacerbas
left a comment
There was a problem hiding this comment.
Hey @crankycoder, thanks for this — the host config itself is clean and well-tested, and we just shipped the live-server.nvim side in v1.3.0.
Before merging this PR, could you split it into two? The reason: it bundles two independent feature sets, and they should be reviewable / revertable separately.
PR A: host config (this PR, scoped down)
hostconfig fieldlock.is_server_alive(host, port)signature changeremote.send_event(host, port, ...)signature change- Browser URL uses configured host
- The test harness (
tests/host_config_test.lua)
PR B: browser opening improvements (new PR)
The changes in util.open_in_browser() are useful but unrelated to host config:
vim.notifyURL alwaysvim.ui.openfallbackvim.fn.executable()checkson_exiterror handling
These are 4 separate improvements and they touch the same function that PR #14 (just merged) modified for WSL support — so you'll need to rebase regardless.
I'll happily merge both PRs. Splitting just keeps the history clean and makes it easier to land each piece without holding the other hostage.
Let me know if you'd prefer me to do the split for you (cherry-picking your commits into two branches) — happy to take that on if it's easier.
This is stacked on : selimacerbas/live-server.nvim#3