From 16b0188cf5ad4658d264a9f6a80a32af75e9bae4 Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Sun, 5 Dec 2021 08:19:23 +0100 Subject: fix: current_buffer_fuzzy_find check if nvim-ts is okay before calling is_enabled --- lua/telescope/builtin/files.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/telescope/builtin/files.lua b/lua/telescope/builtin/files.lua index c726f98..17a00a5 100644 --- a/lua/telescope/builtin/files.lua +++ b/lua/telescope/builtin/files.lua @@ -491,7 +491,7 @@ files.current_buffer_fuzzy_find = function(opts) local parser_ok, parser = pcall(vim.treesitter.get_parser, bufnr, filetype) local query_ok, query = pcall(vim.treesitter.get_query, filetype, "highlights") - if ts_configs.is_enabled("highlight", filetype, bufnr) and parser_ok and query_ok then + if parser_ok and query_ok and ts_ok and ts_configs.is_enabled("highlight", filetype, bufnr) then local root = parser:parse()[1]:root() local highlighter = vim.treesitter.highlighter.new(parser) -- cgit v1.2.3