diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua index e543e83..91791b5 100644 --- a/nvim/.config/nvim/lua/plugins/treesitter.lua +++ b/nvim/.config/nvim/lua/plugins/treesitter.lua @@ -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, @@ -43,9 +36,9 @@ return { }, }, - endwise = { - enable = true - } + endwise = { + 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, + }, } -