Nvim: add treesitter ensure_installed
This commit is contained in:
parent
bf0c005444
commit
ff359ffee9
1 changed files with 8 additions and 2 deletions
|
@ -1,13 +1,19 @@
|
||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
|
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"
|
||||||
|
},
|
||||||
highlight = {enable = true},
|
highlight = {enable = true},
|
||||||
indent = {enable = true},
|
indent = {enable = true},
|
||||||
incremental_selection = {enable = true},
|
incremental_selection = {enable = true},
|
||||||
context_commentstring = {enable = true}
|
context_commentstring = {enable = true}
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.wo.foldmethod = 'expr';
|
vim.wo.foldmethod = 'expr'
|
||||||
vim.wo.foldexpr = 'nvim_treesitter#foldexpr()'
|
vim.wo.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||||
vim.wo.foldtext = [[substitute(getline(v:foldstart), '\\t' repeat('\ ',&tabstop),'g').'...'.trim(v:foldend)]]
|
vim.wo.foldtext =
|
||||||
|
[[substitute(getline(v:foldstart), '\\t' repeat('\ ',&tabstop),'g').'...'.trim(v:foldend)]]
|
||||||
vim.wo.fillchars = 'fold:\\'
|
vim.wo.fillchars = 'fold:\\'
|
||||||
vim.wo.foldnestmax = 3
|
vim.wo.foldnestmax = 3
|
||||||
vim.wo.foldminlines = 1
|
vim.wo.foldminlines = 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue