aboutsummaryrefslogtreecommitdiff
path: root/doc/modules
diff options
context:
space:
mode:
authorAkianonymus <anonymus.aki@gmail.com>2022-09-15 10:00:00 +0530
committerAkianonymus <anonymus.aki@gmail.com>2022-09-15 13:51:38 +0530
commitcf4f33f5ea34f9c4e9975299b094f1a2b8b34aa0 (patch)
tree3f2558419b2643ac7af8f4abe8e67db478d64309 /doc/modules
parentfix(gitignore) Add doc/tags to .gitignore (diff)
Better structure and naming | Misc improvements
Diffstat (limited to 'doc/modules')
-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.html16
-rw-r--r--doc/modules/colorizer.matcher.html (renamed from doc/modules/colorizer.matcher_utils.html)46
-rw-r--r--doc/modules/colorizer.sass.html32
-rw-r--r--doc/modules/colorizer.tailwind.html22
-rw-r--r--doc/modules/colorizer.trie.html6
-rw-r--r--doc/modules/utils.html64
8 files changed, 352 insertions, 173 deletions
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>