summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/user/plugins/treesitter.lua
blob: 32c74ee9393d279b044656aa11c753f03f610913 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require('nvim-treesitter.configs').setup {
    indent = {
        enable = true,
        disable = { 'html' },
    },
    highlight = {
        enable = true,
        disable = { 'NvimTree' },
        additional_vim_regex_highlighting = true,
    },
    textobjects = {
        select = {
            enable = true,
            lookahead = true,
            keymaps = {
                ['ia'] = '@parameter.inner',
                -- ['aa'] = {
                --   php = "" '@parameter.outer',

                --   python = "(function_definition) @function",
                --   cpp = "(function_definition) @function",
                --   c = "(function_definition) @function",
                --   java = "(method_declaration) @function",
            -- },
            },
        },
    },
    context_commentstring = {
        enable = true,
    },
}