luochen1990 / rainbow

Rainbow Parentheses Improved, shorter code, no level limit, smooth and fast, powerful configuration.
Apache License 2.0
1.78k stars 95 forks source link

rainbow vim plugin does not work with neovim(0.5.1) on NixOS (nixpkgs-unstable), out of the box #178

Closed akademsubotnik closed 2 years ago

akademsubotnik commented 2 years ago

Describe the bug

I added rainbow to the list of neovim plugins I use, YouCompleteMe , works. I do not see a difference in the syntax color with rainbow vim plugin.

To Reproduce

In /etc/nixos/configuration.nix include the following block of code

    #NeoVim#
    programs.neovim = {
      enable = true;
      defaultEditor = true;
      viAlias = true;
      configure = {
        customRC = ''
          set undofile
        '';
      packages.myVimPackage = with pkgs.vimPlugins; {
      start = [ YouCompleteMe rainbow ];
      };

      };

    };
    #End NeoVim#
luochen1990 commented 2 years ago

It already works, you can try :RainbowToggle to confirm that.

And if you want it activated by default, add following to your customRC

programs.neovim = {
  configure = {
    customRC = ''
      let g:rainbow_active = 1
    '';
  };
};
akademsubotnik commented 2 years ago

@luochen1990 , thanks for the help, I was running the wrong vim command to change the color scheme in vim.