Skip to content

Commit 4333179

Browse files
kostiskalkounosibhagwan
authored andcommitted
fix(preview): swallow warning for missing ts parsers
1 parent c887688 commit 4333179

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/fzf-lua/utils.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@ function M.has_ts_parser(lang, query_name)
14741474
-- ensure the language has a highlights parser or we get
14751475
-- no highlights for langugaes like json/jsonc/toml/etc
14761476
return (M.__HAS_NVIM_011 and vim.treesitter.language.add(lang)
1477-
or (pcall(vim.treesitter.language.add, lang)))
1477+
or (not M.__HAS_NVIM_011 and pcall(vim.treesitter.language.add, lang)))
14781478
and #vim.treesitter.query.get_files(lang, query_name) > 0 or false
14791479
end
14801480

0 commit comments

Comments
 (0)