blob: b0c7ef77bd9a91671e8cba0446ae807f103641f2 [file] [log] [blame]
require('nvim-treesitter.configs').setup {
highlight = {
enable = true,
additional_vim_regex_highlighting = {'org'},
disable = {'lua', 'sh', 'bash'},
},
rainbow = {
enable = true,
extended_mode = true,
max_file_lines = nil,
colors = {
"#e06c75",
"#e5c07b",
"#98c379",
"#56b6c2",
"#61afef",
"#c678dd",
},
termcolors = {
"168",
"180",
"114",
"73",
"75",
"176",
},
disable = {'sql', 'markdown'},
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
},
disable = {'sql'},
},
indent = {
enable = true,
disable = {'sql'},
},
context_commentstring = {
enable = true
},
playground = {
enable = true,
keybindings = {
toggle_query_editor = 'o',
toggle_hl_groups = 'i',
toggle_injected_languages = 't',
toggle_anonymous_nodes = 'a',
toggle_language_display = 'I',
focus_language = 'f',
unfocus_language = 'F',
update = 'R',
goto_node = '<cr>',
show_help = '?',
},
},
}
require('treesitter-context').setup{
enable = true,
disable = {'sql'},
trim_scope = 'outer',
patterns = {
default = {
'class',
'function',
'method',
'for',
'while',
'if',
'switch',
'case',
},
},
mode = 'topline'
}