Skip to content

Decide on a zstyle structure #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
danielshahaf opened this issue Sep 7, 2016 · 4 comments
Open

Decide on a zstyle structure #362

danielshahaf opened this issue Sep 7, 2016 · 4 comments
Labels

Comments

@danielshahaf
Copy link
Member

danielshahaf commented Sep 7, 2016

In the future we'll probably read user configurations from zstyles rather than from globals. We can do some work ahead of time by the designing the zstyle context structure now.

(To clarify: this is about the full context used for lookups with zstyle -g/-a/-s/-t, not about the context patterns used in style definitions in users' dotfiles.)

Things to possibly include in the zstyle context:

  • :plugins:zsh-syntax-highlighting - namespace prefix:
  • :0.5.0 - z-sy-h version number
  • :${user_context} - argv[1] of the entry point; compare vcs_info foo looking up :vcs_info:foo:…
  • :brackets - highlighter name
  • :${$WIDGET}, :${CONTEXT} - zle state
@phy1729
Copy link
Member

phy1729 commented Nov 15, 2017

It may also be desirable to include the nesting level; so that if commands in $( ) are highlighted, they may be highlighted differently.

@phy1729
Copy link
Member

phy1729 commented Dec 11, 2017

It would be nice to have a consistent way to distinguish between a completed element and an in progress one (e.g. path and path_prefix; c.f. #148 #373).

@danielshahaf
Copy link
Member Author

It would be nice to have a consistent way to distinguish between a completed element and an in progress one (e.g. path and path_prefix; c.f. #148 #373).

tldr:

#148 - special highlighting for the word currently being typed, e.g., for the command word depending on its possible completions

#373 - highlighting of unterminated string literals

@phy1729
Copy link
Member

phy1729 commented Jan 22, 2018

It may be useful to make the style reflect the nesting mentioned in #495 e.g. --"delete-${when}" the -- would be ...:option-hyphen-double, "delete- ...:option-hyphen-double:quoted-double, and ${when} ...:option-hyphen-double:quoted-double:parameter. Not sure if we should no longer overlap styles if we do that.
(Of course the particular names aren't important, just giving an example.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants