refactor(nvim): use rainbow-delimiters.nvim instead of ts-rainbow2
ts-rainbow2 is deprecated 😔
This commit is contained in:
parent
ecfc5c6330
commit
005c9b0ba7
@ -42,26 +42,6 @@ nvim_treesitter.setup({
|
|||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
rainbow = {
|
|
||||||
enable = true,
|
|
||||||
query = {
|
|
||||||
"rainbow-parens",
|
|
||||||
html = "rainbow-tags",
|
|
||||||
latex = "rainbow-blocks",
|
|
||||||
tsx = "rainbow-tags",
|
|
||||||
vue = "rainbow-tags",
|
|
||||||
javascript = "rainbow-parens-react",
|
|
||||||
},
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
textobjects = {
|
textobjects = {
|
||||||
select = {
|
select = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
@ -90,7 +90,6 @@ lazy.setup({
|
|||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ url = "https://gitlab.com/HiPhish/nvim-ts-rainbow2.git" },
|
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
"nvim-treesitter/playground",
|
"nvim-treesitter/playground",
|
||||||
"windwp/nvim-ts-autotag",
|
"windwp/nvim-ts-autotag",
|
||||||
@ -102,6 +101,44 @@ lazy.setup({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- Rainbow braces/brackets/etc
|
||||||
|
{
|
||||||
|
url = "https://gitlab.com/HiPhish/rainbow-delimiters.nvim",
|
||||||
|
config = function()
|
||||||
|
local rainbow_delimiters = require("rainbow-delimiters")
|
||||||
|
vim.g.rainbow_delimiters = {
|
||||||
|
strategy = {
|
||||||
|
on_attach = function()
|
||||||
|
if vim.fn.line("$") > 10000 then
|
||||||
|
return nil
|
||||||
|
elseif vim.fn.line("$") > 1000 then
|
||||||
|
return rainbow_delimiters.strategy["global"]
|
||||||
|
end
|
||||||
|
return rainbow_delimiters.strategy["local"]
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
query = {
|
||||||
|
[""] = "rainbow-delimiters",
|
||||||
|
lua = "rainbow-blocks",
|
||||||
|
latex = "rainbow-blocks",
|
||||||
|
html = "rainbow-blocks",
|
||||||
|
javascript = "rainbow-delimiters-react",
|
||||||
|
tsx = "rainbow-parens",
|
||||||
|
verilog = "rainbow-blocks",
|
||||||
|
},
|
||||||
|
highlight = {
|
||||||
|
"RainbowDelimiterRed",
|
||||||
|
"RainbowDelimiterYellow",
|
||||||
|
"RainbowDelimiterBlue",
|
||||||
|
"RainbowDelimiterOrange",
|
||||||
|
"RainbowDelimiterGreen",
|
||||||
|
"RainbowDelimiterViolet",
|
||||||
|
"RainbowDelimiterCyan",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- Dashboard when no file is given to nvim
|
-- Dashboard when no file is given to nvim
|
||||||
{
|
{
|
||||||
"goolord/alpha-nvim",
|
"goolord/alpha-nvim",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user