-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathhealth.lua
More file actions
24 lines (19 loc) · 615 Bytes
/
health.lua
File metadata and controls
24 lines (19 loc) · 615 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
local V = require("elixir.elixirls.version")
local M = {}
function M.check()
vim.health.start("elixir-tools.nvim report")
local version_string = vim.fn.system("elixir --version")
local ex_version = V.elixir_version(version_string)
local otp_version = V.erlang_version(version_string)
if type(ex_version) == "string" then
vim.health.ok("Elixir v" .. ex_version)
else
vim.health.error("couldn't figure out elixir version")
end
if type(otp_version) == "string" then
vim.health.ok("OTP " .. otp_version)
else
vim.health.error("couldn't figure out OTP version")
end
end
return M