mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
add treesitter version in checkhealth
This commit is contained in:
parent
f41459b300
commit
7760f08658
1 changed files with 10 additions and 0 deletions
|
|
@ -12,6 +12,16 @@ local M = {}
|
||||||
|
|
||||||
local function install_health()
|
local function install_health()
|
||||||
health_start('Installation')
|
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
|
if fn.executable('git') == 0 then
|
||||||
health_error('`git` executable not found.', {
|
health_error('`git` executable not found.', {
|
||||||
'Install it with your package manager.',
|
'Install it with your package manager.',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue