HiPhish / rainbow-delimiters.nvim

Rainbow delimiters for Neovim with Tree-sitter
https://gitlab.com/HiPhish/rainbow-delimiters.nvim
Apache License 2.0
470 stars 35 forks source link

[Bug]: Don't work on python files #41

Closed kobzar closed 8 months ago

kobzar commented 9 months ago

Neovim version

NVIM v0.9.2

Language affected

Python

Query

No response

Strategy

No response

Description

This plugin work normaly with lua files but doesnt work in python

I am use AstroNvim with this configuration
https://github.com/AstroNvim/astrocommunity/blob/main/lua/astrocommunity/editing-support/nvim-ts-rainbow2/init.lua

My Theme is Material (as i say before in Lua file all is good)

image

HiPhish commented 9 months ago

Do you have the Python parser installed? Execute :TSInstallInfo and the Python entry. If it is not installed you can add it via :TSInstall python. If that does not help execute :checkhealth rainbow-delimiters to validate your configuration.

kobzar commented 9 months ago

TS python is instaled checkhealth rainbow-delimiters command return

rainbow-delimiters: require("rainbow-delimiters.health").check()

- ERROR The healthcheck report for "rainbow-delimiters" plugin is empty.

But in the same time lua file

image
kobzar commented 9 months ago

Just change my config to

  {
    "HiPhish/rainbow-delimiters.nvim",
    dependencies = "nvim-treesitter/nvim-treesitter",
    event = "VeryLazy",
    config = function(_, opts) require "rainbow-delimiters.setup"(opts) end,
  },

This configuration look normaly and work if we are open file inside nvim like Telescope,NerdTree e.t.c But if we are try to open file like nvim file.py - this isnt work

so, the next one i was change the colors priority

  {
    "HiPhish/rainbow-delimiters.nvim",
    event = "VeryLazy",
    config = function(_, opts) require "rainbow-delimiters.setup"(opts) end,
    opts = {
      highlight = {
        "RainbowDelimiterBlue",
        "RainbowDelimiterYellow",
        "RainbowDelimiterViolet",
        "RainbowDelimiterOrange",
        "RainbowDelimiterCyan",
        "RainbowDelimiterRed",
        "RainbowDelimiterGreen",
      },
    },
  },

This working to. But cant understand how to change the Cyan color? As you can see the colors look something strange with my Material theme

image
HiPhish commented 9 months ago

The highlight option is a list of highlight groups. You can either use your own highlight groups, or you can redefine the existing ones. See :h :highlight or :h nvim_set_hl(). I don't use AstroNvim, so I don't know what kind of lazy loading or other hackery it is doing. Normally you don't need any configuration, the plugin works out of the box with reasonable defaults.