Skip to content

sunjon/nvim-ts-rainbow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nvim-ts-rainbow

Rainbow parens for neovim using tree-sitter. Needs nvim-treesitter.

Tested languages - lua, java, clojure, fennel, python, css. Should work with any language, except bash and idk probably something else too.

(Update - lua works after neovim/neovim/#133357 was merged)

Setup

require'nvim-treesitter.configs'.setup {
  rainbow = {
    enable = true,
    disable = {'bash'} -- please disable bash until I figure #1 out
  }
}

Colours

I've used the gruvbox palette because it is nice and subtle. I wanted to use VIBGYOR for an actual rainbow, but

  • indigo and blue look the same.
  • the colours were too bright and distracting.

To change the colours, edit lua/rainbow/colors.lua. If you want to override only a few colours (you can only change colours 1 through 7 this way), you can do it in your init.vim: (thanks @delphinus !)

hi rainbowcol1 guifg=#123456

Screenshots

alt text alt text alt text

Credits

Huge thanks to @vigoux, @theHamsta, @sogaiu and @steelsojka for all their help

About

Rainbow parens for neovim using tree-sitter

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Lua 98.9%
  • Vim Script 1.1%