Coder Social home page Coder Social logo

z-shell / f-sy-h Goto Github PK

View Code? Open in Web Editor NEW
164.0 164.0 23.0 1.77 MB

⚙️ Feature-rich Syntax Highlighting for Zsh

Home Page: https://wiki.zshell.dev/search?q=F-Sy-H

License: BSD 3-Clause "New" or "Revised" License

Shell 100.00%
fast-syntax-highlighting feature-rich-syntax-highlighting syntax-highlighting syntax-themes zplugin zsh zsh-plugin

f-sy-h's People

Contributors

alichtman avatar camsteffen avatar d10n avatar deepsourcebot avatar dependabot[bot] avatar desyncr avatar f-i-f avatar grigorii-horos avatar imgbotapp avatar infokiller avatar lilydjwg avatar nesvand avatar plexigras avatar psprint avatar pushqrdx avatar ss-o avatar sugarsnack avatar vladdoster avatar xeruf avatar xpmo avatar xqrdot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

f-sy-h's Issues

[bug]: `-fast-highlight-xxx` appear in builtin command completion

Environment

OSTYPE=darwin21.3.0 CPUTYPE=arm64 / MACHINE_TYPE=arm ZSH_VERSION=5.9

Expected behavior

Press <tab> and show nothing:

time -<tab>

Current behavior

>  time -
-                                      -fast-highlight-fill-option-variables  -fast-highlight-process
-fast-highlight-check-path             -fast-highlight-init                   -fast-highlight-string
-fast-highlight-check-path-handler     -fast-highlight-main-type              -fast-highlight-string-process
-fast-highlight-dollar-string          -fast-highlight-math-string            -fsh_sy_h_shappend

Steps to reproduce

time -<tab>

Code snippet

I use oh-my-zsh:

plugins=(... F-Sy-H)

Aditional information

None.

Self-service

  • I'd be willing to address this documentation request myself.

Have you read the Contributing Guidelines?

Are you familiar with Contributor Covenant Code of Conduct?

Contact Details

No response

[bug]: git chroma doesn't seem to support git commit of a directory

Environment

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

Expected behavior

(with default theme)

With the prompt git commit some/file.lua
Screenshot_20230919_093136
👉 The given file to commit is colored with 'correct-subtle'.

With the prompt git commit some/folder/with/changes/
👉 The given path to commit SHOULD BE colored with 'correct-subtle' as well

Current behavior

With the prompt git commit some/folder/with/changes/
Screenshot_20230919_093245
👉 The given path to commit is instead colored with 'incorrect-subtle', so looks like an error even though is completely valid git-wise.

Steps to reproduce

N/A ?

Code snippet

No special config, the plugin is loaded with zi light /path/to/F-Sy-H-plugin

Aditional information

N/A ?

Self-service

  • I'd be willing to address this documentation request myself.

Have you read the Contributing Guidelines?

Are you familiar with Contributor Covenant Code of Conduct?

Contact Details

here on github

State is lost on reboot by default when ~/.cache is a tmpfs

Env: OSTYPE=linux-gnu CPUTYPE=x86_64 MACHINE_TYPE=x86_64 ZSH_VERSION=5.8.1


a rapid check of the code seems to show that I could set the FAST_WORK_DIR to change where the state of FSH is stored, by trying that:

FAST_WORK_DIR=~/.long_term_cache/zsh--fast-syntax-highlighting
echo "FAST_WORK_DIR (before zi): $FAST_WORK_DIR"

zi light z-shell/F-Sy-H

echo "FAST_WORK_DIR (after zi): $FAST_WORK_DIR"

Starting a new shell I get:

FAST_WORK_DIR (before zi): /home/lesell_b/.long_term_cache/zsh--fast-syntax-highlighting
FAST_WORK_DIR (after zi): /home/lesell_b/.cache/fsh

Which seems wrong...


In addition to that, it seems that the chroma system assumes the theme is stored in ~/.cache/fsh, and does not check what FAST_WORK_DIR is set to.
I tried to fix that in #24, but further testing showed the weird inconsistency above.

[docs]: Installation instructions for antigen is incorrect

Description

As per #22 antigen requires special flags to indicate the use of main as the primary branch.

Instructions should specify antigen bundle z-shell/F-Sy-H --branch=main

Select the area that is associated with this issue.

ZI (this repository)

Self-service

  • I'd be willing to address this documentation request myself.

Have you read the Contributing Guidelines?

Are you familiar with Contributor Covenant Code of Conduct?

Contact Details

[email protected]

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

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

  • I'd be willing to address this documentation request myself.

Have you read the Contributing Guidelines?

Are you familiar with Contributor Covenant Code of Conduct?

Contact Details

No response

Cannot Properly parse aliased ]

aliased $ is correctly parsed as an alias, but aliased ] is parsed as "unexpected symbol."
image
the ]s at the beginning of the line are my prompts.

[bug]: git chroma doesn't support correct coloring of global aliases

Environment

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

Expected behavior

With this global alias:
alias -g NOOUT=">/dev/null"

When I use it in a simple command like echo foo NOOUT it shows like this (with default theme):
Screenshot_20230919_094530

Current behavior

When I use it in a git command like git commit --dry-run NOOUT the chroma identifies the alias as an invalid token and uses color 'incorrect-subtle':
Screenshot_20230919_094707

😞

Steps to reproduce

N/A?

Code snippet

No special config, the plugin is loaded with zi light /path/to/F-Sy-H-plugin

Aditional information

N/A?

Self-service

  • I'd be willing to address this documentation request myself.

Have you read the Contributing Guidelines?

Are you familiar with Contributor Covenant Code of Conduct?

Contact Details

here on github

Deleted repo drama and zdharma-continuum

I just saw that https://github.com/zdharma/fast-syntax-highlighting got created again and now points to this repo (https://github.com/z-shell/fast-syntax-highlighting) as upstream repo. Are you the real zdharma and is this now again the official upstream? https://github.com/zdharma-continuum/fast-syntax-highlighting got created in the meantime and accepted in the community.

If you are the real zdharma, can we rely on you not again deleting this repo?

More context for the drama: https://www.reddit.com/r/zsh/comments/qinb6j/httpsgithubcomzdharma_has_suddenly_disappeared_i/

I think it would be helpful for you to give us an answer on all this and not just pretend like it never happened.

Installation instruction for zgen is incorrect

This repository uses main as its default branch whereas zgen by itself searches only for master.

Hence, zgen load z-shell/F-Sy-H in the README should be replaced with zgen load z-shell/F-Sy-H . main or something like that.

On an unrelated note, when you try to create a new issue you're prompted to select the type, and "Community Discussion" leads to https://github.com/org/z-shell/discussions which doesn't exist.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.