diff --git a/lua/Comment/ft.lua b/lua/Comment/ft.lua index 34afffa..64a182a 100644 --- a/lua/Comment/ft.lua +++ b/lua/Comment/ft.lua @@ -293,7 +293,7 @@ end function ft.calculate(ctx) local ok, parser = pcall(vim.treesitter.get_parser, A.nvim_get_current_buf()) - if not ok then + if not ok or not parser then return ft.get(vim.bo.filetype, ctx.ctype) --[[ @as string ]] end