diff options
author | Akianonymus <anonymus.aki@gmail.com> | 2022-09-15 10:00:00 +0530 |
---|---|---|
committer | Akianonymus <anonymus.aki@gmail.com> | 2022-09-15 13:51:38 +0530 |
commit | cf4f33f5ea34f9c4e9975299b094f1a2b8b34aa0 (patch) | |
tree | 3f2558419b2643ac7af8f4abe8e67db478d64309 /doc | |
parent | fix(gitignore) Add doc/tags to .gitignore (diff) |
Better structure and naming | Misc improvements
Diffstat (limited to 'doc')
-rw-r--r-- | doc/colorizer.txt | 277 | ||||
-rw-r--r-- | doc/index.html | 12 | ||||
-rw-r--r-- | doc/modules/colorizer.buffer.html (renamed from doc/modules/colorizer.buffer_utils.html) | 122 | ||||
-rw-r--r-- | doc/modules/colorizer.color.html (renamed from doc/modules/colorizer.color_utils.html) | 217 | ||||
-rw-r--r-- | doc/modules/colorizer.html | 16 | ||||
-rw-r--r-- | doc/modules/colorizer.matcher.html (renamed from doc/modules/colorizer.matcher_utils.html) | 46 | ||||
-rw-r--r-- | doc/modules/colorizer.sass.html | 32 | ||||
-rw-r--r-- | doc/modules/colorizer.tailwind.html | 22 | ||||
-rw-r--r-- | doc/modules/colorizer.trie.html | 6 | ||||
-rw-r--r-- | doc/modules/utils.html | 64 |
10 files changed, 538 insertions, 276 deletions
diff --git a/doc/colorizer.txt b/doc/colorizer.txt index 6171fbf..57273af 100644 --- a/doc/colorizer.txt +++ b/doc/colorizer.txt @@ -89,15 +89,15 @@ Tables: ~ |user_default_options| - defaults options. Fields: ~ - |DEFAULT_NAMESPACE| - Default namespace used in - `colorizer.buffer_utils.highlight_buffer` and `attach_to_buffer`. + |DEFAULT_NAMESPACE| - Default namespace used in `colorizer.buffer.highlight` + and `attach_to_buffer`. highlight_buffer() *colorizer.highlight_buffer* Highlight the buffer region See also:~ - |colorizer.buffer_utils.highlight_buffer| + |colorizer.buffer.highlight| @@ -111,7 +111,7 @@ is_buffer_attached({buf}) *colorizer.is_buffer_attached* number or nil: if attached to the buffer, false otherwise. See also:~ - |highlight_buffer| + |colorizer.buffer.highlight| @@ -234,49 +234,69 @@ user_default_options *colorizer.user_default_options* DEFAULT_NAMESPACE *colorizer.DEFAULT_NAMESPACE* - Default namespace used in `colorizer.buffer_utils.highlight_buffer` and + Default namespace used in `colorizer.buffer.highlight` and `attach_to_buffer`. See also:~ - |colorizer.buffer_utils.highlight_buffer| + |colorizer.buffer.highlight| |attach_to_buffer| ============================================================================== -BUFFER_UTILS *colorizer.buffer_utils-introduction* +BUFFER *colorizer.buffer-introduction* Helper functions to highlight buffer smartly ============================================================================== -LUA API *colorizer.buffer_utils-lua-api* +LUA API *colorizer.buffer-lua-api* Functions: ~ |clear_hl_cache| - Clean the highlight cache - |highlight_buffer| - Highlight the buffer region. + |add_highlight| - Create highlight and set highlights - |rehighlight_buffer| - Rehighlight the buffer if colorizer is active + |highlight| - Highlight the buffer region. + + |parse_lines| - Parse the given lines for colors and return a table + containing + rgb_hex and range per line + + |rehighlight| - Rehighlight the buffer if colorizer is active Tables: ~ - |HIGHLIGHT_MODE_NAMES| - Highlight mode which will be use to render the + |highlight_mode_names| - Highlight mode which will be use to render the colour Fields: ~ - |DEFAULT_NAMESPACE| - Default namespace used in `highlight_buffer` and + |default_namespace| - Default namespace used in `highlight` and `colorizer.attach_to_buffer`. -clear_hl_cache() *colorizer.buffer_utils.clear_hl_cache* +clear_hl_cache() *colorizer.buffer.clear_hl_cache* Clean the highlight cache - *colorizer.buffer_utils.highlight_buffer* -highlight_buffer({buf}, {ns}, {lines}, {line_start}, {line_end}, {options}, -{options_local}) + *colorizer.buffer.add_highlight* +add_highlight({buf}, {ns}, {line_start}, {line_end}, {data}, {options}) + Create highlight and set highlights + + Parameters: ~ + {buf} - number + {ns} - number + {line_start} - number + {line_end} - number + {data} - table: table output of `parse_lines` + {options} - table: Passed in setup, mainly for `user_default_options` + + + + + *colorizer.buffer.highlight* +highlight({buf}, {ns}, {line_start}, {line_end}, {options}, {options_local}) Highlight the buffer region. Highlight starting from `line_start` (0-indexed) for each line described by @@ -287,8 +307,7 @@ highlight_buffer({buf}, {ns}, {lines}, {line_start}, {line_end}, {options}, Parameters: ~ {buf} - number: buffer id {ns} - number: The namespace id. Default is DEFAULT_NAMESPACE. Create - it with `vim.api.create_namespace` - {lines} - table: the lines to highlight from the buffer. + it with `vim.api.nvim_create_namespace` {line_start} - number: line_start should be 0-indexed {line_end} - number: Last line to highlight {options} - table: Configuration options as described in `setup` @@ -300,8 +319,27 @@ highlight_buffer({buf}, {ns}, {lines}, {line_start}, {line_end}, {options}, - *colorizer.buffer_utils.rehighlight_buffer* -rehighlight_buffer({buf}, {options}, {options_local}, {use_local_lines}) + *colorizer.buffer.parse_lines* +parse_lines({buf}, {lines}, {line_start}, {options}) + Parse the given lines for colors and return a table containing + rgb_hex and range per line + + Parameters: ~ + {buf} - number + {lines} - table + {line_start} - number: This is the buffer line number, from where to + start highlighting + {options} - table: Passed in `colorizer.setup`, Only uses + `user_default_options` + + returns:~ + table or nil + + + + + *colorizer.buffer.rehighlight* +rehighlight({buf}, {options}, {options_local}, {use_local_lines}) Rehighlight the buffer if colorizer is active Parameters: ~ @@ -316,7 +354,7 @@ rehighlight_buffer({buf}, {options}, {options_local}, {use_local_lines}) -HIGHLIGHT_MODE_NAMES *colorizer.buffer_utils.HIGHLIGHT_MODE_NAMES* +highlight_mode_names *colorizer.buffer.highlight_mode_names* Highlight mode which will be use to render the colour Fields: ~ @@ -326,147 +364,179 @@ HIGHLIGHT_MODE_NAMES *colorizer.buffer_utils.HIGHLIGHT_MODE_NAMES* -DEFAULT_NAMESPACE *colorizer.buffer_utils.DEFAULT_NAMESPACE* - Default namespace used in `highlight_buffer` and - `colorizer.attach_to_buffer`. +default_namespace *colorizer.buffer.default_namespace* + Default namespace used in `highlight` and `colorizer.attach_to_buffer`. See also:~ - |highlight_buffer| + |highlight| |colorizer.attach_to_buffer| ============================================================================== -COLOR_UTILS *colorizer.color_utils-introduction* +COLOR *colorizer.color-introduction* Helper functions to parse different colour formats ============================================================================== -LUA API *colorizer.color_utils-lua-api* +LUA API *colorizer.color-lua-api* Functions: ~ - |color_is_bright| - Determine whether to use black or white text. + |argb_hex_parser| - parse for 0xaarrggbb and return rgb hex. - |color_name_parser| - Grab all the colour values from - `vim.api.nvim_get_color_map` and create a lookup table. + |hsl_to_rgb| - Converts an HSL color value to RGB. + + |hsl_function_parser| - Parse for hsl() css function and return rgb hex. + + |hsla_function_parser| - Parse for hsl() css function and return rgb hex. + + |hue_to_rgb| - Convert hsl colour values to rgb. + + |is_bright| - Determine whether to use black or white text. + + |name_parser| - Grab all the colour values from `vim.api.nvim_get_color_map` + and create a lookup table. |rgb_function_parser| - Parse for rgb() css function and return rgb hex. |rgba_function_parser| - Parse for rgba() css function and return rgb hex. - |hsl_function_parser| - Parse for hsl() css function and return rgb hex. + |rgba_hex_parser| - parse for #rrggbbaa and return rgb hex. - |hsla_function_parser| - Parse for hsl() css function and return rgb hex. - |argb_hex_parser| - parse for 0xaarrggbb and return rgb hex. +argb_hex_parser({line}, {i}) *colorizer.color.argb_hex_parser* + parse for 0xaarrggbb and return rgb hex. - |rgba_hex_parser| - parse for #rrggbbaa and return rgb hex. + a format used in android apps -color_is_bright({r}, {g}, {b}) *colorizer.color_utils.color_is_bright* - Determine whether to use black or white text. + Parameters: ~ + {line} - string: line to parse + {i} - number: index of line from where to start parsing + returns:~ + number or nil: index of line where the hex value ended + string or nil: rgb hex value - ref: https://stackoverflow.com/a/1855903/837964 - https://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color +hsl_to_rgb({h}, {s}, {l}) *colorizer.color.hsl_to_rgb* + Converts an HSL color value to RGB. + Parameters: ~ - {r} - number: Red - {g} - number: Green - {b} - number: Blue + {h} - number: Hue + {s} - number: Saturation + {l} - number: Lightness + returns:~ + number or nil,number or nil,number or nil -color_name_parser({line}, {i}, {opts}) *colorizer.color_utils.color_name_parser* - Grab all the colour values from `vim.api.nvim_get_color_map` and create a - lookup table. - - COLOR_MAP is used to store the colour values +hsl_function_parser({line}, {i}) *colorizer.color.hsl_function_parser* + Parse for hsl() css function and return rgb hex. Parameters: ~ {line} - string: Line to parse {i} - number: Index of line from where to start parsing - {opts} - table: Currently contains whether tailwind is enabled or not + returns:~ + number or nil: Index of line where the hsl function ended + string or nil: rgb hex value -rgb_function_parser({line}, {i}) *colorizer.color_utils.rgb_function_parser* - Parse for rgb() css function and return rgb hex. + +hsla_function_parser({line}, {i}) *colorizer.color.hsla_function_parser* + Parse for hsl() css function and return rgb hex. Parameters: ~ {line} - string: Line to parse {i} - number: Index of line from where to start parsing returns:~ - number or nil: Index of line where the rgb function ended + number or nil: Index of line where the hsla function ended string or nil: rgb hex value -rgba_function_parser({line}, {i}) *colorizer.color_utils.rgba_function_parser* - Parse for rgba() css function and return rgb hex. +hue_to_rgb({p}, {q}, {t}) *colorizer.color.hue_to_rgb* + Convert hsl colour values to rgb. - Todo consider removing the regexes here - Todo this might not be the best approach to alpha channel. - Things like pumblend might be useful here. + Source: https://gist.github.com/mjackson/5311256 Parameters: ~ - {line} - string: Line to parse - {i} - number: Index of line from where to start parsing + {p} - number + {q} - number + {t} - number returns:~ - number or nil: Index of line where the rgba function ended - string or nil: rgb hex value + number -hsl_function_parser({line}, {i}) *colorizer.color_utils.hsl_function_parser* - Parse for hsl() css function and return rgb hex. +is_bright({r}, {g}, {b}) *colorizer.color.is_bright* + Determine whether to use black or white text. + + + ref: https://stackoverflow.com/a/1855903/837964 + https://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color + + + Parameters: ~ + {r} - number: Red + {g} - number: Green + {b} - number: Blue + + + +name_parser({line}, {i}, {opts}) *colorizer.color.name_parser* + Grab all the colour values from `vim.api.nvim_get_color_map` and create a + lookup table. + + COLOR_MAP is used to store the colour values + Parameters: ~ {line} - string: Line to parse {i} - number: Index of line from where to start parsing - - returns:~ - number or nil: Index of line where the hsl function ended - string or nil: rgb hex value + {opts} - table: Currently contains whether tailwind is enabled or not -hsla_function_parser({line}, {i}) *colorizer.color_utils.hsla_function_parser* - Parse for hsl() css function and return rgb hex. +rgb_function_parser({line}, {i}) *colorizer.color.rgb_function_parser* + Parse for rgb() css function and return rgb hex. Parameters: ~ {line} - string: Line to parse {i} - number: Index of line from where to start parsing returns:~ - number or nil: Index of line where the hsla function ended + number or nil: Index of line where the rgb function ended string or nil: rgb hex value -argb_hex_parser({line}, {i}) *colorizer.color_utils.argb_hex_parser* - parse for 0xaarrggbb and return rgb hex. +rgba_function_parser({line}, {i}) *colorizer.color.rgba_function_parser* + Parse for rgba() css function and return rgb hex. - a format used in android apps + Todo consider removing the regexes here + Todo this might not be the best approach to alpha channel. + Things like pumblend might be useful here. Parameters: ~ - {line} - string: line to parse - {i} - number: index of line from where to start parsing + {line} - string: Line to parse + {i} - number: Index of line from where to start parsing returns:~ - number or nil: index of line where the hex value ended + number or nil: Index of line where the rgba function ended string or nil: rgb hex value -rgba_hex_parser({line}, {i}, {opts}) *colorizer.color_utils.rgba_hex_parser* +rgba_hex_parser({line}, {i}, {opts}) *colorizer.color.rgba_hex_parser* parse for #rrggbbaa and return rgb hex. a format used in android apps @@ -484,20 +554,34 @@ rgba_hex_parser({line}, {i}, {opts}) *colorizer.color_utils.rgba_hex_parser* ============================================================================== -MATCHER_UTILS *colorizer.matcher_utils-introduction* +MATCHER *colorizer.matcher-introduction* Helper functions for colorizer to enable required parsers ============================================================================== -LUA API *colorizer.matcher_utils-lua-api* +LUA API *colorizer.matcher-lua-api* Functions: ~ - |make_matcher| - Parse the given options and return a function with enabled - parsers. + |compile| - Form a trie stuct with the given prefixes + + |make| - Parse the given options and return a function with enabled parsers. + + +compile({matchers}, {matchers_trie}) *colorizer.matcher.compile* + Form a trie stuct with the given prefixes + + Parameters: ~ + {matchers} - table: List of prefixes, {"rgb", "hsl"} + {matchers_trie} - table: Table containing information regarding + non-trie based parsers + + returns:~ + function: function which will just parse the line for enabled parsers + -make_matcher({options}) *colorizer.matcher_utils.make_matcher* +make({options}) *colorizer.matcher.make* Parse the given options and return a function with enabled parsers. if no parsers enabled then return false @@ -523,16 +607,16 @@ Helper functions to parse sass color variables LUA API *colorizer.sass-lua-api* Functions: ~ - |sass_cleanup| - Cleanup sass variables and watch handlers + |cleanup| - Cleanup sass variables and watch handlers - |sass_name_parser| - Parse the given line for sass color names + |name_parser| - Parse the given line for sass color names check for value in SASS[buf].DEFINITIONS_ALL - |sass_update_variables| - Parse the given lines for sass variabled and add - to SASS[buf].DEFINITIONS_ALL. + |update_variables| - Parse the given lines for sass variabled and add to + `SASS[buf].DEFINITIONS_ALL`. -sass_cleanup({buf}) *colorizer.sass.sass_cleanup* +cleanup({buf}) *colorizer.sass.cleanup* Cleanup sass variables and watch handlers Parameters: ~ @@ -540,7 +624,7 @@ sass_cleanup({buf}) *colorizer.sass.sass_cleanup* -sass_name_parser({line}, {i}, {buf}) *colorizer.sass.sass_name_parser* +name_parser({line}, {i}, {buf}) *colorizer.sass.name_parser* Parse the given line for sass color names check for value in SASS[buf].DEFINITIONS_ALL @@ -555,11 +639,11 @@ sass_name_parser({line}, {i}, {buf}) *colorizer.sass.sass_name_parser* - *colorizer.sass.sass_update_variables* -sass_update_variables({buf}, {line_start}, {line_end}, {lines}, {color_parser}, + *colorizer.sass.update_variables* +update_variables({buf}, {line_start}, {line_end}, {lines}, {color_parser}, {options}, {options_local}) Parse the given lines for sass variabled and add to - SASS[buf].DEFINITIONS_ALL. + `SASS[buf].DEFINITIONS_ALL`. which is then used in |sass_name_parser| If lines are not given, then fetch the lines with line_start and line_end @@ -586,14 +670,13 @@ Helper functions to parse tailwind color variables LUA API *colorizer.tailwind-lua-api* Functions: ~ - |tailwind_cleanup| - Cleanup tailwind variables and autocmd + |cleanup| - Cleanup tailwind variables and autocmd - |tailwind_setup_lsp_colors| - highlight buffer using values returned by - tailwindcss - To see these table information, see |colorizer.buffer_utils| + |setup_lsp_colors| - highlight buffer using values returned by tailwindcss + To see these table information, see |colorizer.buffer| -tailwind_cleanup({buf}) *colorizer.tailwind.tailwind_cleanup* +cleanup({buf}) *colorizer.tailwind.cleanup* Cleanup tailwind variables and autocmd Parameters: ~ @@ -602,10 +685,10 @@ tailwind_cleanup({buf}) *colorizer.tailwind.tailwind_cleanup* - *colorizer.tailwind.tailwind_setup_lsp_colors* -tailwind_setup_lsp_colors({buf}, {options}, {options_local}, {add_highlight}) + *colorizer.tailwind.setup_lsp_colors* +setup_lsp_colors({buf}, {options}, {options_local}, {add_highlight}) highlight buffer using values returned by tailwindcss - To see these table information, see |colorizer.buffer_utils| + To see these table information, see |colorizer.buffer| Parameters: ~ {buf} - number diff --git a/doc/index.html b/doc/index.html index 5e9f21d..827380b 100644 --- a/doc/index.html +++ b/doc/index.html @@ -32,9 +32,9 @@ <h2>Modules</h2> <ul class="nowrap"> <li><a href="modules/colorizer.html">colorizer</a></li> - <li><a href="modules/colorizer.buffer_utils.html">buffer_utils</a></li> - <li><a href="modules/colorizer.color_utils.html">color_utils</a></li> - <li><a href="modules/colorizer.matcher_utils.html">matcher_utils</a></li> + <li><a href="modules/colorizer.buffer.html">buffer</a></li> + <li><a href="modules/colorizer.color.html">color</a></li> + <li><a href="modules/colorizer.matcher.html">matcher</a></li> <li><a href="modules/colorizer.sass.html">sass</a></li> <li><a href="modules/colorizer.tailwind.html">tailwind</a></li> <li><a href="modules/colorizer.trie.html">trie</a></li> @@ -54,15 +54,15 @@ <td class="summary">Requires Neovim >= 0.6.0 and <code>set termguicolors</code></td> </tr> <tr> - <td class="name" nowrap><a href="modules/colorizer.buffer_utils.html">colorizer.buffer_utils</a></td> + <td class="name" nowrap><a href="modules/colorizer.buffer.html">colorizer.buffer</a></td> <td class="summary">Helper functions to highlight buffer smartly</td> </tr> <tr> - <td class="name" nowrap><a href="modules/colorizer.color_utils.html">colorizer.color_utils</a></td> + <td class="name" nowrap><a href="modules/colorizer.color.html">colorizer.color</a></td> <td class="summary">Helper functions to parse different colour formats</td> </tr> <tr> - <td class="name" nowrap><a href="modules/colorizer.matcher_utils.html">colorizer.matcher_utils</a></td> + <td class="name" nowrap><a href="modules/colorizer.matcher.html">colorizer.matcher</a></td> <td class="summary">Helper functions for colorizer to enable required parsers</td> </tr> <tr> diff --git a/doc/modules/colorizer.buffer_utils.html b/doc/modules/colorizer.buffer.html index 783afcc..a120996 100644 --- a/doc/modules/colorizer.buffer_utils.html +++ b/doc/modules/colorizer.buffer.html @@ -41,9 +41,9 @@ <h2>Modules</h2> <ul class="nowrap"> <li><a href="../modules/colorizer.html">colorizer</a></li> - <li><strong>buffer_utils</strong></li> - <li><a href="../modules/colorizer.color_utils.html">color_utils</a></li> - <li><a href="../modules/colorizer.matcher_utils.html">matcher_utils</a></li> + <li><strong>buffer</strong></li> + <li><a href="../modules/colorizer.color.html">color</a></li> + <li><a href="../modules/colorizer.matcher.html">matcher</a></li> <li><a href="../modules/colorizer.sass.html">sass</a></li> <li><a href="../modules/colorizer.tailwind.html">tailwind</a></li> <li><a href="../modules/colorizer.trie.html">trie</a></li> @@ -54,7 +54,7 @@ <div id="content"> -<h1>Module <code>colorizer.buffer_utils</code></h1> +<h1>Module <code>colorizer.buffer</code></h1> <p>Helper functions to highlight buffer smartly</p> <p> @@ -68,26 +68,35 @@ <td class="summary">Clean the highlight cache</td> </tr> <tr> - <td class="name" nowrap><a href="#highlight_buffer">highlight_buffer (buf, ns, lines, line_start, line_end, options, options_local)</a></td> + <td class="name" nowrap><a href="#add_highlight">add_highlight (buf, ns, line_start, line_end, data, options)</a></td> + <td class="summary">Create highlight and set highlights</td> + </tr> + <tr> + <td class="name" nowrap><a href="#highlight">highlight (buf, ns, line_start, line_end, options, options_local)</a></td> <td class="summary">Highlight the buffer region.</td> </tr> <tr> - <td class="name" nowrap><a href="#rehighlight_buffer">rehighlight_buffer (buf, options, options_local, use_local_lines)</a></td> + <td class="name" nowrap><a href="#parse_lines">parse_lines (buf, lines, line_start, options)</a></td> + <td class="summary">Parse the given lines for colors and return a table containing + rgb_hex and range per line</td> + </tr> + <tr> + <td class="name" nowrap><a href="#rehighlight">rehighlight (buf, options, options_local, use_local_lines)</a></td> <td class="summary">Rehighlight the buffer if colorizer is active</td> </tr> </table> <h2><a href="#Tables">Tables</a></h2> <table class="function_list"> <tr> - <td class="name" nowrap><a href="#HIGHLIGHT_MODE_NAMES">HIGHLIGHT_MODE_NAMES</a></td> + <td class="name" nowrap><a href="#highlight_mode_names">highlight_mode_names</a></td> <td class="summary">Highlight mode which will be use to render the colour</td> </tr> </table> <h2><a href="#Fields">Fields</a></h2> <table class="function_list"> <tr> - <td class="name" nowrap><a href="#DEFAULT_NAMESPACE">DEFAULT_NAMESPACE</a></td> - <td class="summary">Default namespace used in <a href="../modules/colorizer.buffer_utils.html#highlight_buffer">highlight_buffer</a> and <a href="../modules/colorizer.html#attach_to_buffer">colorizer.attach_to_buffer</a>.</td> + <td class="name" nowrap><a href="#default_namespace">default_namespace</a></td> + <td class="summary">Default namespace used in <a href="../modules/colorizer.buffer.html#highlight">highlight</a> and <a href="../modules/colorizer.html#attach_to_buffer">colorizer.attach_to_buffer</a>.</td> </tr> </table> @@ -113,8 +122,43 @@ </dd> <dt> - <a name = "highlight_buffer"></a> - <strong>highlight_buffer (buf, ns, lines, line_start, line_end, options, options_local)</strong> + <a name = "add_highlight"></a> + <strong>add_highlight (buf, ns, line_start, line_end, data, options)</strong> + </dt> + <dd> + Create highlight and set highlights + + + <h3>Parameters:</h3> + <ul> + <li><span class="parameter">buf</span> + number + </li> + <li><span class="parameter">ns</span> + number + </li> + <li><span class="parameter">line_start</span> + number + </li> + <li><span class="parameter">line_end</span> + number + </li> + <li><span class="parameter">data</span> + table: table output of <a href="../modules/colorizer.buffer.html#parse_lines">parse_lines</a> + </li> + <li><span class="parameter">options</span> + table: Passed in setup, mainly for <code>user_default_options</code> + </li> + </ul> + + + + + +</dd> + <dt> + <a name = "highlight"></a> + <strong>highlight (buf, ns, line_start, line_end, options, options_local)</strong> </dt> <dd> Highlight the buffer region. @@ -128,10 +172,7 @@ number: buffer id </li> <li><span class="parameter">ns</span> - number: The namespace id. Default is DEFAULT_NAMESPACE. Create it with <code>vim.api.create_namespace</code> - </li> - <li><span class="parameter">lines</span> - table: the lines to highlight from the buffer. + number: The namespace id. Default is DEFAULT_NAMESPACE. Create it with <code>vim.api.nvim_create_namespace</code> </li> <li><span class="parameter">line_start</span> number: line_start should be 0-indexed @@ -158,8 +199,43 @@ </dd> <dt> - <a name = "rehighlight_buffer"></a> - <strong>rehighlight_buffer (buf, options, options_local, use_local_lines)</strong> + <a name = "parse_lines"></a> + <strong>parse_lines (buf, lines, line_start, options)</strong> + </dt> + <dd> + Parse the given lines for colors and return a table containing + rgb_hex and range per line + + + <h3>Parameters:</h3> + <ul> + <li><span class="parameter">buf</span> + number + </li> + <li><span class="parameter">lines</span> + table + </li> + <li><span class="parameter">line_start</span> + number: This is the buffer line number, from where to start highlighting + </li> + <li><span class="parameter">options</span> + table: Passed in <a href="../modules/colorizer.html#setup">colorizer.setup</a>, Only uses <code>user_default_options</code> + </li> + </ul> + + <h3>Returns:</h3> + <ol> + + table|nil + </ol> + + + + +</dd> + <dt> + <a name = "rehighlight"></a> + <strong>rehighlight (buf, options, options_local, use_local_lines)</strong> </dt> <dd> Rehighlight the buffer if colorizer is active @@ -196,8 +272,8 @@ <dl class="function"> <dt> - <a name = "HIGHLIGHT_MODE_NAMES"></a> - <strong>HIGHLIGHT_MODE_NAMES</strong> + <a name = "highlight_mode_names"></a> + <strong>highlight_mode_names</strong> </dt> <dd> Highlight mode which will be use to render the colour @@ -232,11 +308,11 @@ <dl class="function"> <dt> - <a name = "DEFAULT_NAMESPACE"></a> - <strong>DEFAULT_NAMESPACE</strong> + <a name = "default_namespace"></a> + <strong>default_namespace</strong> </dt> <dd> - Default namespace used in <a href="../modules/colorizer.buffer_utils.html#highlight_buffer">highlight_buffer</a> and <a href="../modules/colorizer.html#attach_to_buffer">colorizer.attach_to_buffer</a>. + Default namespace used in <a href="../modules/colorizer.buffer.html#highlight">highlight</a> and <a href="../modules/colorizer.html#attach_to_buffer">colorizer.attach_to_buffer</a>. @@ -244,7 +320,7 @@ <h3>See also:</h3> <ul> - <li><a href="../modules/colorizer.buffer_utils.html#highlight_buffer">highlight_buffer</a></li> + <li><a href="../modules/colorizer.buffer.html#highlight">highlight</a></li> <li><a href="../modules/colorizer.html#attach_to_buffer">colorizer.attach_to_buffer</a></li> </ul> diff --git a/doc/modules/colorizer.color_utils.html b/doc/modules/colorizer.color.html index 0ac39db..b36a8aa 100644 --- a/doc/modules/colorizer.color_utils.html +++ b/doc/modules/colorizer.color.html @@ -39,9 +39,9 @@ <h2>Modules</h2> <ul class="nowrap"> <li><a href="../modules/colorizer.html">colorizer</a></li> - <li><a href="../modules/colorizer.buffer_utils.html">buffer_utils</a></li> - <li><strong>color_utils</strong></li> - <li><a href="../modules/colorizer.matcher_utils.html">matcher_utils</a></li> + <li><a href="../modules/colorizer.buffer.html">buffer</a></li> + <li><strong>color</strong></li> + <li><a href="../modules/colorizer.matcher.html">matcher</a></li> <li><a href="../modules/colorizer.sass.html">sass</a></li> <li><a href="../modules/colorizer.tailwind.html">tailwind</a></li> <li><a href="../modules/colorizer.trie.html">trie</a></li> @@ -52,7 +52,7 @@ <div id="content"> -<h1>Module <code>colorizer.color_utils</code></h1> +<h1>Module <code>colorizer.color</code></h1> <p>Helper functions to parse different colour formats</p> <p> @@ -62,20 +62,12 @@ <h2><a href="#Functions">Functions</a></h2> <table class="function_list"> <tr> - <td class="name" nowrap><a href="#color_is_bright">color_is_bright (r, g, b)</a></td> - <td class="summary">Determine whether to use black or white text.</td> - </tr> - <tr> - <td class="name" nowrap><a href="#color_name_parser">color_name_parser (line, i, opts)</a></td> - <td class="summary">Grab all the colour values from <code>vim.api.nvim_get_color_map</code> and create a lookup table.</td> - </tr> - <tr> - <td class="name" nowrap><a href="#rgb_function_parser">rgb_function_parser (line, i)</a></td> - <td class="summary">Parse for rgb() css function and return rgb hex.</td> + <td class="name" nowrap><a href="#argb_hex_parser">argb_hex_parser (line, i)</a></td> + <td class="summary">parse for 0xaarrggbb and return rgb hex.</td> </tr> <tr> - <td class="name" nowrap><a href="#rgba_function_parser">rgba_function_parser (line, i)</a></td> - <td class="summary">Parse for rgba() css function and return rgb hex.</td> + <td class="name" nowrap><a href="#hsl_to_rgb">hsl_to_rgb (h, s, l)</a></td> + <td class="summary">Converts an HSL color value to RGB.</td> </tr> <tr> <td class="name" nowrap><a href="#hsl_function_parser">hsl_function_parser (line, i)</a></td> @@ -86,8 +78,24 @@ <td class="summary">Parse for hsl() css function and return rgb hex.</td> </tr> <tr> - <td class="name" nowrap><a href="#argb_hex_parser">argb_hex_parser (line, i)</a></td> - <td class="summary">parse for 0xaarrggbb and return rgb hex.</td> + <td class="name" nowrap><a href="#hue_to_rgb">hue_to_rgb (p, q, t)</a></td> + <td class="summary">Convert hsl colour values to rgb.</td> + </tr> + <tr> + <td class="name" nowrap><a href="#is_bright">is_bright (r, g, b)</a></td> + <td class="summary">Determine whether to use black or white text.</td> + </tr> + <tr> + <td class="name" nowrap><a href="#name_parser">name_parser (line, i, opts)</a></td> + <td class="summary">Grab all the colour values from <code>vim.api.nvim_get_color_map</code> and create a lookup table.</td> + </tr> + <tr> + <td class="name" nowrap><a href="#rgb_function_parser">rgb_function_parser (line, i)</a></td> + <td class="summary">Parse for rgb() css function and return rgb hex.</td> + </tr> + <tr> + <td class="name" nowrap><a href="#rgba_function_parser">rgba_function_parser (line, i)</a></td> + <td class="summary">Parse for rgba() css function and return rgb hex.</td> </tr> <tr> <td class="name" nowrap><a href="#rgba_hex_parser">rgba_hex_parser (line, i, opts)</a></td> @@ -103,67 +111,73 @@ <dl class="function"> <dt> - <a name = "color_is_bright"></a> - <strong>color_is_bright (r, g, b)</strong> + <a name = "argb_hex_parser"></a> + <strong>argb_hex_parser (line, i)</strong> </dt> <dd> - Determine whether to use black or white text. </p> - -<p> ref: https://stackoverflow.com/a/1855903/837964 - https://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color + parse for 0xaarrggbb and return rgb hex. + a format used in android apps <h3>Parameters:</h3> <ul> - <li><span class="parameter">r</span> - number: Red - </li> - <li><span class="parameter">g</span> - number: Green + <li><span class="parameter">line</span> + string: line to parse </li> - <li><span class="parameter">b</span> - number: Blue + <li><span class="parameter">i</span> + number: index of line from where to start parsing </li> </ul> + <h3>Returns:</h3> + <ol> + <li> + number|nil: index of line where the hex value ended</li> + <li> + string|nil: rgb hex value</li> + </ol> </dd> <dt> - <a name = "color_name_parser"></a> - <strong>color_name_parser (line, i, opts)</strong> + <a name = "hsl_to_rgb"></a> + <strong>hsl_to_rgb (h, s, l)</strong> </dt> <dd> - Grab all the colour values from <code>vim.api.nvim_get_color_map</code> and create a lookup table. - COLOR_MAP is used to store the colour values + Converts an HSL color value to RGB. <h3>Parameters:</h3> <ul> - <li><span class="parameter">line</span> - string: Line to parse + <li><span class="parameter">h</span> + number: Hue </li> - <li><span class="parameter">i</span> - number: Index of line from where to start parsing + <li><span class="parameter">s</span> + number: Saturation </li> - <li><span class="parameter">opts</span> - table: Currently contains whether tailwind is enabled or not + <li><span class="parameter">l</span> + number: Lightness </li> </ul> + <h3>Returns:</h3> + <ol> + + number|nil,number|nil,number|nil + </ol> </dd> <dt> - <a name = "rgb_function_parser"></a> - <strong>rgb_function_parser (line, i)</strong> + <a name = "hsl_function_parser"></a> + <strong>hsl_function_parser (line, i)</strong> </dt> <dd> - Parse for rgb() css function and return rgb hex. + Parse for hsl() css function and return rgb hex. <h3>Parameters:</h3> @@ -179,7 +193,7 @@ <h3>Returns:</h3> <ol> <li> - number|nil: Index of line where the rgb function ended</li> + number|nil: Index of line where the hsl function ended</li> <li> string|nil: rgb hex value</li> </ol> @@ -189,14 +203,11 @@ </dd> <dt> - <a name = "rgba_function_parser"></a> - <strong>rgba_function_parser (line, i)</strong> + <a name = "hsla_function_parser"></a> + <strong>hsla_function_parser (line, i)</strong> </dt> <dd> - Parse for rgba() css function and return rgb hex. - Todo consider removing the regexes here - Todo this might not be the best approach to alpha channel. - Things like pumblend might be useful here. + Parse for hsl() css function and return rgb hex. <h3>Parameters:</h3> @@ -212,7 +223,7 @@ <h3>Returns:</h3> <ol> <li> - number|nil: Index of line where the rgba function ended</li> + number|nil: Index of line where the hsla function ended</li> <li> string|nil: rgb hex value</li> </ol> @@ -222,11 +233,73 @@ </dd> <dt> - <a name = "hsl_function_parser"></a> - <strong>hsl_function_parser (line, i)</strong> + <a name = "hue_to_rgb"></a> + <strong>hue_to_rgb (p, q, t)</strong> </dt> <dd> - Parse for hsl() css function and return rgb hex. + Convert hsl colour values to rgb. + Source: https://gist.github.com/mjackson/5311256 + + + <h3>Parameters:</h3> + <ul> + <li><span class="parameter">p</span> + number + </li> + <li><span class="parameter">q</span> + number + </li> + <li><span class="parameter">t</span> + number + </li> + </ul> + + <h3>Returns:</h3> + <ol> + + number + </ol> + + + + +</dd> + <dt> + <a name = "is_bright"></a> + <strong>is_bright (r, g, b)</strong> + </dt> + <dd> + Determine whether to use black or white text. </p> + +<p> ref: https://stackoverflow.com/a/1855903/837964 + https://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color + + + <h3>Parameters:</h3> + <ul> + <li><span class="parameter">r</span> + number: Red + </li> + <li><span class="parameter">g</span> + number: Green + </li> + <li><span class="parameter">b</span> + number: Blue + </li> + </ul> + + + + + +</dd> + <dt> + <a name = "name_parser"></a> + <strong>name_parser (line, i, opts)</strong> + </dt> + <dd> + Grab all the colour values from <code>vim.api.nvim_get_color_map</code> and create a lookup table. + COLOR_MAP is used to store the colour values <h3>Parameters:</h3> @@ -237,26 +310,22 @@ <li><span class="parameter">i</span> number: Index of line from where to start parsing </li> + <li><span class="parameter">opts</span> + table: Currently contains whether tailwind is enabled or not + </li> </ul> - <h3>Returns:</h3> - <ol> - <li> - number|nil: Index of line where the hsl function ended</li> - <li> - string|nil: rgb hex value</li> - </ol> </dd> <dt> - <a name = "hsla_function_parser"></a> - <strong>hsla_function_parser (line, i)</strong> + <a name = "rgb_function_parser"></a> + <strong>rgb_function_parser (line, i)</strong> </dt> <dd> - Parse for hsl() css function and return rgb hex. + Parse for rgb() css function and return rgb hex. <h3>Parameters:</h3> @@ -272,7 +341,7 @@ <h3>Returns:</h3> <ol> <li> - number|nil: Index of line where the hsla function ended</li> + number|nil: Index of line where the rgb function ended</li> <li> string|nil: rgb hex value</li> </ol> @@ -282,28 +351,30 @@ </dd> <dt> - <a name = "argb_hex_parser"></a> - <strong>argb_hex_parser (line, i)</strong> + <a name = "rgba_function_parser"></a> + <strong>rgba_function_parser (line, i)</strong> </dt> <dd> - parse for 0xaarrggbb and return rgb hex. - a format used in android apps + Parse for rgba() css function and return rgb hex. + Todo consider removing the regexes here + Todo this might not be the best approach to alpha channel. + Things like pumblend might be useful here. <h3>Parameters:</h3> <ul> <li><span class="parameter">line</span> - string: line to parse + string: Line to parse </li> <li><span class="parameter">i</span> - number: index of line from where to start parsing + number: Index of line from where to start parsing </li> </ul> <h3>Returns:</h3> <ol> <li> - number|nil: index of line where the hex value ended</li> + number|nil: Index of line where the rgba function ended</li> <li> string|nil: rgb hex value</li> </ol> diff --git a/doc/modules/colorizer.html b/doc/modules/colorizer.html index df8879c..e0b8bc8 100644 --- a/doc/modules/colorizer.html +++ b/doc/modules/colorizer.html @@ -41,9 +41,9 @@ <h2>Modules</h2> <ul class="nowrap"> <li><strong>colorizer</strong></li> - <li><a href="../modules/colorizer.buffer_utils.html">buffer_utils</a></li> - <li><a href="../modules/colorizer.color_utils.html">color_utils</a></li> - <li><a href="../modules/colorizer.matcher_utils.html">matcher_utils</a></li> + <li><a href="../modules/colorizer.buffer.html">buffer</a></li> + <li><a href="../modules/colorizer.color.html">color</a></li> + <li><a href="../modules/colorizer.matcher.html">matcher</a></li> <li><a href="../modules/colorizer.sass.html">sass</a></li> <li><a href="../modules/colorizer.tailwind.html">tailwind</a></li> <li><a href="../modules/colorizer.trie.html">trie</a></li> @@ -169,7 +169,7 @@ USE WITH LUA <table class="function_list"> <tr> <td class="name" nowrap><a href="#DEFAULT_NAMESPACE">DEFAULT_NAMESPACE</a></td> - <td class="summary">Default namespace used in <a href="../modules/colorizer.buffer_utils.html#highlight_buffer">colorizer.buffer_utils.highlight_buffer</a> and <a href="../modules/colorizer.html#attach_to_buffer">attach_to_buffer</a>.</td> + <td class="summary">Default namespace used in <a href="../modules/colorizer.buffer.html#highlight">colorizer.buffer.highlight</a> and <a href="../modules/colorizer.html#attach_to_buffer">attach_to_buffer</a>.</td> </tr> </table> @@ -193,7 +193,7 @@ USE WITH LUA <h3>See also:</h3> <ul> - <a href="../modules/colorizer.buffer_utils.html#highlight_buffer">colorizer.buffer_utils.highlight_buffer</a> + <a href="../modules/colorizer.buffer.html#highlight">colorizer.buffer.highlight</a> </ul> @@ -222,7 +222,7 @@ USE WITH LUA <h3>See also:</h3> <ul> - <a href="../modules/colorizer.html#highlight_buffer">highlight_buffer</a> + <a href="../modules/colorizer.buffer.html#highlight">colorizer.buffer.highlight</a> </ul> @@ -469,7 +469,7 @@ Setup an autocmd which enables colorizing for the filetypes and options specifie <strong>DEFAULT_NAMESPACE</strong> </dt> <dd> - Default namespace used in <a href="../modules/colorizer.buffer_utils.html#highlight_buffer">colorizer.buffer_utils.highlight_buffer</a> and <a href="../modules/colorizer.html#attach_to_buffer">attach_to_buffer</a>. + Default namespace used in <a href="../modules/colorizer.buffer.html#highlight">colorizer.buffer.highlight</a> and <a href="../modules/colorizer.html#attach_to_buffer">attach_to_buffer</a>. @@ -477,7 +477,7 @@ Setup an autocmd which enables colorizing for the filetypes and options specifie <h3>See also:</h3> <ul> - <li><a href="../modules/colorizer.buffer_utils.html#highlight_buffer">colorizer.buffer_utils.highlight_buffer</a></li> + <li><a href="../modules/colorizer.buffer.html#highlight">colorizer.buffer.highlight</a></li> <li><a href="../modules/colorizer.html#attach_to_buffer">attach_to_buffer</a></li> </ul> diff --git a/doc/modules/colorizer.matcher_utils.html b/doc/modules/colorizer.matcher.html index 569884f..9b2b67e 100644 --- a/doc/modules/colorizer.matcher_utils.html +++ b/doc/modules/colorizer.matcher.html @@ -39,9 +39,9 @@ <h2>Modules</h2> <ul class="nowrap"> <li><a href="../modules/colorizer.html">colorizer</a></li> - <li><a href="../modules/colorizer.buffer_utils.html">buffer_utils</a></li> - <li><a href="../modules/colorizer.color_utils.html">color_utils</a></li> - <li><strong>matcher_utils</strong></li> + <li><a href="../modules/colorizer.buffer.html">buffer</a></li> + <li><a href="../modules/colorizer.color.html">color</a></li> + <li><strong>matcher</strong></li> <li><a href="../modules/colorizer.sass.html">sass</a></li> <li><a href="../modules/colorizer.tailwind.html">tailwind</a></li> <li><a href="../modules/colorizer.trie.html">trie</a></li> @@ -52,7 +52,7 @@ <div id="content"> -<h1>Module <code>colorizer.matcher_utils</code></h1> +<h1>Module <code>colorizer.matcher</code></h1> <p>Helper functions for colorizer to enable required parsers</p> <p> @@ -62,7 +62,11 @@ <h2><a href="#Functions">Functions</a></h2> <table class="function_list"> <tr> - <td class="name" nowrap><a href="#make_matcher">make_matcher (options)</a></td> + <td class="name" nowrap><a href="#compile">compile (matchers, matchers_trie)</a></td> + <td class="summary">Form a trie stuct with the given prefixes</td> + </tr> + <tr> + <td class="name" nowrap><a href="#make">make (options)</a></td> <td class="summary">Parse the given options and return a function with enabled parsers.</td> </tr> </table> @@ -75,8 +79,36 @@ <dl class="function"> <dt> - <a name = "make_matcher"></a> - <strong>make_matcher (options)</strong> + <a name = "compile"></a> + <strong>compile (matchers, matchers_trie)</strong> + </dt> + <dd> + Form a trie stuct with the given prefixes + + + <h3>Parameters:</h3> + <ul> + <li><span class="parameter">matchers</span> + table: List of prefixes, {"rgb", "hsl"} + </li> + <li><span class="parameter">matchers_trie</span> + table: Table containing information regarding non-trie based parsers + </li> + </ul> + + <h3>Returns:</h3> + <ol> + + function: function which will just parse the line for enabled parsers + </ol> + + + + +</dd> + <dt> + <a name = "make"></a> + <strong>make (options)</strong> </dt> <dd> Parse the given options and return a function with enabled parsers. diff --git a/doc/modules/colorizer.sass.html b/doc/modules/colorizer.sass.html index 1abd56d..56c8c63 100644 --- a/doc/modules/colorizer.sass.html +++ b/doc/modules/colorizer.sass.html @@ -39,9 +39,9 @@ <h2>Modules</h2> <ul class="nowrap"> <li><a href="../modules/colorizer.html">colorizer</a></li> - <li><a href="../modules/colorizer.buffer_utils.html">buffer_utils</a></li> - <li><a href="../modules/colorizer.color_utils.html">color_utils</a></li> - <li><a href="../modules/colorizer.matcher_utils.html">matcher_utils</a></li> + <li><a href="../modules/colorizer.buffer.html">buffer</a></li> + <li><a href="../modules/colorizer.color.html">color</a></li> + <li><a href="../modules/colorizer.matcher.html">matcher</a></li> <li><strong>sass</strong></li> <li><a href="../modules/colorizer.tailwind.html">tailwind</a></li> <li><a href="../modules/colorizer.trie.html">trie</a></li> @@ -62,17 +62,17 @@ <h2><a href="#Functions">Functions</a></h2> <table class="function_list"> <tr> - <td class="name" nowrap><a href="#sass_cleanup">sass_cleanup (buf)</a></td> + <td class="name" nowrap><a href="#cleanup">cleanup (buf)</a></td> <td class="summary">Cleanup sass variables and watch handlers</td> </tr> <tr> - <td class="name" nowrap><a href="#sass_name_parser">sass_name_parser (line, i, buf)</a></td> + <td class="name" nowrap><a href="#name_parser">name_parser (line, i, buf)</a></td> <td class="summary">Parse the given line for sass color names check for value in SASS[buf].DEFINITIONS_ALL</td> </tr> <tr> - <td class="name" nowrap><a href="#sass_update_variables">sass_update_variables (buf, line_start, line_end, lines, color_parser, options, options_local)</a></td> - <td class="summary">Parse the given lines for sass variabled and add to SASS[buf].DEFINITIONS_ALL.</td> + <td class="name" nowrap><a href="#update_variables">update_variables (buf, line_start, line_end, lines, color_parser, options, options_local)</a></td> + <td class="summary">Parse the given lines for sass variabled and add to <code>SASS[buf].DEFINITIONS_ALL</code>.</td> </tr> </table> @@ -84,8 +84,8 @@ <dl class="function"> <dt> - <a name = "sass_cleanup"></a> - <strong>sass_cleanup (buf)</strong> + <a name = "cleanup"></a> + <strong>cleanup (buf)</strong> </dt> <dd> Cleanup sass variables and watch handlers @@ -104,8 +104,8 @@ </dd> <dt> - <a name = "sass_name_parser"></a> - <strong>sass_name_parser (line, i, buf)</strong> + <a name = "name_parser"></a> + <strong>name_parser (line, i, buf)</strong> </dt> <dd> Parse the given line for sass color names @@ -136,13 +136,13 @@ </dd> <dt> - <a name = "sass_update_variables"></a> - <strong>sass_update_variables (buf, line_start, line_end, lines, color_parser, options, options_local)</strong> + <a name = "update_variables"></a> + <strong>update_variables (buf, line_start, line_end, lines, color_parser, options, options_local)</strong> </dt> <dd> - Parse the given lines for sass variabled and add to SASS[buf].DEFINITIONS<em>ALL. - which is then used in |sass</em>name<em>parser| - If lines are not given, then fetch the lines with line</em>start and line_end + Parse the given lines for sass variabled and add to <code>SASS[buf].DEFINITIONS_ALL</code>. + which is then used in |sass<em>name</em>parser| + If lines are not given, then fetch the lines with line<em>start and line</em>end <h3>Parameters:</h3> diff --git a/doc/modules/colorizer.tailwind.html b/doc/modules/colorizer.tailwind.html index ae4d64b..09e17ce 100644 --- a/doc/modules/colorizer.tailwind.html +++ b/doc/modules/colorizer.tailwind.html @@ -39,9 +39,9 @@ <h2>Modules</h2> <ul class="nowrap"> <li><a href="../modules/colorizer.html">colorizer</a></li> - <li><a href="../modules/colorizer.buffer_utils.html">buffer_utils</a></li> - <li><a href="../modules/colorizer.color_utils.html">color_utils</a></li> - <li><a href="../modules/colorizer.matcher_utils.html">matcher_utils</a></li> + <li><a href="../modules/colorizer.buffer.html">buffer</a></li> + <li><a href="../modules/colorizer.color.html">color</a></li> + <li><a href="../modules/colorizer.matcher.html">matcher</a></li> <li><a href="../modules/colorizer.sass.html">sass</a></li> <li><strong>tailwind</strong></li> <li><a href="../modules/colorizer.trie.html">trie</a></li> @@ -62,13 +62,13 @@ <h2><a href="#Functions">Functions</a></h2> <table class="function_list"> <tr> - <td class="name" nowrap><a href="#tailwind_cleanup">tailwind_cleanup (buf)</a></td> + <td class="name" nowrap><a href="#cleanup">cleanup (buf)</a></td> <td class="summary">Cleanup tailwind variables and autocmd</td> </tr> <tr> - <td class="name" nowrap><a href="#tailwind_setup_lsp_colors">tailwind_setup_lsp_colors (buf, options, options_local, add_highlight)</a></td> + <td class="name" nowrap><a href="#setup_lsp_colors">setup_lsp_colors (buf, options, options_local, add_highlight)</a></td> <td class="summary">highlight buffer using values returned by tailwindcss - To see these table information, see |colorizer.buffer_utils|</td> + To see these table information, see |colorizer.buffer|</td> </tr> </table> @@ -80,8 +80,8 @@ <dl class="function"> <dt> - <a name = "tailwind_cleanup"></a> - <strong>tailwind_cleanup (buf)</strong> + <a name = "cleanup"></a> + <strong>cleanup (buf)</strong> </dt> <dd> Cleanup tailwind variables and autocmd @@ -100,12 +100,12 @@ </dd> <dt> - <a name = "tailwind_setup_lsp_colors"></a> - <strong>tailwind_setup_lsp_colors (buf, options, options_local, add_highlight)</strong> + <a name = "setup_lsp_colors"></a> + <strong>setup_lsp_colors (buf, options, options_local, add_highlight)</strong> </dt> <dd> highlight buffer using values returned by tailwindcss - To see these table information, see |colorizer.buffer_utils| + To see these table information, see |colorizer.buffer| <h3>Parameters:</h3> diff --git a/doc/modules/colorizer.trie.html b/doc/modules/colorizer.trie.html index c9433fc..cc64359 100644 --- a/doc/modules/colorizer.trie.html +++ b/doc/modules/colorizer.trie.html @@ -35,9 +35,9 @@ <h2>Modules</h2> <ul class="nowrap"> <li><a href="../modules/colorizer.html">colorizer</a></li> - <li><a href="../modules/colorizer.buffer_utils.html">buffer_utils</a></li> - <li><a href="../modules/colorizer.color_utils.html">color_utils</a></li> - <li><a href="../modules/colorizer.matcher_utils.html">matcher_utils</a></li> + <li><a href="../modules/colorizer.buffer.html">buffer</a></li> + <li><a href="../modules/colorizer.color.html">color</a></li> + <li><a href="../modules/colorizer.matcher.html">matcher</a></li> <li><a href="../modules/colorizer.sass.html">sass</a></li> <li><a href="../modules/colorizer.tailwind.html">tailwind</a></li> <li><strong>trie</strong></li> diff --git a/doc/modules/utils.html b/doc/modules/utils.html index 9170c4e..ecb555b 100644 --- a/doc/modules/utils.html +++ b/doc/modules/utils.html @@ -39,9 +39,9 @@ <h2>Modules</h2> <ul class="nowrap"> <li><a href="../modules/colorizer.html">colorizer</a></li> - <li><a href="../modules/colorizer.buffer_utils.html">buffer_utils</a></li> - <li><a href="../modules/colorizer.color_utils.html">color_utils</a></li> - <li><a href="../modules/colorizer.matcher_utils.html">matcher_utils</a></li> + <li><a href="../modules/colorizer.buffer.html">buffer</a></li> + <li><a href="../modules/colorizer.color.html">color</a></li> + <li><a href="../modules/colorizer.matcher.html">matcher</a></li> <li><a href="../modules/colorizer.sass.html">sass</a></li> <li><a href="../modules/colorizer.tailwind.html">tailwind</a></li> <li><a href="../modules/colorizer.trie.html">trie</a></li> @@ -70,6 +70,10 @@ <td class="summary">Obvious.</td> </tr> <tr> + <td class="name" nowrap><a href="#get_last_modified">get_last_modified (path)</a></td> + <td class="summary">Get last modified time of a file</td> + </tr> + <tr> <td class="name" nowrap><a href="#merge">merge (...)</a></td> <td class="summary">Merge two tables.</td> </tr> @@ -82,10 +86,6 @@ <td class="summary">Obvious.</td> </tr> <tr> - <td class="name" nowrap><a href="#get_last_modified">get_last_modified (path)</a></td> - <td class="summary">Get last modified time of a file</td> - </tr> - <tr> <td class="name" nowrap><a href="#watch_file">watch_file (path, callback, ...)</a></td> <td class="summary">Watch a file for changes and execute callback</td> </tr> @@ -149,6 +149,31 @@ </dd> <dt> + <a name = "get_last_modified"></a> + <strong>get_last_modified (path)</strong> + </dt> + <dd> + Get last modified time of a file + + + <h3>Parameters:</h3> + <ul> + <li><span class="parameter">path</span> + string: file path + </li> + </ul> + + <h3>Returns:</h3> + <ol> + + number|nil: modified time + </ol> + + + + +</dd> + <dt> <a name = "merge"></a> <strong>merge (...)</strong> </dt> @@ -228,31 +253,6 @@ </dd> <dt> - <a name = "get_last_modified"></a> - <strong>get_last_modified (path)</strong> - </dt> - <dd> - Get last modified time of a file - - - <h3>Parameters:</h3> - <ul> - <li><span class="parameter">path</span> - string: file path - </li> - </ul> - - <h3>Returns:</h3> - <ol> - - number|nil: modified time - </ol> - - - - -</dd> - <dt> <a name = "watch_file"></a> <strong>watch_file (path, callback, ...)</strong> </dt> |