forked from Robitx/gp.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhealth.lua
More file actions
39 lines (31 loc) · 926 Bytes
/
health.lua
File metadata and controls
39 lines (31 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--------------------------------------------------------------------------------
-- :checkhealth gp
--------------------------------------------------------------------------------
local M = {}
function M.check()
vim.health.start("gp.nvim checks")
local ok, gp = pcall(require, "gp")
if not ok then
vim.health.error("require('gp') failed")
else
vim.health.ok("require('gp') succeeded")
if gp._setup_called then
vim.health.ok("require('gp').setup() has been called")
else
vim.health.error("require('gp').setup() has not been called")
end
end
if vim.fn.executable("curl") == 1 then
vim.health.ok("curl is installed")
else
vim.health.error("curl is not installed")
end
if vim.fn.executable("grep") == 1 then
vim.health.ok("grep is installed")
else
vim.health.error("grep is not installed")
end
require("gp.whisper").check_health()
require("gp.deprecator").check_health()
end
return M