diff options
| author | bitcoder <glepnir@gopherhub.org> | 2021-03-14 16:26:33 +0800 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2021-03-22 12:40:43 +0100 |
| commit | b84dbcc66c89ebb1bd993f36b885188ff1383c79 (patch) | |
| tree | 0b080fe966d43e473369916711ab612da0b2ff20 /lua | |
| parent | [docgen] Update README.md (diff) | |
| download | nvim-treesitter-b84dbcc66c89ebb1bd993f36b885188ff1383c79.tar nvim-treesitter-b84dbcc66c89ebb1bd993f36b885188ff1383c79.tar.gz nvim-treesitter-b84dbcc66c89ebb1bd993f36b885188ff1383c79.tar.bz2 nvim-treesitter-b84dbcc66c89ebb1bd993f36b885188ff1383c79.tar.lz nvim-treesitter-b84dbcc66c89ebb1bd993f36b885188ff1383c79.tar.xz nvim-treesitter-b84dbcc66c89ebb1bd993f36b885188ff1383c79.tar.zst nvim-treesitter-b84dbcc66c89ebb1bd993f36b885188ff1383c79.zip | |
use health#report_warn for treesitter version check
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/health.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/nvim-treesitter/health.lua b/lua/nvim-treesitter/health.lua index 6492fff75..326c75f12 100644 --- a/lua/nvim-treesitter/health.lua +++ b/lua/nvim-treesitter/health.lua @@ -7,19 +7,21 @@ local info = require'nvim-treesitter.info' local health_start = vim.fn["health#report_start"] local health_ok = vim.fn['health#report_ok'] local health_error = vim.fn['health#report_error'] +local health_warn = vim.fn['health#report_warn'] local M = {} local function install_health() health_start('Installation') if fn.executable('tree-sitter') == 0 then - health_error('`tree-sitter` executable not found') + health_warn('`tree-sitter` executable not found (parser generator, only needed for :TSInstallFromGrammar,'.. + ' not required for :TSInstall)') 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` found '..version .. '(parser generator, used for :TSInstallFromGrammar)') + health_ok('`tree-sitter` found '..version..' (parser generator, only needed for :TSInstallFromGrammar)') end if fn.executable('git') == 0 then |
