-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Hello, I appreciate the simplicity of this plugin and was hoping to use it, but I ran into some issues. I'm still not certain about whether there's something wrong with my environment or if this is some bug related to the way that this plugin calls live-server, apologies if I'm wasting anyone's time here but I figure it won't hurt to document this. Full disclosure that this could somehow be due to my using Packer, which has been unmaintained for a couple of years, but I fail to see how it would cause this behavior; Packer installs vim-live-server successfully and everything seems simple enough that it ought to Just Work.
Reproduction env:
- vim-live-server installed using freshest version of wbthomason/packer.nvim at time of writing
- OS:
Linux 6.1.0-30-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.124-1 (2025-01-12) x86_64 GNU/Linux
- Terminal: alacritty 0.11.0
- Shell: zsh 5.9
- nvim: NVIM v0.10.1, Build type: RelWithDebInfo, LuaJIT 2.1.1713484068
- JS stuff: npm 9.2.0, node v18.19.0, live-server 1.2.2, installed globally in /usr/local/lib
- Browser: Firefox 128.6.0esr (also tried Chromium 132.0.6834.159 just as a sanity check)
Reproduction steps:
I. Verify that live-server is functioning independently
- Open a shell and change into a directory containing the source code for a simple web page.
- Run
live-server &
. A web browser process successfully GETs http://127.0.0.1:8080/ and displays the web page. - Verify that the live server process is running (
lsof :8080 && pgrep node
)
II. Verify that running live-server via vim-live-server does not produce the same result
- Open a directory containing the source code for a website in nvim
- Run
:StartLiveServer
. A web browser process attempts to GET http://127.0.0.1:8080/ but fails with the browser's implementation ofERR_CONNECTION_REFUSED
. In nvim, the plugin echoes "Live server started in the background." - Verify that the live server process is not running (
lsof :8080 && pgrep node
)
The same issue occurs with other port numbers via StartLiveServerOnPort.
I'm not familiar with debugging vimscript, and it seems a little less ergonomic than I would like, so this is about where I stopped. I spent a little time looking into the vim.system function and found it interesting but ultimately decided to go with a different live-server plugin written in Lua, which Just Works on my system.