local treesitter_configs = require("nvim-treesitter.configs") local parser_config = require("nvim-treesitter.parsers").get_parser_configs() -- disable treesitter for zsh parser_config.zsh = { install_info = {}, used_by = {}, maintainers = {}, } treesitter_configs.setup({ ensure_installed = { "comment", "css", "go", "graphql", "html", "javascript", "jsdoc", "json", "jsonc", "lua", "markdown", "markdown_inline", "python", "query", "regex", "ruby", "rust", "scss", "toml", "tsx", "typescript", "vim", "vimdoc", "yaml", }, highlight = { enable = true, }, indent = { enable = true, disable = { "yaml" }, }, matchup = { enable = true, include_match_words = true, }, playground = { enable = true, }, textobjects = { select = { enable = true, lookahead = true, keymaps = { ["af"] = "@function.outer", ["if"] = "@function.inner", ["ac"] = "@class.outer", ["ic"] = "@class.inner", }, }, }, textsubjects = { enable = true, keymaps = { ["."] = "textsubjects-smart", }, }, }) vim.cmd([[ autocmd FileType css,go,html,javascript,javascriptreact,json,lua,python,ruby,rust,toml,typescript,typescriptreact,yaml \ set foldmethod=expr foldexpr=nvim_treesitter#foldexpr() ]])