feat(nvim): use ts-rainbow2 plugin

This commit is contained in:
Price Hiller 2023-03-02 19:43:11 -06:00
parent 5bec1553f0
commit 7985f743f3
No known key found for this signature in database
3 changed files with 18 additions and 3 deletions

View File

@ -121,6 +121,13 @@ require("kanagawa").setup({
Folded = { bg = colors.waveBlue1 },
UfoFoldedBg = { bg = "NONE" },
TSRainbowRed = { fg = colors.peachRed },
TSRainbowYellow = { fg = colors.carpYellow },
TSRainbowBlue = { fg = colors.crystalBlue },
TSRainbowGreen = { fg = colors.springGreen },
TSRainbowViolet = { fg = colors.oniViolet },
TSRainbowCyan = { fg = colors.lightBlue }
},
})

View File

@ -15,8 +15,16 @@ nvim_treesitter.setup({
},
rainbow = {
enable = true,
extended_mode = true,
max_file_lines = nil,
query = "rainbow-parens",
strategy = {
on_attach = function()
if vim.fn.line('$') < 1000 then
require("ts-rainbow.strategy.local")
elseif vim.fn.line('$') < 10000 then
require("ts-rainbow.strategy.global")
end
end
},
},
})

View File

@ -93,7 +93,7 @@ lazy.setup({
event = "VeryLazy",
build = ":TSUpdate",
dependencies = {
"p00f/nvim-ts-rainbow",
{ url = "https://gitlab.com/HiPhish/nvim-ts-rainbow2.git" },
"nvim-treesitter/nvim-treesitter-context",
},
config = function()