From 94197db4be1c82ddfb67dafa576e9bc7e77e657e Mon Sep 17 00:00:00 2001 From: Ashkan Kiani Date: Thu, 17 Oct 2019 16:26:20 -0700 Subject: Add readme, docs, rgb(), #RGB, and options - Add support for `rgb(...)` functions behind an option gate. - Highlight #RGB codes. - Add options, like `rgb_fn` and `no_names` - Add luadoc. --- doc/modules/colorizer.html | 237 +++++++++++++++++++++++++++++++++++++++++++++ doc/modules/trie.html | 66 +++++++++++++ 2 files changed, 303 insertions(+) create mode 100644 doc/modules/colorizer.html create mode 100644 doc/modules/trie.html (limited to 'doc/modules') diff --git a/doc/modules/colorizer.html b/doc/modules/colorizer.html new file mode 100644 index 0000000..adce131 --- /dev/null +++ b/doc/modules/colorizer.html @@ -0,0 +1,237 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module colorizer

+

Highlights terminal CSI ANSI color codes.

+

+ + +

Functions

+ + + + + + + + + + + + + +
highlight_buffer (buf[, ns=DEFAULT_NAMESPACE], lines, line_start[, options])Highlight the buffer region.
attach_to_buffer ([buf=0[, options]])Attach to a buffer and continuously highlight changes.
setup ([filetypes={'*'}[, default_options]])Easy to use function if you want the full setup without fine grained control.
+

Fields

+ + + + + +
DEFAULT_NAMESPACEDefault namespace used in `highlight_buffer` and `attach_to_buffer`.
+ +
+
+ + +

Functions

+ +
+
+ + highlight_buffer (buf[, ns=DEFAULT_NAMESPACE], lines, line_start[, options]) +
+
+ 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 + integer + buffer id. +
  • +
  • ns + integer + the namespace id. Create it with `vim.api.create_namespace` + (default DEFAULT_NAMESPACE) +
  • +
  • lines + {string,...} + the lines to highlight from the buffer. +
  • +
  • line_start + integer + should be 0-indexed +
  • +
  • options + Configuration options as described in `setup` + (optional) +
  • +
+ + + +

See also:

+ + + +
+
+ + attach_to_buffer ([buf=0[, options]]) +
+
+ Attach to a buffer and continuously highlight changes. + + +

Parameters:

+
    +
  • buf + integer + A value of 0 implies the current buffer. + (default 0) +
  • +
  • options + Configuration options as described in `setup` + (optional) +
  • +
+ + + +

See also:

+ + + +
+
+ + setup ([filetypes={'*'}[, default_options]]) +
+
+ Easy to use function if you want the full setup without fine grained control. + Setup an autocmd which enables colorizing for the filetypes and options specified. +

By default highlights all FileTypes. +

Example config: + ``` + { 'scss', 'html', css = { rgb_fn = true; }, javascript = { no_names = true } } + ``` +

You can combine an array and more specific options. + Possible options: + - `no_names`: Don't highlight names like Blue + - `rgb_fn`: Highlight `rgb(...)` functions. + - `mode`: Highlight mode. Valid options: `foreground`,`background` + + + +

Parameters:

+
    +
  • filetypes + A table/array of filetypes to selectively enable and/or customize. By default, enables all filetypes. + (default {'*'}) +
  • +
  • default_options + {[string]=string} + Default options to apply for the filetypes enable. + (optional) +
  • +
+ + + + +

Usage:

+
    +
    require'colorizer'.setup()
    +
+ +
+
+

Fields

+ +
+
+ + DEFAULT_NAMESPACE +
+
+ Default namespace used in `highlight_buffer` and `attach_to_buffer`. + The name is "terminal_highlight" + + + + + +

See also:

+ + + +
+
+ + +
+
+
+generated by LDoc 1.4.6 +Last updated 2019-10-17 16:25:49 +
+
+ + diff --git a/doc/modules/trie.html b/doc/modules/trie.html new file mode 100644 index 0000000..898b18e --- /dev/null +++ b/doc/modules/trie.html @@ -0,0 +1,66 @@ + + + + + Reference + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

Module trie

+

Trie implementation in luajit + Copyright © 2019 Ashkan Kiani

+

+ + + +
+
+ + + + +
+
+
+generated by LDoc 1.4.6 +Last updated 2019-10-17 16:25:49 +
+
+ + -- cgit v1.2.3-70-g09d2