fix(treesitter-rewrite): show error in Extras only when enabled (#3178)

This commit is contained in:
Iordanis Petkakis 2024-05-16 23:28:25 +03:00 committed by GitHub
parent 14872fa816
commit 639dfce010
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,6 +8,7 @@ local function patch()
})
end
if vim.tbl_contains(Config.json.data.extras, "lazyvim.plugins.extras.ui.treesitter-rewrite") then
if vim.fn.executable("tree-sitter") == 0 then
LazyVim.error("**treesitter-rewrite** requires the `tree-sitter` executable to be installed")
return {}
@ -17,6 +18,7 @@ if vim.fn.has("nvim-0.10") == 0 then
LazyVim.error("**treesitter-rewrite** requires Neovim >= 0.10")
return {}
end
end
return {
{