diff options
| author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-28 09:31:36 +0200 | 
|---|---|---|
| committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-04-28 09:32:51 +0200 | 
| commit | 77938a2c776e1b1febe4043ce4022b55a80227be (patch) | |
| tree | f496f7667b3acfc0ea9bb57d90eedbce5c077404 /config/essentials | |
| parent | 299c493adf76992a4dd6e9bcdef2b3b3bdc24183 (diff) | |
added dependency check
Diffstat (limited to 'config/essentials')
| -rw-r--r-- | config/essentials/nvim/lua/user/live-server.lua | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/config/essentials/nvim/lua/user/live-server.lua b/config/essentials/nvim/lua/user/live-server.lua index 4f5992a..dac3c19 100644 --- a/config/essentials/nvim/lua/user/live-server.lua +++ b/config/essentials/nvim/lua/user/live-server.lua @@ -3,6 +3,13 @@ local M = {}  local live_servers = {}  function M.start_live_server() +	if vim.fn.executable('lsof') == 0 then +		print("Error: 'lsof' command not found") +	elseif vim.fn.executable('lsof') == 0 then +		print("Error: 'live-server' command not found") +		return +	end +  	-- Search for available port and use it      local port = 5500      local running = true  | 
