summaryrefslogtreecommitdiff
path: root/lua/rclone/health.lua
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-03-11 16:31:48 +0100
committerDaniel Weipert <code@drogueronin.de>2023-03-11 16:31:48 +0100
commitaed92957e5bc1cb6978dda4bc1305926c45af18d (patch)
tree56ca49bd869da11dcbdc4a0b017d9a81e4a8fea3 /lua/rclone/health.lua
parent3285bbffe926ba5f54d1684f323d54fd4311a08e (diff)
Add healthcheck
Diffstat (limited to 'lua/rclone/health.lua')
-rw-r--r--lua/rclone/health.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/lua/rclone/health.lua b/lua/rclone/health.lua
new file mode 100644
index 0000000..5259213
--- /dev/null
+++ b/lua/rclone/health.lua
@@ -0,0 +1,19 @@
+local health = vim.health or require('health')
+
+local function check()
+ if pcall(require, 'plenary') then
+ health.report_ok('plenary installed')
+ else
+ health.report_error('nvim-lua/plenary.nvim missing')
+ end
+
+ if vim.fn.executable('rclone') == 1 then
+ health.report_ok('rclone installed')
+ else
+ health.report_error('rclone (rclone.org) not installed')
+ end
+end
+
+return {
+ check = check
+}