mirror of
https://github.com/zdharma-continuum/fast-syntax-highlighting.git
synced 2026-09-10 07:16:18 -04:00
fix(make): colorize targets from imported make-files (#81)
* 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>
This commit is contained in:
parent
6f57bbe57c
commit
dcee72bb99
|
|
@ -73,7 +73,7 @@ local -a __lines_list reply2
|
|||
__wrd="${(Q)__wrd}"
|
||||
|
||||
if [[ -f "${FAST_HIGHLIGHT[chroma-make-custom-dir]%/}/${FAST_HIGHLIGHT[chroma-make-custom-file]}" ]] && \
|
||||
.fast-make-targets < "${FAST_HIGHLIGHT[chroma-make-custom-dir]%/}/${FAST_HIGHLIGHT[chroma-make-custom-file]}"
|
||||
make -f "${FAST_HIGHLIGHT[chroma-make-custom-dir]%/}/${FAST_HIGHLIGHT[chroma-make-custom-file]}" -pn | .fast-make-targets
|
||||
then
|
||||
if [[ "${reply2[(r)$__wrd]}" ]]; then
|
||||
(( __start=__start_pos-${#PREBUFFER}, __end=__end_pos-${#PREBUFFER}, __start >= 0 )) && reply+=("$__start $__end ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}correct-subtle]}")
|
||||
|
|
|
|||
Loading…
Reference in a new issue