aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2021-10-02 00:18:55 +0200
committerStephan Seitz <stephan.seitz@fau.de>2021-10-03 11:06:57 +0200
commit44d4d07dbf843d3a576aac7ce8a01867cdaddd6b (patch)
treeb81e117fa2757e8f4a16ca946585e7972893f971
parentgraphql: add `commentstring` (diff)
downloadnvim-treesitter-44d4d07dbf843d3a576aac7ce8a01867cdaddd6b.tar
nvim-treesitter-44d4d07dbf843d3a576aac7ce8a01867cdaddd6b.tar.gz
nvim-treesitter-44d4d07dbf843d3a576aac7ce8a01867cdaddd6b.tar.bz2
nvim-treesitter-44d4d07dbf843d3a576aac7ce8a01867cdaddd6b.tar.lz
nvim-treesitter-44d4d07dbf843d3a576aac7ce8a01867cdaddd6b.tar.xz
nvim-treesitter-44d4d07dbf843d3a576aac7ce8a01867cdaddd6b.tar.zst
nvim-treesitter-44d4d07dbf843d3a576aac7ce8a01867cdaddd6b.zip
chore: print compiler version in healthcheck
-rw-r--r--lua/nvim-treesitter/health.lua9
1 files changed, 8 insertions, 1 deletions
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