[mirror] Make your go dev experience better github.com/olexsmir/gopher.nvim
neovim golang

Fix health check for nvim 0.7(#13)

authored by olexsmir.xyz and committed by GitHub bb494abd 08f9156e

Changed files
+8 -6
lua
gopher
+8 -6
lua/gopher/health.lua
··· 1 + local health = vim.health or require "health" 1 2 local utils = require "gopher._utils" 2 3 local c = require("gopher.config").config.commands 4 + 3 5 local M = { 4 6 _required = { 5 7 plugins = { ··· 16 18 } 17 19 18 20 function M.check() 19 - vim.health.report_start "Required plugins" 21 + health.report_start "Required plugins" 20 22 for _, plugin in ipairs(M._required.plugins) do 21 23 if utils.lualib_is_found(plugin.lib) then 22 - vim.health.report_ok(plugin.lib .. " installed.") 24 + health.report_ok(plugin.lib .. " installed.") 23 25 else 24 - vim.health.report_error(plugin.lib .. " not found. Gopher.nvim will not work without it!") 26 + health.report_error(plugin.lib .. " not found. Gopher.nvim will not work without it!") 25 27 end 26 28 end 27 29 28 - vim.health.report_start "Required go tools" 30 + health.report_start "Required go tools" 29 31 for _, binary in ipairs(M._required.binarys) do 30 32 if utils.binary_is_found(binary.bin) then 31 - vim.health.report_ok(binary.bin .. " installed") 33 + health.report_ok(binary.bin .. " installed") 32 34 else 33 - vim.health.report_warn(binary.bin .. " is not installed but " .. binary.help) 35 + health.report_warn(binary.bin .. " is not installed but " .. binary.help) 34 36 end 35 37 end 36 38 end