]> git.r.bdr.sh - rbdr/dotfiles/blob - config/nvim/lua/treesitter_config.lua
fc4a4a7236e3889ea7ba63a87cb18d46ef412924
[rbdr/dotfiles] / config / nvim / lua / treesitter_config.lua
1 require'nvim-treesitter.configs'.setup {
2 -- A list of parser names, or "all" (the five listed parsers should always be installed)
3 ensure_installed = {
4 'bash',
5 'css',
6 'dart',
7 'diff',
8 'dockerfile',
9 'gitcommit',
10 'graphql',
11 'html',
12 'htmldjango',
13 'javascript',
14 'jsdoc',
15 'json',
16 'kotlin',
17 'lua',
18 'make',
19 'markdown',
20 'python',
21 'ruby',
22 'rust',
23 'sql',
24 'svelte',
25 'swift',
26 'toml',
27 'tsx',
28 'typescript',
29 'yaml'
30 },
31
32 sync_install = false,
33 auto_install = true,
34
35 highlight = {
36 enable = true,
37
38 disable = function(lang, buf)
39 local max_filesize = 100 * 1024 -- 100 KB
40 local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
41 if ok and stats and stats.size > max_filesize then
42 return true
43 end
44 end,
45
46 additional_vim_regex_highlighting = false,
47 },
48 }