fix: fallback to filetype for get_lang for treesitter highlighting (#2867)
This commit is contained in:
committed by
GitHub
parent
43cabe5327
commit
b4befa1c2f
@@ -482,7 +482,7 @@ files.current_buffer_fuzzy_find = function(opts)
|
||||
end
|
||||
|
||||
opts.results_ts_highlight = vim.F.if_nil(opts.results_ts_highlight, true)
|
||||
local lang = vim.treesitter.language.get_lang(filetype)
|
||||
local lang = vim.treesitter.language.get_lang(filetype) or filetype
|
||||
if opts.results_ts_highlight and lang and utils.has_ts_parser(lang) then
|
||||
local parser = vim.treesitter.get_parser(opts.bufnr, lang)
|
||||
local query = vim.treesitter.query.get(lang, "highlights")
|
||||
|
||||
Reference in New Issue
Block a user