From cf4f33f5ea34f9c4e9975299b094f1a2b8b34aa0 Mon Sep 17 00:00:00 2001 From: Akianonymus Date: Thu, 15 Sep 2022 10:00:00 +0530 Subject: Better structure and naming | Misc improvements --- doc/modules/colorizer.buffer.html | 340 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 340 insertions(+) create mode 100644 doc/modules/colorizer.buffer.html (limited to 'doc/modules/colorizer.buffer.html') diff --git a/doc/modules/colorizer.buffer.html b/doc/modules/colorizer.buffer.html new file mode 100644 index 0000000..a120996 --- /dev/null +++ b/doc/modules/colorizer.buffer.html @@ -0,0 +1,340 @@ + + + + + colorizer Docs + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module colorizer.buffer

+

Helper functions to highlight buffer smartly

+

+ +

+ + +

Functions

+ + + + + + + + + + + + + + + + + + + + + +
clear_hl_cache ()Clean the highlight cache
add_highlight (buf, ns, line_start, line_end, data, options)Create highlight and set highlights
highlight (buf, ns, line_start, line_end, options, options_local)Highlight the buffer region.
parse_lines (buf, lines, line_start, options)Parse the given lines for colors and return a table containing + rgb_hex and range per line
rehighlight (buf, options, options_local, use_local_lines)Rehighlight the buffer if colorizer is active
+

Tables

+ + + + + +
highlight_mode_namesHighlight mode which will be use to render the colour
+

Fields

+ + + + + +
default_namespaceDefault namespace used in highlight and colorizer.attach_to_buffer.
+ +
+
+ + +

Functions

+ +
+
+ + clear_hl_cache () +
+
+ Clean the highlight cache + + + + + + + +
+
+ + 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 +
  • +
+ + + + + +
+
+ + 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 lines in the + buffer buf and attach it to the namespace ns. + + +

Parameters:

+
    +
  • buf + number: buffer id +
  • +
  • ns + number: The namespace id. Default is DEFAULT_NAMESPACE. Create 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 +
  • +
  • options_local + table: Buffer local variables +
  • +
+ +

Returns:

+
    + + nil|boolean|number,table +
+ + + + +
+
+ + 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|nil +
+ + + + +
+
+ + rehighlight (buf, options, options_local, use_local_lines) +
+
+ Rehighlight the buffer if colorizer is active + + +

Parameters:

+
    +
  • buf + number: Buffer number +
  • +
  • options + table: Buffer options +
  • +
  • options_local + table|nil: Buffer local variables +
  • +
  • use_local_lines + boolean|nil Whether to use lines num range from options_local +
  • +
+ +

Returns:

+
    + + nil|boolean|number,table +
+ + + + +
+
+

Tables

+ +
+
+ + highlight_mode_names +
+
+ Highlight mode which will be use to render the colour + + +

Fields:

+
    +
  • background + + + +
  • +
  • foreground + + + +
  • +
  • virtualtext + + + +
  • +
+ + + + + +
+
+

Fields

+ +
+
+ + default_namespace +
+
+ Default namespace used in highlight and colorizer.attach_to_buffer. + + + + + +

See also:

+ + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated - September +
+
+ + -- cgit v1.2.3-70-g09d2