dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

nvim-treesitter.lua (1789B)


      1 require('nvim-treesitter.configs').setup {
      2   -- Add languages to be installed here that you want installed for treesitter
      3   ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'typescript', 'vim', 'vimdoc', 'bash', 'ledger', 'ruby',
      4     'python', 'java', 'sql', 'markdown_inline', 'html'},
      5 
      6   highlight = { enable = true },
      7   indent = { enable = true, disable = { 'python' } },
      8   incremental_selection = {
      9     enable = true,
     10     keymaps = {
     11       init_selection = '<c-space>',
     12       node_incremental = '<c-space>',
     13       scope_incremental = '<c-s>',
     14       node_decremental = '<c-+>',
     15     },
     16   },
     17   textobjects = {
     18     select = {
     19       enable = true,
     20       lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
     21       keymaps = {
     22         -- You can use the capture groups defined in textobjects.scm
     23         ['aa'] = '@parameter.outer',
     24         ['ia'] = '@parameter.inner',
     25         ['af'] = '@function.outer',
     26         ['if'] = '@function.inner',
     27         ['ac'] = '@class.outer',
     28         ['ic'] = '@class.inner',
     29       },
     30     },
     31     move = {
     32       enable = true,
     33       set_jumps = true, -- whether to set jumps in the jumplist
     34       goto_next_start = {
     35         [']m'] = '@function.outer',
     36         [']]'] = '@class.outer',
     37       },
     38       goto_next_end = {
     39         [']M'] = '@function.outer',
     40         [']['] = '@class.outer',
     41       },
     42       goto_previous_start = {
     43         ['[m'] = '@function.outer',
     44         ['[['] = '@class.outer',
     45       },
     46       goto_previous_end = {
     47         ['[M'] = '@function.outer',
     48         ['[]'] = '@class.outer',
     49       },
     50     },
     51     swap = {
     52       enable = true,
     53       swap_next = {
     54         ['<leader>a'] = '@parameter.inner',
     55       },
     56       swap_previous = {
     57         ['<leader>A'] = '@parameter.inner',
     58       },
     59     },
     60   },
     61 }