简体   繁体   中英

Neovim + rainbow

Asking a question here worked before about this type of issue, so I will try again.

I'm trying to use the rainbow plugin ( https://github.com/luochen1990/rainbow ) while learning clojure.

I do have TERM=xterm-256color set in my shell (zsh, if it matters).

I've also tried running nvim as COLORTERM=xterm-256color TERM=xterm-256color nvim

Here are my results:

vim:

Vim结果

nvim:

Neovim结果

If anyone has any advice or settings to try, I'd be extremely obliged. Thanks very much!

Seems your not the only one to notice https://github.com/luochen1990/rainbow/issues/31

It looks like something doesn't work properly to activate the plugin in neovim. Adding the following to your nvimrc

let g:rainbow_active = 1
autocmd VimEnter * RainbowToggle

makes the plugin work for me.

The autocmd just forces the plugin to start. If the plugin gets updated this might make it stop working since it could toggle it off.


Second answer

After more digging it appears you only need to put the following into your nvimrc.

syntax on
let g:rainbow_active = 1

The auto command gets fired on syntax on assuming g:rainbow_active is in your nvimrc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM