这是indexloc提供的服务,不要输入任何密码
Skip to content

wasubu/live-server.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

live-server.nvim

Live reload HTML, CSS, and JavaScript files inside neovim with the power of live-server.

Installation

  1. Install live-server globally with your node.js package manager of choice.

  2. Install regularly with your neovim package manager

For example, a config with pnpm and lazy.nvim may look like the following:

require('lazy').setup {
    {
        'barrett-ruth/live-server.nvim',
        build = 'pnpm add -g live-server',
        cmd = { 'LiveServerStart', 'LiveServerStop' },
        config = true
    }
}

Configuration

Configure via the setup function (or use the defaults with no arguments):

require('live-server').setup(opts)

See :h live-server for more information

Usage

:LiveServerStart: start the live server

:LiveServerStop: stop the live server

Development Server

The server runs by default on http://localhost:5555. You can access your project by opening this URL in your web browser.

Acknowledgements

  1. mazeloth/live-server: the first ever live-server port to vim
  2. aurum77/live-server.nvim: the first live-server port to neovim (however, it unecessarily depends on npm and didn't quite cut it for me)

About

Live reload local development servers inside of neovim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%