feat(nvim): use ts-rainbow2 plugin
This commit is contained in:
parent
5bec1553f0
commit
7985f743f3
@ -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 }
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -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
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user