From 05274396d82b6226526c452ca754ec6393d25740 Mon Sep 17 00:00:00 2001 From: tobealive Date: Sat, 14 Jan 2023 17:08:32 +0100 Subject: [PATCH] Add nvim-treesitter dependency check --- lua/module-template.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/module-template.lua b/lua/module-template.lua index b2d71eb..d240991 100644 --- a/lua/module-template.lua +++ b/lua/module-template.lua @@ -1,3 +1,9 @@ +if not pcall(require, "nvim-treesitter") then + -- TODO: Replace `module-template` with the actual name of your module. + print "module-template requires nvim-treesitter to be installed" + return +end + local queries = require "nvim-treesitter.query" local M = {}