2021-08-08 15:33:23 +03:00
|
|
|
require'nvim-treesitter.configs'.setup {
|
2022-04-25 19:30:41 +03:00
|
|
|
ensure_installed = {
|
|
|
|
"bash", "c", "css", "dockerfile", "html", "http", "java", "json",
|
|
|
|
"json5", "latex", "lua", "make", "markdown", "php", "python", "regex",
|
|
|
|
"rst", "scss", "toml", "tsx", "typescript", "javascript", "yaml"
|
|
|
|
},
|
2021-08-08 15:33:23 +03:00
|
|
|
highlight = {enable = true},
|
|
|
|
indent = {enable = true},
|
2021-08-18 21:20:20 +03:00
|
|
|
incremental_selection = {enable = true},
|
|
|
|
context_commentstring = {enable = true}
|
2021-08-08 15:33:23 +03:00
|
|
|
}
|
2022-04-22 09:50:18 +03:00
|
|
|
|
2022-04-25 19:30:41 +03:00
|
|
|
vim.wo.foldmethod = 'expr'
|
2022-04-22 09:50:18 +03:00
|
|
|
vim.wo.foldexpr = 'nvim_treesitter#foldexpr()'
|
2022-04-25 19:30:41 +03:00
|
|
|
vim.wo.foldtext =
|
|
|
|
[[substitute(getline(v:foldstart), '\\t' repeat('\ ',&tabstop),'g').'...'.trim(v:foldend)]]
|
2022-04-22 09:50:18 +03:00
|
|
|
vim.wo.fillchars = 'fold:\\'
|
|
|
|
vim.wo.foldnestmax = 3
|
|
|
|
vim.wo.foldminlines = 1
|