| 123456789101112131415161718192021222324252627282930313233 |
- local maj_peg = require("maj-peg")
- return {
- check = function()
- vim.health.start("Maj-Peg")
- if maj_peg.status().setup == false then
- vim.health.warn("Not loaded")
- return
- end
- if maj_peg.status().has_mypy then
- vim.health.ok("`mypy` found")
- else
- vim.health.warn("`mypy` was not found")
- if vim.tbl_count(vim.fn.systemlist("echo $VIRTUAL_ENV")) == 0 then
- vim.health.warn(
- "Missing `mypy` likely due to unset $VIRTUAL_ENV in subshell")
- else
- vim.health.ok("Check that `mypy` is installed in $VIRTUAL_ENV: " ..
- vim.fn.system("echo $VIRTUAL_ENV"))
- end
- end
- if maj_peg.status().has_mypy_baseline then
- vim.health.ok("`mypy-baseline` found")
- else
- vim.health.warn("`mypy-baseline` was not found")
- end
- if maj_peg.status().setup then
- vim.health.ok("Set up")
- else
- vim.health.warn("Not set up")
- end
- end
- }
|