p00f / nvim-ts-rainbow

Rainbow parentheses for neovim using tree-sitter. Use https://sr.ht/~p00f/nvim-ts-rainbow instead
Apache License 2.0
869 stars 67 forks source link

Does not work, no errors #103

Closed D00mch closed 2 years ago

D00mch commented 2 years ago

Describe the bug Doesn't seem to work, no colors in parenthethis. Treesitter config works.

Steps to _reproduce NVIM v0.6.1 My dotfiles could be found here. Config (code below) is generated from fennel code (screenshot below)

{ensure_installed = {"clojure", "fennel", "java", "dart", "markdown"},
 highlight = {enable = true, additional_vim_regex_highlighting = false},
 indent = {enable = true},
 rainbow = {enable = true, extended_mode = true, max_file_lines = nil}}

Screenshots image

I can see that treesitter config is working because I see how syntax is being changing when add/remove it from ensure_installed image

p00f commented 2 years ago

can't reproduce, are you sure it is neovim 0.6.1?

D00mch commented 2 years ago
╭─m1@air in ~/dotfiles on lua ✔ (origin/lua)
╰$ nvim -v
NVIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@HMBRW-A-001-M1-004.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.6.1/share/nvim"
D00mch commented 2 years ago

Tried same config on my linux pc (nvim v0.6.1), don't see any highlighted parentheses. Seems like the problem is either in my config or in the plugin.

D00mch commented 2 years ago

:TSModuleInfo raibow does nothing. :TSModuleInfo indent opens buffer with list on something.

:checkhealth nvim_treesitter returns

  1 nvim_treesitter: health#nvim_treesitter#check
  2 ========================================================================
  3 ## Installation
  4   - OK: `tree-sitter` found 0.20.6 (parser generator, only needed for :TSInstallFromGrammar)
  5   - WARNING: `node` executable not found (only needed for :TSInstallFromGrammar, not required for :TSInstall)
  6   - OK: `git` executable found.
  7   - OK: `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  8     Version: Apple clang version 13.1.6 (clang-1316.0.21.2)
  9   - OK: Neovim was compiled with tree-sitter runtime ABI version 13 (required >=13). Parsers must be compatible with           runtime ABI.
 10  
 11 ## Parser/Features H L F I J
 12   - clojure        ✓ ✓ ✓ . ✓ 
 13   - fennel         ✓ ✓ . . ✓ 
 14   - markdown       ✓ . ✓ . ✓ 
 15   - dart           ✓ ✓ . ✓ ✓ 
 16   - java           ✓ ✓ . ✓ ✓ 
 17  
 18   Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
 19          +) multiple parsers found, only one will be used
 20          x) errors found in the query, try to run :TSUpdate {lang}
D00mch commented 2 years ago

For my shame, I though that I didn't have to load the plugin itself and all I have to do is to add the raibow in the treesitter.setup. Closing