treesitter.lua 749 B

123456789101112131415161718192021222324
  1. return {
  2. "nvim-treesitter/nvim-treesitter",
  3. build = ":TSUpdate",
  4. config = function()
  5. require("nvim-treesitter.configs").setup({
  6. ensure_installed = { "c", "lua", "typescript", "go", "vim", "vimdoc", "query", "markdown", "markdown_inline" },
  7. ignore_install = {},
  8. modules = {},
  9. sync_install = false,
  10. auto_install = false,
  11. highlight = {
  12. enable = true,
  13. disable = function(_, buf)
  14. local max_filesize = 100 * 1024
  15. local ok, stats = pcall(vim.uv.fs_stat, vim.api.nvim_buf_get_name(buf))
  16. if ok and stats and stats.size > max_filesize then
  17. return true
  18. end
  19. end,
  20. additional_vim_regex_highlighting = false,
  21. },
  22. })
  23. end,
  24. }