From 44d4d07dbf843d3a576aac7ce8a01867cdaddd6b Mon Sep 17 00:00:00 2001 From: Stephan Seitz Date: Sat, 2 Oct 2021 00:18:55 +0200 Subject: chore: print compiler version in healthcheck --- lua/nvim-treesitter/health.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/health.lua b/lua/nvim-treesitter/health.lua index f68a8c010..9c65462b1 100644 --- a/lua/nvim-treesitter/health.lua +++ b/lua/nvim-treesitter/health.lua @@ -65,7 +65,14 @@ local function install_health() .. ' or set the environment variable CC or `require"nvim-treesitter.install".compilers` explicitly!', }) else - health_ok("`" .. cc .. "` executable found. Selected from " .. vim.inspect(install.compilers)) + local version = vim.fn.systemlist(cc .. (cc == "cl" and "" or " --version"))[1] + health_ok( + "`" + .. cc + .. "` executable found. Selected from " + .. vim.inspect(install.compilers) + .. (version and ("\nVersion: " .. version) or "") + ) end if vim.treesitter.language_version then if vim.treesitter.language_version >= NVIM_TREESITTER_MINIMUM_ABI then -- cgit v1.2.3-70-g09d2