Skip to content
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
@ttytm

Description

@ttytm

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.,
Screenshot_20221006_141210

Would a PR on this have a chance?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions