summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorSimon Hauser <Simon-Hauser@outlook.de>2021-12-05 08:19:23 +0100
committerSimon Hauser <Simon-Hauser@outlook.de>2021-12-05 08:19:23 +0100
commit16b0188cf5ad4658d264a9f6a80a32af75e9bae4 (patch)
treea1b67e3ef052023dbc193b2c215f56f54969a1eb /lua
parent27294d73e4562cbc83c9c488b4618f012deade7e (diff)
fix: current_buffer_fuzzy_find check if nvim-ts is okay before calling is_enabled
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/builtin/files.lua2
1 files changed, 1 insertions, 1 deletions
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)