norcalli / nvim-colorizer.lua

The fastest Neovim colorizer.
Other
2.25k stars 117 forks source link

How to set foreground colorization for all file types? #51

Open philippludwig opened 3 years ago

philippludwig commented 3 years ago

So with the information in the README it is not clear to me how to set foreground coloring as default for all filetypes. I tried:

lua require'colorizer'.setup('*'; {mode = 'foreground'};)

But that only yields:

E5107: Error loading lua [string ":lua"]:1: ')' expected near ';'

Removing the '*'; yields "Invalid option for filetype mode".

Sadly the README only shows how to switch the mode for certain filetypes, but I would like this for all.

Any advice?

harrygallagher4 commented 3 years ago

The first argument to setup is filetype specific configuration, second is default config.

require('colorizer').setup(nil, {names=false, mode='foreground'})