blob: b0c7ef77bd9a91671e8cba0446ae807f103641f2 [file] [log] [blame]
Skyler Greya7feb6e2022-08-26 06:51:55 +01001require('nvim-treesitter.configs').setup {
2 highlight = {
3 enable = true,
4 additional_vim_regex_highlighting = {'org'},
Skyler Grey48e12a42023-02-13 06:51:56 +00005 disable = {'lua', 'sh', 'bash'},
Skyler Greya7feb6e2022-08-26 06:51:55 +01006 },
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 Greyf8194602022-10-31 00:07:05 +000027 disable = {'sql', 'markdown'},
Skyler Greya7feb6e2022-08-26 06:51:55 +010028 },
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 Grey5a22b1f2023-01-26 00:33:27 +000037 disable = {'sql'},
Skyler Greya7feb6e2022-08-26 06:51:55 +010038 },
39 indent = {
40 enable = true,
Skyler Grey5a22b1f2023-01-26 00:33:27 +000041 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 Greya7feb6e2022-08-26 06:51:55 +010060 },
Skyler Greya7feb6e2022-08-26 06:51:55 +010061}
62
63require('treesitter-context').setup{
64 enable = true,
Skyler Grey5a22b1f2023-01-26 00:33:27 +000065 disable = {'sql'},
Skyler Greya7feb6e2022-08-26 06:51:55 +010066 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}