Document new functionality

This commit is contained in:
Iron_E 2020-11-19 16:43:00 -05:00
parent 2de9c2b6bf
commit 1cadac7cb2
No known key found for this signature in database
GPG Key ID: B0B37DE7EDC2335F
1 changed files with 35 additions and 4 deletions

View File

@ -9,7 +9,7 @@ be configured by cloning the repository and following the README, or
individually used to comprehensively highlight groups with its functions. individually used to comprehensively highlight groups with its functions.
============================================================================== ==============================================================================
0. Table of Contents *highlite-toc* 0. Table of Contents *highlite-toc*
1. Requirements ............ |highlite-requirements| 1. Requirements ............ |highlite-requirements|
2. Usage ................... |highlite-usage| 2. Usage ................... |highlite-usage|
@ -17,11 +17,40 @@ individually used to comprehensively highlight groups with its functions.
============================================================================== ==============================================================================
1. Requirements *highlite-requirements* 1. Requirements *highlite-requirements*
* Neovim 0.5+ - Neovim 0.5+
============================================================================== ==============================================================================
2. Usage *highlite-usage* 2. Usage *highlite-usage*
*highlite.group()*
`highlite`.group({group_name}) *highlite-group()*
Convert a pre-existing |highlight-group| into a format that |highlite|
recognizes.
Note: the |highlight-group| must have been either:
- |:highlight|ed.
- |highlite-highlight|ed.
Parameters: ~
{group_name} A `string` which is the |highlight-group| to convert.
Return: ~
- A `table` which can be used as the {attributes} parameter for
|highlite.highlight()|.
Example: ~
>
local highlite = require('highlite')
-- get the 'Error' highlight group
local hl_error = highlite.group('Error')
-- Define 'ErrorMsg' as foreground = background of 'Error'
highlite.highlight('ErrorMsg', {fg=hl_error.bg, bg=BG})
<
*highlite.highlight()*
`highlite`.highlight({group}, {attributes}) *highlite-highlight()* `highlite`.highlight({group}, {attributes}) *highlite-highlight()*
Highlight some {group} according to its {attributes}. Highlight some {group} according to its {attributes}.
@ -47,7 +76,7 @@ individually used to comprehensively highlight groups with its functions.
} }
< <
Return: ~ Return: ~
* Nothing. - Nothing.
Example: ~ Example: ~
> >
@ -64,6 +93,8 @@ individually used to comprehensively highlight groups with its functions.
See also: ~ See also: ~
|group-names| Additional semantic highlighting groups. |group-names| Additional semantic highlighting groups.
*highlite:highlight_terminal()*
*highlite-highlight_terminal()*
`highlite`:highlight_terminal({terminal_ansi_colors}) `highlite`:highlight_terminal({terminal_ansi_colors})
Override the |terminal| colors with a new table of {terminal_ansi_colors}. Override the |terminal| colors with a new table of {terminal_ansi_colors}.
@ -92,7 +123,7 @@ individually used to comprehensively highlight groups with its functions.
} }
< <
Return: ~ Return: ~
* Nothing. - Nothing.
Example: ~ Example: ~
> >