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-migration to optionally update your plugin source
configuration.
- Neovim >= 0.10
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
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.
:LiveServerStartStart a specific project directory when the current buffer is elsewhere.
:LiveServerStart ~/projects/my-websiteUse one command to switch the same project on or off.
:LiveServerToggleStop the server when you are done with the project.
:LiveServerStop:help live-server- 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.