From 4a72542f7fe2e775ac52c7e58746291790e39052 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Mon, 25 Apr 2022 19:30:41 +0300 Subject: [PATCH] Nvim: add treesitter ensure_installed --- home/.config/nvim/lua/pluginconf/treesitter.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/home/.config/nvim/lua/pluginconf/treesitter.lua b/home/.config/nvim/lua/pluginconf/treesitter.lua index ac309c7..41c1719 100644 --- a/home/.config/nvim/lua/pluginconf/treesitter.lua +++ b/home/.config/nvim/lua/pluginconf/treesitter.lua @@ -1,13 +1,19 @@ 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}, indent = {enable = true}, incremental_selection = {enable = true}, context_commentstring = {enable = true} } -vim.wo.foldmethod = 'expr'; +vim.wo.foldmethod = 'expr' 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.foldnestmax = 3 vim.wo.foldminlines = 1