- Lua 89.5%
- Shell 5.2%
- Nix 4.3%
- Just 1%
## Checklist - [x] I have read [CONTRIBUTING.md](https://git.barrettruth.com/barrettruth/live-server.nvim/src/branch/main/CONTRIBUTING.md). - [ ] No AI was used to generate, edit, or review any part of this contribution. ## Problem - Vimdoc still used the `.nvim` filename/topic as the primary help entry. - README had no compact workflow-oriented Quick Start. ## Solution - Rename `doc/live-server.nvim.txt` to `doc/live-server.txt` while preserving legacy help tags. - Add clean `:help live-server` and `:help live-server-migration` pointers. - Add a short Quick Start in README and vimdoc around config, start, toggle, and stop. ## Verification - `git diff --check` - `vimdoc-language-server format --check doc/` - `vimdoc-language-server check doc/` - `nix develop --command just ci` Reviewed-on: #55 |
||
|---|---|---|
| .forgejo | ||
| .github/workflows | ||
| doc | ||
| lua/live-server | ||
| plugin | ||
| .editorconfig | ||
| .gitignore | ||
| .luarc.json | ||
| .styluaignore | ||
| biome.json | ||
| CONTRIBUTING.md | ||
| flake.lock | ||
| flake.nix | ||
| justfile | ||
| LICENSE | ||
| live-server.nvim-scm-1.rockspec | ||
| README.md | ||
| selene.toml | ||
| stylua.toml | ||
| vim.yaml | ||
live-server.nvim
Live reload HTML, CSS, and JavaScript files inside Neovim. No external dependencies — the server runs entirely in Lua using Neovim's built-in libuv bindings.
Note
Due to GitHub's historic unreliability, active development is hosted on Forgejo. GitHub is maintained as a read-only mirror. See
:help live-server-migrationto optionally update your plugin source configuration.
Dependencies
- Neovim >= 0.10
Installation
With vim.pack (Neovim 0.12+):
vim.pack.add({
'https://git.barrettruth.com/barrettruth/live-server.nvim',
})
Or via luarocks:
luarocks install live-server.nvim
Quick Start
Set vim.g.live_server before the plugin loads only when you want to change
the default port or browser behavior.
vim.g.live_server = {
port = 8080,
browser = false,
}
Open an HTML, CSS, or JavaScript file and start the server for that file's directory.
:LiveServerStart
Start a specific project directory when the current buffer is elsewhere.
:LiveServerStart ~/projects/my-website
Use one command to switch the same project on or off.
:LiveServerToggle
Stop the server when you are done with the project.
:LiveServerStop
Documentation
:help live-server
Known Limitations
- No recursive file watching on Linux: libuv's
uv_fs_eventonly supports recursive directory watching on macOS and Windows. On Linux (inotify), therecursiveflag is silently ignored, so only files in the served root directory trigger hot-reload. Files in subdirectories (e.g.css/style.css) will not be detected. See libuv#1778.