]>
Commit | Line | Data |
---|---|---|
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 | 'api_notation', | |
5 | 'bash', | |
6 | 'css', | |
7 | 'dart', | |
8 | 'diff', | |
9 | 'dockerfile', | |
10 | 'gitcommit', | |
11 | 'graphql', | |
12 | 'html', | |
13 | 'htmldjango', | |
14 | 'javascript', | |
15 | 'jsdoc', | |
16 | 'json', | |
17 | 'kotlin', | |
18 | 'lua', | |
19 | 'make', | |
20 | 'markdown', | |
21 | 'python', | |
22 | 'ruby', | |
23 | 'rust', | |
24 | 'sql', | |
25 | 'svelte', | |
26 | 'swift', | |
27 | 'toml', | |
28 | 'tsx', | |
29 | 'typescript', | |
30 | 'yaml' | |
31 | }, | |
32 | ||
33 | sync_install = false, | |
34 | auto_install = true, | |
35 | ||
36 | endwise = { | |
37 | enable = true | |
38 | }, | |
39 | ||
40 | highlight = { | |
41 | enable = true, | |
42 | ||
43 | disable = function(lang, buf) | |
44 | local max_filesize = 100 * 1024 -- 100 KB | |
45 | local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) | |
46 | if ok and stats and stats.size > max_filesize then | |
47 | return true | |
48 | end | |
49 | end, | |
50 | ||
51 | additional_vim_regex_highlighting = false, | |
52 | }, | |
53 | } |