live-server.nvim icon indicating copy to clipboard operation
live-server.nvim copied to clipboard

Opening the file that is being edited directly

Open stepanzak opened this issue 2 years ago • 1 comments

Hi, when I use VSCode's LiveServer extension and start LiveServer while editing an HTML file, it opens that particular HTML file in a browser. However, when I'm editing an HTML file in NeoVim and run :LiveServer, it opens up my home directory in the LiveServer folder view. Is that a bug or not implemented? Or am I doing something wrong? I'm a Neovim newbie, so sorry if this is my mistake.

stepanzak avatar Mar 23 '23 19:03 stepanzak

hello there, sorry for the late response. I did some testing with vscode live-server extension. If the filename is not index.html, It opens the file by inserting the name into the uri like (localhost:1234/foo.html). If you're storing the file you want to view on your home directory, you can click on the file you want to view it from the directory view (which will open up localhost:1234/foo.html) which is the same thing that vscode does. Also i would recommend not broadcasting your whole home directory on your network and instead doing your stuff in a separate folder.

aurum77 avatar Mar 25 '23 09:03 aurum77