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'}, |
Skyler Grey | 5a22b1f | 2023-01-26 00:33:27 +0000 | [diff] [blame] | 5 | disable = {'sql', 'lua', 'sh', 'bash'}, |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 6 | }, |
| 7 | rainbow = { |
| 8 | enable = true, |
| 9 | extended_mode = true, |
| 10 | max_file_lines = nil, |
| 11 | colors = { |
| 12 | "#e06c75", |
| 13 | "#e5c07b", |
| 14 | "#98c379", |
| 15 | "#56b6c2", |
| 16 | "#61afef", |
| 17 | "#c678dd", |
| 18 | }, |
| 19 | termcolors = { |
| 20 | "168", |
| 21 | "180", |
| 22 | "114", |
| 23 | "73", |
| 24 | "75", |
| 25 | "176", |
| 26 | }, |
Skyler Grey | f819460 | 2022-10-31 00:07:05 +0000 | [diff] [blame] | 27 | disable = {'sql', 'markdown'}, |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 28 | }, |
| 29 | incremental_selection = { |
| 30 | enable = true, |
| 31 | keymaps = { |
| 32 | init_selection = "gnn", |
| 33 | node_incremental = "grn", |
| 34 | scope_incremental = "grc", |
| 35 | node_decremental = "grm", |
| 36 | }, |
Skyler Grey | 5a22b1f | 2023-01-26 00:33:27 +0000 | [diff] [blame] | 37 | disable = {'sql'}, |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 38 | }, |
| 39 | indent = { |
| 40 | enable = true, |
Skyler Grey | 5a22b1f | 2023-01-26 00:33:27 +0000 | [diff] [blame] | 41 | disable = {'sql'}, |
| 42 | }, |
| 43 | context_commentstring = { |
| 44 | enable = true |
| 45 | }, |
| 46 | playground = { |
| 47 | enable = true, |
| 48 | keybindings = { |
| 49 | toggle_query_editor = 'o', |
| 50 | toggle_hl_groups = 'i', |
| 51 | toggle_injected_languages = 't', |
| 52 | toggle_anonymous_nodes = 'a', |
| 53 | toggle_language_display = 'I', |
| 54 | focus_language = 'f', |
| 55 | unfocus_language = 'F', |
| 56 | update = 'R', |
| 57 | goto_node = '<cr>', |
| 58 | show_help = '?', |
| 59 | }, |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 60 | }, |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | require('treesitter-context').setup{ |
| 64 | enable = true, |
Skyler Grey | 5a22b1f | 2023-01-26 00:33:27 +0000 | [diff] [blame] | 65 | disable = {'sql'}, |
Skyler Grey | a7feb6e | 2022-08-26 06:51:55 +0100 | [diff] [blame] | 66 | trim_scope = 'outer', |
| 67 | patterns = { |
| 68 | default = { |
| 69 | 'class', |
| 70 | 'function', |
| 71 | 'method', |
| 72 | 'for', |
| 73 | 'while', |
| 74 | 'if', |
| 75 | 'switch', |
| 76 | 'case', |
| 77 | }, |
| 78 | }, |
| 79 | mode = 'topline' |
| 80 | } |