blob: b28124518678c0d5a2ba742670b24975e84ca324 [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'},
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 },
39 refactor = {
40 highlight_definitions = {
41 enable = true,
42 clear_on_cursor_move = true,
43 },
44 smart_rename = {
45 enable = true,
46 keymaps = {
47 smart_rename = "<leader>fr",
48 },
49 },
50 navigation = {
51 enable = true,
52 keymaps = {
53 goto_definition = "<leader>gd",
54 list_definitions = "<leader>gD",
55 list_definitions_toc = "<leader>ggD",
56 goto_next_usage = "<leader>g]",
57 goto_previous_usage = "<leader>g[",
58 },
59 },
60
61 },
62}
63
64require('treesitter-context').setup{
65 enable = true,
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}
81
82vim.cmd[[hi! TreesitterContext guibg=#313640 ctermbg=237]]