mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-16 12:24:36 +02:00
fix(treesitter-rewrite): show error in Extras only when enabled (#3178)
This commit is contained in:
parent
14872fa816
commit
639dfce010
1 changed files with 9 additions and 7 deletions
|
@ -8,14 +8,16 @@ local function patch()
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
if vim.fn.executable("tree-sitter") == 0 then
|
if vim.tbl_contains(Config.json.data.extras, "lazyvim.plugins.extras.ui.treesitter-rewrite") then
|
||||||
LazyVim.error("**treesitter-rewrite** requires the `tree-sitter` executable to be installed")
|
if vim.fn.executable("tree-sitter") == 0 then
|
||||||
return {}
|
LazyVim.error("**treesitter-rewrite** requires the `tree-sitter` executable to be installed")
|
||||||
end
|
return {}
|
||||||
|
end
|
||||||
|
|
||||||
if vim.fn.has("nvim-0.10") == 0 then
|
if vim.fn.has("nvim-0.10") == 0 then
|
||||||
LazyVim.error("**treesitter-rewrite** requires Neovim >= 0.10")
|
LazyVim.error("**treesitter-rewrite** requires Neovim >= 0.10")
|
||||||
return {}
|
return {}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue