diff --git a/lua/nvim-ts-autotag/utils.lua b/lua/nvim-ts-autotag/utils.lua index b2c03f8..0fdd0b7 100644 --- a/lua/nvim-ts-autotag/utils.lua +++ b/lua/nvim-ts-autotag/utils.lua @@ -11,7 +11,8 @@ function M.is_react_file() elseif ft ~= "javascript" then return false end - +-- If we are in a `javascript` file, then check the content to see if the +-- current file counts as a react file local ok, buf_parser = pcall(vim.treesitter.get_parser) if not ok then return false