From 5a020a8859657ba909950239c723e08dda6967b9 Mon Sep 17 00:00:00 2001 From: fdschmidt93 <39233597+fdschmidt93@users.noreply.github.com> Date: Fri, 17 Sep 2021 00:07:54 +0200 Subject: [PATCH] fix: fallback to syntax hl if treesitter fails (#1249) --- lua/telescope/previewers/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telescope/previewers/utils.lua b/lua/telescope/previewers/utils.lua index abb44e3..234eb0c 100644 --- a/lua/telescope/previewers/utils.lua +++ b/lua/telescope/previewers/utils.lua @@ -74,7 +74,7 @@ utils.highlighter = function(bufnr, ft, opts) if ts_highlighting then ts_success = utils.ts_highlighter(bufnr, ft) end - if not (ts_highlighting or ts_success) then + if not ts_highlighting or ts_success == false then utils.regex_highlighter(bufnr, ft) end end