From 7e1f3b2a040e37895cc6797e5fb6032f9165e5c9 Mon Sep 17 00:00:00 2001 From: akianonymus Date: Wed, 22 Feb 2023 18:43:01 +0530 Subject: 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 --- doc/modules/colorizer.html | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'doc/modules/colorizer.html') 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
-

defaults 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

  2. +
  3. Alias options - css, css_fn

  4. +
+ +

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 = {
-- 
cgit v1.2.3-70-g09d2