change treesitter config

This commit is contained in:
Alexander Navarro 2023-10-26 18:10:28 -03:00
parent f6ac8030ab
commit a08df1abf1

View file

@ -7,7 +7,8 @@ return {
"JoosepAlviste/nvim-ts-context-commentstring", "JoosepAlviste/nvim-ts-context-commentstring",
}, },
build = ":TSUpdate", build = ":TSUpdate",
opts = { config = function()
require("nvim-treesitter.configs").setup({
-- Add languages to be installed here that you want installed for treesitter -- Add languages to be installed here that you want installed for treesitter
ensure_installed = { ensure_installed = {
"bash", "bash",
@ -84,9 +85,7 @@ return {
}, },
autotag = { enable = true }, autotag = { enable = true },
context_commentstring = { enable = true, enable_autocmd = false }, context_commentstring = { enable = true, enable_autocmd = false },
}, })
config = function(_, opts)
require("nvim-treesitter.configs").setup(opts)
vim.opt.foldmethod = "expr" vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()" vim.opt.foldexpr = "nvim_treesitter#foldexpr()"