This repository was archived by the owner on Jan 17, 2024. It is now read-only.
This repository was archived by the owner on Jan 17, 2024. It is now read-only.
nvim-treesitter depencency check to prevent errors #6
Open
Description
As the modules depend on nvim-treesitter. I think it could be nice to add a little dependency check if it is installed.
It could be as simple as a:
if not pcall(require, "nvim-treesitter") then return end
inside lua/module-template.lua.
If preferred, it could include a little print to inform the end user of the module about the missing dependency:
print "module-template requires nvim-treesitter to be installed"
Next to following a good practice of checking for dependencies, for me this would mostly aim to prevent errors when pulling a config and doing a first setup, when treesitter is not yet fully installed. E.g.,
Would a PR on this have a chance?
Metadata
Metadata
Assignees
Labels
No labels