My rainbow doesn't work
williamking5 opened this issue · 2 comments
williamking5 commented
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:
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 commented
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 commented
Fix it after I installed the Plugin.