local o = vim.o
local wo = vim.wo
local bo = vim.bo
wo.foldmethod = 'manual'
vim.cmd 'set foldexpr=nvim_treesitter#foldexpr()'
require'nvim-treesitter.configs'.setup {
ensure_installed = "all",
highlight = {
enable = true,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = 's',
node_incremental = 'sn',
scope_incremental = 'ss',
node_decremental = 'sd'
},
},
indent = {
enable = true,
disable = {'c', 'cpp', 'python', 'rust'}
},
playground = {
enable = true,
disable = {},
updatetime = 25,
persist_queries = false
},
textobjects = {
select = {
enable = true,
keymaps = {
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
}
},
swap = {
enable = true,
swap_next = {
["<c-.>"] = "@parameter.inner",
},
swap_previous = {
["<c-,>"] = "@parameter.inner",
}
},
move = {
enable = true,
set_jumps = false, goto_next_start = {
["]]"] = "@function.outer",
["]m"] = "@class.outer",
},
goto_next_end = {
["]["] = "@function.outer",
["]M"] = "@class.outer",
},
goto_previous_start = {
["[["] = "@function.outer",
["[m"] = "@class.outer",
},
goto_previous_end = {
["[]"] = "@function.outer",
["[M"] = "@class.outer",
},
},
},
}