aurum77 / live-server.nvim

A plugin to integrate live-server from Neovim
GNU General Public License v3.0
44 stars 2 forks source link

Lazy Config ? #4

Open chrisfederico1 opened 1 year ago

chrisfederico1 commented 1 year ago

Hi Aurum ,

This is not an issue but didn't know how to contact you lol . The installation is meant for Packer ? Lazy uses a dependencies key word in replace for a require but in this case it looks like you're not loading another plugin ... Just wanted to know if require should be changed to dependencies when using Lazy Plugin Manager . { "aurum77/live-server.nvim", build = function() require"live_server.util".install() end, cmd = { "LiveServer", "LiveServerStart", "LiveServerStop" }, },

Hopefully you understand lol . I do think it still loads ...

aurum77 commented 10 months ago

hello there, sorry for the really really really late response. I finally took a look at this and it seems like this works:

{
  "aurum77/live-server.nvim",
  config = function()
    require("plugins.live-server")
  end,
  cmd = {
    "LiveServer",
    "LiveServerStart",
    "LiveServerStop",
    "LiveServerInstall",
  },
  build = function()
    require("live_server.util").install()
  end,
},

(don't forget to replace the require inside the config function with your own)

statquant commented 1 week ago

Hello, I tried to config the plugin in Lazy and I cannot figure out how to change and say --port and --open. Would you kindly help in providing and example ?

aurum77 commented 1 week ago

Hello, I tried to config the plugin in Lazy and I cannot figure out how to change and say --port and --open. Would you kindly help in providing and example ?

Hello, I think it's supposed to be like this

require("live_server").setup({
    port = 7777,
    browser_command = "firefox",
    quiet = false,
    no_css_inject = true,
})