1 require'nvim-treesitter.configs'.setup {
3 -- :TSInstallInfo 命令查看支持的语言
4 ensure_installed = {"cpp", "vim", "lua"},
8 additional_vim_regex_highlighting = false
11 incremental_selection = {
14 init_selection = '<CR>',
15 node_incremental = '<CR>',
16 node_decremental = '<BS>',
17 scope_incremental = '<TAB>',
20 -- 启用基于Treesitter的代码格式化(=) . NOTE: This is an experimental feature.
26 --vim.wo.foldmethod = 'expr'
27 --vim.wo.foldexpr = 'nvim_treesitter#foldexpr()'
29 -- https://stackoverflow.com/questions/8316139/how-to-set-the-default-to-unfolded-when-you-open-a-file
30 --vim.wo.foldlevel = 99