filetype.nvim
filetype.nvim copied to clipboard
Breaks if tree-sitter disable config is a function & not a table.
It will break with the following errors
Error detected while processing BufReadPost Autocommands for "*":
E5108: Error executing lua ...im/pack/packer/start/filetype.nvim/lua/filetype/init.lua:8: Vim(lua):E5108: Error executing lua ...er/start/nvim-treesitter/lua/nvim-t
reesitter/configs.lua:335: bad argument #1 to 'pairs' (table expected, got function)
Press ENTER or type command to continue
When the disable
key in `highlights in tree-sitter is a function, in my case, it looks like this
disable = function(lang, bufnr)
return lang == 'org' or vim.api.nvim_buf_line_count(bufnr) > 10000
end
If I change it to this, it works fine.
disable = { 'org' }