Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

My rainbow doesn't work #132

Closed
williamking5 opened this issue Aug 12, 2022 · 2 comments
Closed

My rainbow doesn't work #132

williamking5 opened this issue Aug 12, 2022 · 2 comments

Comments

@williamking5
Copy link

williamking5 commented Aug 12, 2022

Hi, thank you for great code, but my rainbow plugin is not working as expected. I followed README to configure rainbow. This is what I put in init.lua:

require('nvim-treesitter.configs').setup {
  -- A list of parser names, or "all"
  ensure_installed = { "python"},
  sync_install = false,
  auto_install = true,
  ignore_install = {"lua"},
  highlight = {
    -- `false` will disable the whole extension
    enable = true,
    -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
    -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
    -- the name of the parser)
    -- 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,
  },
  indent = {
	  enable = true,
  },
  rainbow = {
	  enable = true,
	  extended_mode = true,
	  max_file_line = nil,
  },
}

When I run the TSModuleInfo command, this is the output:

  >> default         highlight  incremental_selection  indent
  astro              ✓          ✗                      ✓
  bash               ✓          ✗                      ✗
  beancount          ✓          ✗                      ✗
  bibtex             ✓          ✗                      ✓
  c                  ✓          ✗                      ✓
  c_sharp            ✓          ✗                      ✗
  clojure            ✓          ✗                      ✗
  cmake              ✓          ✗                      ✗
  comment            ✗          ✗                      ✗
  commonlisp         ✗          ✗                      ✗
  cooklang           ✓          ✗                      ✗
  cpp                ✓          ✗                      ✓
  css                ✓          ✗                      ✓
  cuda               ✗          ✗                      ✗
  dart               ✓          ✗                      ✓
  dockerfile         ✓          ✗                      ✗
  dot                ✓          ✗                      ✗
  eex                ✓          ✗                      ✗
  elixir             ✓          ✗                      ✓
  elm                ✓          ✗                      ✗
  elvish             ✓          ✗                      ✗
  embedded_template  ✗          ✗                      ✗
  erlang             ✓          ✗                      ✗
  fennel             ✓          ✗                      ✗
  fish               ✓          ✗                      ✓
  foam               ✗          ✗                      ✗
  fortran            ✓          ✗                      ✓
  fusion             ✓          ✗                      ✓
  gdscript           ✓          ✗                      ✓
  gleam              ✓          ✗                      ✓
  glimmer            ✓          ✗                      ✗
  glsl               ✗          ✗                      ✗
  go                 ✓          ✗                      ✓
  gomod              ✗          ✗                      ✗
  gowork             ✓          ✗                      ✗
  graphql            ✓          ✗                      ✓
  hack               ✓          ✗                      ✗
  haskell            ✗          ✗                      ✗
  hcl                ✓          ✗                      ✓
  heex               ✗          ✗                      ✗
  help               ✓          ✗                      ✗

I guess it means that my rainbow is not installed properly since there should be a rainbow column.

I want rainbow to work for my Python file, but failed:

image

I am using the Neovim v0.8.0-dev-798-ge6680ea7c (Features: +acl +iconv +tui) on a server (installed by the binary release) in Iterm2.

I would appreciate for any kind help! :)

@williamking5
Copy link
Author

This is the minimal version init.lua to reproduce the error:

require('plugins')


require('nvim-treesitter.configs').setup {
  -- A list of parser names, or "all"
  ensure_installed = { "python"},
  sync_install = false,
  auto_install = true,
  ignore_install = {"lua"},
  highlight = {
    -- `false` will disable the whole extension
    enable = true,
    -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
    -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
    -- the name of the parser)
    -- 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,
  },
  indent = {
	  enable = true,
  },
  rainbow = {
	  enable = true,
	  extended_mode = true,
	  max_file_line = nil,
  },
}

@williamking5
Copy link
Author

Fix it after I installed the Plugin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant