z-shell / F-Sy-H

⚙️ Feature-rich Syntax Highlighting for Zsh
https://wiki.zshell.dev/search?q=F-Sy-H
BSD 3-Clause "New" or "Revised" License
165 stars 24 forks source link

[bug]: command-specific highlighting does not work / chroma functions fail to load #41

Open amezin opened 5 months ago

amezin commented 5 months ago

Environment

OSTYPE=linux-gnu CPUTYPE=x86_64 / MACHINE_TYPE=x86_64 ZSH_VERSION=5.9

Expected behavior

For example, git subcommands should be highlighted.

Current behavior

No command-specific highlighting. Chroma files/functions not found:

$ chroma/-git.ch
zsh: chroma/-git.ch: function definition file not found

Steps to reproduce

Install F-Sy-H without package manager. For example, as a git submodule: https://github.com/amezin/zdotdir

Type "git checkout" in prompt, "checkout" isn't highlighted

Code snippet

source "${ZDOTDIR}/fast-syntax-highlighting/F-Sy-H.plugin.zsh"

# Adding the following line makes git-specific highlighting work
fpath+=("${ZDOTDIR}/fast-syntax-highlighting")

Aditional information

chroma should likely be inside functions

Self-service

Have you read the Contributing Guidelines?

Are you familiar with Contributor Covenant Code of Conduct?

Contact Details

No response

setpill commented 1 month ago

Also experiencing this issue when loading z-shell/F-Sy-H using zplug.