From 1cadac7cb2038af2e8d8861d9a8457ae1b0e45d4 Mon Sep 17 00:00:00 2001 From: Iron_E Date: Thu, 19 Nov 2020 16:43:00 -0500 Subject: [PATCH] Document new functionality --- doc/highlite.txt | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/doc/highlite.txt b/doc/highlite.txt index 07a01d8..ef313a3 100644 --- a/doc/highlite.txt +++ b/doc/highlite.txt @@ -9,7 +9,7 @@ be configured by cloning the repository and following the README, or 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| 2. Usage ................... |highlite-usage| @@ -17,11 +17,40 @@ individually used to comprehensively highlight groups with its functions. ============================================================================== 1. Requirements *highlite-requirements* -* Neovim 0.5+ +- Neovim 0.5+ ============================================================================== 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()* Highlight some {group} according to its {attributes}. @@ -47,7 +76,7 @@ individually used to comprehensively highlight groups with its functions. } < Return: ~ - * Nothing. + - Nothing. Example: ~ > @@ -64,6 +93,8 @@ individually used to comprehensively highlight groups with its functions. See also: ~ |group-names| Additional semantic highlighting groups. + *highlite:highlight_terminal()* + *highlite-highlight_terminal()* `highlite`:highlight_terminal({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: ~ - * Nothing. + - Nothing. Example: ~ >