nvim: Update rainbow brackets for deprecated ts modules

Since treesitter is deprecating modules we switch to the new fork of the
plugin which works without any use of treesitter modules.
A painless switch since I only use the default settings of the plugin
anyway.
This commit is contained in:
Marty Oehme 2024-05-28 18:31:43 +02:00
parent 3cc2e34a94
commit 418670790e
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -3,7 +3,6 @@ return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local rainbow = require("ts-rainbow")
require("nvim-treesitter.configs").setup({
-- one of "all", "maintained" (parsers with maintainers), or a list of languages
ensure_installed = "all",
@ -28,12 +27,6 @@ return {
indent = { enable = true },
autotag = { enable = true },
-- enable rainbow brackets, needs p00f/nvim-ts-rainbow
rainbow = {
enable = true,
strategy = { rainbow.strategy.global },
},
-- allows using . and ; to target treesitter branches
textsubjects = {
enable = true,
@ -44,8 +37,8 @@ return {
},
endwise = {
enable = true
}
enable = true,
},
})
-- for improved commentstrings, needs corresponding plugin
@ -87,11 +80,9 @@ return {
"TSUpdateSync",
},
-- rainbow brackets using treesitter
-- show current cursor context at top of buffer
-- improves commenting plugin above by using ts
dependencies = {
"https://gitlab.com/HiPhish/nvim-ts-rainbow2.git",
{ "romgrk/nvim-treesitter-context", config = true },
"JoosepAlviste/nvim-ts-context-commentstring",
"RRethy/nvim-treesitter-textsubjects",
@ -99,5 +90,13 @@ return {
"RRethy/nvim-treesitter-endwise",
},
},
-- rainbow brackets using treesitter
{
"https://gitlab.com/HiPhish/rainbow-delimiters.nvim",
lazy = false,
event = { "BufReadPost", "BufNewFile"},
config = function()
require("rainbow-delimiters.setup").setup({})
end,
},
}