Compare commits

...

2 Commits

Author SHA1 Message Date
db1199cfa8 removed identation from README 2023-09-18 22:55:19 +02:00
af8f16e01a HLPATH notes 2023-09-18 22:52:29 +02:00

View File

@ -15,6 +15,11 @@ These functions are responsible for the library's "life time".
This function matches _string_ against all known highlighting rules and dispatches the appropriate callback depending on _mode_.
```C
#define HLPATH //?!
```
Coma separated list of directories to be searched for syntax scripts. `#undef` to disable it entirely.
```C
typedef void (*attribute_callback_t)(const char * const string, const int length, void * const attributes);
```
The type used for defining appropriate callbacks for render_string().
@ -61,7 +66,6 @@ There are also convinience functions:
// NOTE: the return value is the number tokens successfully inserted
int new_keyword_tokens(const char * const * words, hl_group_t * const g); // _words_ must be NULL terminated
int new_syntax_character_tokens(const char * const chars, hl_group_t * const g);
```
The regex engine used for MATCHes is Jeger by default, emulating Vim regex.
However the regex engine can be overridden:
@ -89,7 +93,8 @@ hl will read from stdin and write to stdout.
### Environment variables
```bash
$HLPATH : colon separated list of directories searched for syntax script files
$HLPATH : colon separated list of directories searched for syntax script files;
overriddes the value of the HLPATH macro
```
---