From cfe8018b10e79296191a2bc64b39a33778dd3320 Mon Sep 17 00:00:00 2001 From: Dave Lage Date: Tue, 22 Feb 2022 11:41:38 -0500 Subject: [PATCH] Check if there is a parser before renaming tag Make sure a parser is available before trying to rename tag. --- lua/nvim-ts-autotag/internal.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-ts-autotag/internal.lua b/lua/nvim-ts-autotag/internal.lua index fa59501..6dbb4be 100644 --- a/lua/nvim-ts-autotag/internal.lua +++ b/lua/nvim-ts-autotag/internal.lua @@ -400,7 +400,7 @@ local function validate_rename() end M.rename_tag = function () - if validate_rename() then + if validate_rename() and parsers.has_parser() then parsers.get_parser():parse() rename_start_tag() rename_end_tag()