From ef6ac90acf94e747809b44c8268a10a611df0b35 Mon Sep 17 00:00:00 2001 From: "asep.komarudin" Date: Sun, 30 Jun 2024 11:15:37 +0700 Subject: [PATCH] add: live server --- lazy-lock.json | 1 + lua/plugins/liveserver.lua | 11 +++++++++++ lua/user/utils/whichkey.lua | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/liveserver.lua diff --git a/lazy-lock.json b/lazy-lock.json index 8962f0a..b63a1a2 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -18,6 +18,7 @@ "gitsigns.nvim": { "branch": "main", "commit": "0b04035bb7b3c83e999b9676e2fb46fd0aa9f910" }, "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, "lazy.nvim": { "branch": "main", "commit": "0507e19289539396313503f6eb6b02bbe8a5e483" }, + "live-server.nvim": { "branch": "main", "commit": "f34ae262bf046981d9e5f7cd4f41a353a9647a22" }, "lsp-progress.nvim": { "branch": "main", "commit": "55a04895ea20c365b670051a3128265d43bdfa3d" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, diff --git a/lua/plugins/liveserver.lua b/lua/plugins/liveserver.lua new file mode 100644 index 0000000..b2e14de --- /dev/null +++ b/lua/plugins/liveserver.lua @@ -0,0 +1,11 @@ +return { + "barrett-ruth/live-server.nvim", + build = "npm i -g live-server", + cmd = { "LiveServerStart", "LiveServerStop" }, + config = true, + keys = { + { "rl", "", desc = " LiveServer" }, + { "rls", "LiveServerStart", desc = "LiveServerStart" }, + { "rlq", "LiveServerStop", desc = "LiveServerStop" }, + }, +} diff --git a/lua/user/utils/whichkey.lua b/lua/user/utils/whichkey.lua index 22b6b7a..c68618b 100644 --- a/lua/user/utils/whichkey.lua +++ b/lua/user/utils/whichkey.lua @@ -226,7 +226,7 @@ M.mappings = { }, r = { name = "  Run", - l = { "edit term://live-server", "Live Server" }, + -- l = { "edit term://live-server", "Live Server" }, s = { 'autocmd bufwritepost [^_]*.sass,[^_]*.scss silent exec "!sass %:p %:r.css"', "Auto Compile Sass",