[Backport release-0.9] fix(treesitter): allow foldexpr without highlights (#23673)

fix(treesitter): allow foldexpr without highlights (#23672)

Ref nvim-treesitter/nvim-treesitter#4748

Co-authored-by: Lewis Russell <lewis6991@gmail.com>
This commit is contained in:
Christian Clason
2023-05-21 11:36:18 +02:00
committed by GitHub
parent 2be8c29406
commit c8d6d14f71
2 changed files with 2 additions and 12 deletions

View File

@@ -136,16 +136,6 @@ function M.get_parser(bufnr, lang, opts)
return parsers[bufnr]
end
---@package
---@param bufnr (integer|nil) Buffer number
---@return boolean
function M._has_parser(bufnr)
if bufnr == nil or bufnr == 0 then
bufnr = api.nvim_get_current_buf()
end
return parsers[bufnr] ~= nil
end
--- Returns a string parser
---
---@param str string Text to parse