diff options
author | akianonymus <anonymus.aki@gmail.com> | 2023-02-22 18:43:01 +0530 |
---|---|---|
committer | Akshay <anonymus.aki@gmail.com> | 2023-02-26 11:02:44 +0530 |
commit | 7e1f3b2a040e37895cc6797e5fb6032f9165e5c9 (patch) | |
tree | 5961df8743282bc7a157afd5c68923daf8135cc7 /README.md | |
parent | feat: Improve hsl parser (diff) |
fix: Improve individual opts behaviour | #48
See https://github.com/NvChad/nvim-colorizer.lua/issues/48
css is true, names is true: Show names
css is true, names is unset: Show names
css is true, names is false: Don't show names
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -162,6 +162,32 @@ require 'colorizer'.setup { ``` +In `user_default_options`, there are 2 types of options + +1. Individual options - `names`, `RGB`, `RRGGBB`, `RRGGBBAA`, `hsl_fn`, `rgb_fn` , `RRGGBBAA`, `AARRGGBB`, `tailwind`, `sass` + +1. Alias options - `css`, `css_fn` + +If `css_fn` is true, then `hsl_fn`, `rgb_fn` becomes `true` + +If `css` is true, then `names`, `RGB`, `RRGGBB`, `RRGGBBAA`, `hsl_fn`, `rgb_fn` becomes `true` + +These options have a priority, Individual options have the highest priority, then alias options + +For alias, `css_fn` has more priority over `css` + +e.g: Here `RGB`, `RRGGBB`, `RRGGBBAA`, `hsl_fn`, `rgb_fn` is enabled but not `names` + +```lua +require 'colorizer'.setup { user_default_options = { names = false, css = true } } +``` + +e.g: Here `names`, `RGB`, `RRGGBB`, `RRGGBBAA` is enabled but not `rgb_fn` and `hsl_fn` + +```lua +require 'colorizer'.setup { user_default_options = { css_fn = false, css = true } } +``` + All the above examples can also be apply to buftypes. Also no buftypes trigger colorizer by default Buftype value is fetched by `vim.bo.buftype` |