1--[[
2--
3-- This file is not required for your own configuration,
4-- but helps people determine if their system is setup correctly.
5--
6--]]
7
8local check_version = function()
9 local verstr = tostring(vim.version())
10 if not vim.version.ge then
11 vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
12 return
13 end
14
15 if vim.version.ge(vim.version(), '0.10-dev') then
16 vim.health.ok(string.format("Neovim version is: '%s'", verstr))
17 else
18 vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
19 end
20end
21
22local check_external_reqs = function()
23 -- Basic utils: `git`, `make`, `unzip`
24 for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
25 local is_executable = vim.fn.executable(exe) == 1
26 if is_executable then
27 vim.health.ok(string.format("Found executable: '%s'", exe))
28 else
29 vim.health.warn(string.format("Could not find executable: '%s'", exe))
30 end
31 end
32
33 return true
34end
35
36return {
37 check = function()
38 vim.health.start 'kickstart.nvim'
39
40 vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
41
42 Fix only warnings for plugins and languages you intend to use.
43 Mason will give warnings for languages that are not installed.
44 You do not need to install, unless you want to use those languages!]]
45
46 local uv = vim.uv or vim.loop
47 vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
48
49 check_version()
50 check_external_reqs()
51 end,
52}