add: update config support ts ts rainbow

This commit is contained in:
asep.komarudin 2024-05-19 21:50:27 +07:00
parent 82ab2d8832
commit 222154cce9
2 changed files with 29 additions and 12 deletions

View file

@ -2,6 +2,11 @@ return {
{
"nvim-treesitter/nvim-treesitter",
dependencies = {
{
"pojokcodeid/nvim-ts-rainbow2",
lazy = true,
event = "BufRead",
},
{
"JoosepAlviste/nvim-ts-context-commentstring",
lazy = true,
@ -61,18 +66,29 @@ return {
"TSInstallFromGrammar",
},
event = { "BufRead", "VeryLazy" },
opts = {
highlight = { enable = true },
indent = { enable = true },
ensure_installed = {
"lua",
"vim",
"vimdoc",
},
incremental_selection = {
enable = true,
},
},
opts = function()
return {
highlight = { enable = true },
indent = { enable = true },
ensure_installed = {
"lua",
"vim",
"vimdoc",
},
incremental_selection = {
enable = true,
},
autopairs = {
enable = true,
},
rainbow = {
enable = true,
disable = { "html", "tsx" },
equery = "rainbow-parens",
strategy = require("ts-rainbow").strategy.global,
},
}
end,
config = function(_, opts)
if type(opts.ensure_installed) == "table" then
---@type table<string, boolean>