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 /doc | |
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 'doc')
-rw-r--r-- | doc/colorizer.txt | 33 | ||||
-rw-r--r-- | doc/modules/colorizer.html | 33 |
2 files changed, 65 insertions, 1 deletions
diff --git a/doc/colorizer.txt b/doc/colorizer.txt index 1727fc4..0dfbf63 100644 --- a/doc/colorizer.txt +++ b/doc/colorizer.txt @@ -192,6 +192,39 @@ clear_highlight_cache() *colorizer.clear_highlight_cache* user_default_options *colorizer.user_default_options* defaults options. + 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` + +> + 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` + +> + require 'colorizer'.setup { user_default_options = { css_fn = false, css = + true } } +< + > user_default_options = { RGB = true, -- #RGB hex codes diff --git a/doc/modules/colorizer.html b/doc/modules/colorizer.html index e9fcd62..1196e4d 100644 --- a/doc/modules/colorizer.html +++ b/doc/modules/colorizer.html @@ -385,7 +385,38 @@ Setup an autocmd which enables colorizing for the filetypes and options specifie </dt> <dd> -<p>defaults options. </p> +<p>defaults options. +In <a href="../modules/colorizer.html#user_default_options">user_default_options</a>, there are 2 types of options</p> + +<ol> + <li><p>Individual options - <code>names</code>, <code>RGB</code>, <code>RRGGBB</code>, <code>RRGGBBAA</code>, <code>hsl_fn</code>, <code>rgb_fn</code> , <code>RRGGBBAA</code>, <code>AARRGGBB</code>, <code>tailwind</code>, <code>sass</code></p></li> + <li><p>Alias options - <code>css</code>, <code>css_fn</code></p></li> +</ol> + +<p>If <code>css_fn</code> is true, then <code>hsl_fn</code>, <code>rgb_fn</code> becomes <code>true</code></p> + +<p>If <code>css</code> is true, then <code>names</code>, <code>RGB</code>, <code>RRGGBB</code>, <code>RRGGBBAA</code>, <code>hsl_fn</code>, <code>rgb_fn</code> becomes <code>true</code></p> + +<p>These options have a priority, Individual options have the highest priority, then alias options</p> + +<p>For alias, <code>css_fn</code> has more priority over <code>css</code></p> + +<p>e.g: Here <code>RGB</code>, <code>RRGGBB</code>, <code>RRGGBBAA</code>, <code>hsl_fn</code>, <code>rgb_fn</code> is enabled but not <code>names</code></p> + + +<pre> + require 'colorizer'.setup { user_default_options = { names = false, css = true } } +</pre> + + +<p>e.g: Here <code>names</code>, <code>RGB</code>, <code>RRGGBB</code>, <code>RRGGBBAA</code> is enabled but not <code>rgb_fn</code> and <code>hsl_fn</code></p> + + +<pre> + require 'colorizer'.setup { user_default_options = { css_fn = false, css = true } } +</pre> + + <pre> user_default_options = { |