live-server.nvim/plugin/live-server.lua
Barrett Ruth af7255b0a0 refactor: use vim.g config and lazy loading
Replace setup() with vim.g.live_server configuration. Add plugin/ file
with load guard and user commands for proper lazy loading.
2026-02-03 20:13:12 -05:00

16 lines
471 B
Lua

if vim.g.loaded_live_server then
return
end
vim.g.loaded_live_server = 1
vim.api.nvim_create_user_command('LiveServerStart', function(opts)
require('live-server').start(opts.args)
end, { nargs = '?' })
vim.api.nvim_create_user_command('LiveServerStop', function(opts)
require('live-server').stop(opts.args)
end, { nargs = '?' })
vim.api.nvim_create_user_command('LiveServerToggle', function(opts)
require('live-server').toggle(opts.args)
end, { nargs = '?' })