Code Monkey home page Code Monkey logo

Comments (8)

Kyuuhachi avatar Kyuuhachi commented on May 28, 2024 2

While it doesn't solve the root issue, I have this workaround in my config:

local rainbow = { "#CC8888", "#CCCC88", "#88CC88", "#88CCCC", "#8888CC", "#CC88CC" }
require "nvim-treesitter.configs".setup {
	rainbow = { colors = rainbow, termcolors = rainbow }
}
for i, c in ipairs(rainbow) do -- p00f/rainbow#81
	vim.cmd(("hi rainbowcol%d guifg=%s"):format(i, c))
end

from nvim-ts-rainbow.

p00f avatar p00f commented on May 28, 2024

what happens if you add print(vim.inspect(colors)) after this line?

local termcolors = get_colors(configs, "termcolors")

from nvim-ts-rainbow.

gozes avatar gozes commented on May 28, 2024

@p00f no differences I can see. sourceing the file and opening a clj file still shows the grouvbox colors

I now have

local parsers = require("nvim-treesitter.parsers")

local enabled_list = {"clojure", "fennel","racket"}
require'nvim-treesitter.configs'.setup {
  ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
  highlight = {
  enable = true,              -- false will disable the whole extension
    disable = { "c", "rust" },  -- list of language that will be disabled
    -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
    -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
    -- Using this option may slow down your editor, and you may see some duplicate highlights.
    -- Instead of true it can also be a list of languages
    additional_vim_regex_highlighting = false,
  },
  rainbow = {
      enable = true,
      colors = {
          "#E06C75",
          "#E5C07B",
          "#98C379",
          "#56B6C2",
          "#61AFEF",
          "#C678DD",
          "#E06C75"
        },
      extended_mode = true,
      print(vim.inspect(colors))
      max_file_lines = nil,
      disable = vim.tbl_filter(
      function(p) 
           local disable = true
           for _, lang in pairs(enabled_list) do
               if p==lang then disable = false end
            end
            return disable
      end, parsers.available_parsers()
      )
  }
}

from nvim-ts-rainbow.

p00f avatar p00f commented on May 28, 2024

no i mean the print statement should echo something to the message area, what does it echo?

from nvim-ts-rainbow.

gozes avatar gozes commented on May 28, 2024

I get nil if I do :lua print(vim.inspect(colors))

from nvim-ts-rainbow.

p00f avatar p00f commented on May 28, 2024

what happens if you add print(vim.inspect(colors)) after this line?

local termcolors = get_colors(configs, "termcolors")

add it after this line

from nvim-ts-rainbow.

gozes avatar gozes commented on May 28, 2024

ok put under that line but nothing. Not even nil when I relaunch nvim

from nvim-ts-rainbow.

lockejan avatar lockejan commented on May 28, 2024

what happens if you add print(vim.inspect(colors)) after this line?

local termcolors = get_colors(configs, "termcolors")

add it after this line

Hm, I'm experiencing the same. I can only apply colors using vim.cmd as show in the readme, but the table I define inside treesitter is completely ignored.

The code changed quite a bit since this suggestion. Any more ideas for debugging or where to put the print statement @p00f ???

from nvim-ts-rainbow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.