aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbitcoder <glepnir@gopherhub.org>2021-03-05 21:47:41 +0800
committerStephan Seitz <stephan.lauf@yahoo.de>2021-03-09 00:45:50 +0100
commit7760f08658ca22386d2d592340717d0143a67d03 (patch)
treec6d277e935f3bc11667456d9a7240a97452b236f
parentteal: Add C language injection for FFI (diff)
downloadnvim-treesitter-7760f08658ca22386d2d592340717d0143a67d03.tar
nvim-treesitter-7760f08658ca22386d2d592340717d0143a67d03.tar.gz
nvim-treesitter-7760f08658ca22386d2d592340717d0143a67d03.tar.bz2
nvim-treesitter-7760f08658ca22386d2d592340717d0143a67d03.tar.lz
nvim-treesitter-7760f08658ca22386d2d592340717d0143a67d03.tar.xz
nvim-treesitter-7760f08658ca22386d2d592340717d0143a67d03.tar.zst
nvim-treesitter-7760f08658ca22386d2d592340717d0143a67d03.zip
add treesitter version in checkhealth
-rw-r--r--lua/nvim-treesitter/health.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/health.lua b/lua/nvim-treesitter/health.lua
index 14dd93a71..b9a83725d 100644
--- a/lua/nvim-treesitter/health.lua
+++ b/lua/nvim-treesitter/health.lua
@@ -12,6 +12,16 @@ local M = {}
local function install_health()
health_start('Installation')
+ if fn.executable('tree-sitter') == 0 then
+ health_error('`tree-sitter` executable not found')
+ else
+ local handle = io.popen('tree-sitter -V')
+ local result = handle:read("*a")
+ handle:close()
+ local version = vim.split(result,'\n')[1]:match('[^tree%psitter].*')
+ health_ok('`tree-sitter` version '..version)
+ end
+
if fn.executable('git') == 0 then
health_error('`git` executable not found.', {
'Install it with your package manager.',