* fix(chroma/make): huge delay on big units
* fix(fast-make): code-style indentation
* feat(fast-make): allow shared cache
One may enable the shared cache by setting the following prior to
loading the fast-synthax-highlighting module
```sh
typeset -gA FAST_HIGHLIGHT
FAST_HIGHLIGHT[chroma-make-cache-global]=1
```
This new implementation change the way the cached makefile' parsed
content are expired. Prior to this commit, cached item expired after
7s. The new implementation get ride of the timer limit and
replace it with a good old "is my file content's different"
* fix(make): colorize targets from imported make-files
Old behavior use to parse the content of the invoked `Makefile` unit
to define targets.
Such parsing didn't take into account targets from unit imported by the
current (ex: targets defined in files imported such as `import
./targets/help.mk`).
New behavior pass the content of the Makefile unit post lexing (aka
`make -f Makefile -pn` instead of the plain unit.
* Update →chroma/-make.ch
---------
Co-authored-by: Philipp Schmitt <pschmitt@users.noreply.github.com>
`goawk` is a POSIX-compliant AWK interpreter that benefits from the
same highlighting as other AWK interpreters here.
Signed-off-by: Lucas Larson <LucasLarson@riseup.net>
zsh prints an abundance of errors when `setopt nounset` is enabled and
fast-syntax-highlighting is activated (#49). This commit helps to avoid
the unnecessary verbosity.
Signed-off-by: Lucas Larson <LucasLarson@riseup.net>
[F-Sy-H](https://github.com/zdharma-continuum/fast-syntax-highlighting) can recognize and highlight manual subsection suffixes (i.e., `open.2`, `ls.1p`, `printf.3`).
- `man-db` is known to support subsection suffixes
- `mandoc` should not be affected by this commit
`$userdirs` can be pretty huge, and blindly expanding it to match as a regex expression
can be expensive.
Because `$userdirs` is an associative array, leveraging direct member lookup is the optimal method.
$userdirs can be quite huge and blindly expanding it to then match as regexp
can be very expensive. Because $userdirs is an associative array, we can do
a direct member lookup which is much quicker.