Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 1 | require('nvim-treesitter.configs').setup { |
| 2 | highlight = { |
| 3 | enable = true, |
| 4 | additional_vim_regex_highlighting = {'org'}, |
| 5 | }, |
| 6 | rainbow = { |
| 7 | enable = true, |
| 8 | extended_mode = true, |
| 9 | max_file_lines = nil, |
| 10 | colors = { |
| 11 | "#e06c75", |
| 12 | "#e5c07b", |
| 13 | "#98c379", |
| 14 | "#56b6c2", |
| 15 | "#61afef", |
| 16 | "#c678dd", |
| 17 | }, |
| 18 | termcolors = { |
| 19 | "168", |
| 20 | "180", |
| 21 | "114", |
| 22 | "73", |
| 23 | "75", |
| 24 | "176", |
| 25 | }, |
| 26 | }, |
| 27 | incremental_selection = { |
| 28 | enable = true, |
| 29 | keymaps = { |
| 30 | init_selection = "gnn", |
| 31 | node_incremental = "grn", |
| 32 | scope_incremental = "grc", |
| 33 | node_decremental = "grm", |
| 34 | }, |
| 35 | }, |
| 36 | indent = { |
| 37 | enable = true, |
| 38 | }, |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | require('treesitter-context').setup{ |
| 42 | enable = true, |
| 43 | trim_scope = 'outer', |
| 44 | patterns = { |
| 45 | default = { |
| 46 | 'class', |
| 47 | 'function', |
| 48 | 'method', |
| 49 | 'for', |
| 50 | 'while', |
| 51 | 'if', |
| 52 | 'switch', |
| 53 | 'case', |
| 54 | }, |
| 55 | }, |
| 56 | mode = 'topline' |
| 57 | } |
| 58 | |
| 59 | vim.cmd[[hi! TreesitterContext guibg=#313640 ctermbg=237]] |