Fix READMEs
This commit is contained in:
parent
bb7fcb79fa
commit
ef4f5ed638
@ -3,9 +3,9 @@ zsh-syntax-highlighting / highlighters
|
||||
|
||||
Syntax highlighting is done by pluggable highlighters:
|
||||
|
||||
* [***main***](main) - the base highlighter, and the only one active by default.
|
||||
* [***brackets***](brackets) - matches brackets and parenthesis.
|
||||
* [***pattern***](pattern) - matches user-defined patterns.
|
||||
* [***main***](highlighters/main) - the base highlighter, and the only one active by default.
|
||||
* [***brackets***](highlighters/brackets) - matches brackets and parenthesis.
|
||||
* [***pattern***](highlighters/pattern) - matches user-defined patterns.
|
||||
|
||||
|
||||
How to activate highlighters
|
||||
@ -26,7 +26,7 @@ How to implement a new highlighter
|
||||
----------------------------------
|
||||
|
||||
To create your own ***myhighlighter*** highlighter:
|
||||
|
||||
|
||||
* Create your script at **highlighters/*myhighlighter*/*myhighlighter*-highlighter.zsh**.
|
||||
* Implement the `_zsh_highlight_myhighlighter_highlighter_predicate` function. This function must return 0 when the highlighter needs to be called, for example:
|
||||
|
||||
|
@ -14,6 +14,7 @@ To activate it, add it to `ZSH_HIGHLIGHT_HIGHLIGHTERS`:
|
||||
How to tweak it
|
||||
---------------
|
||||
This highlighter defines the following styles:
|
||||
|
||||
* `bracket-error` - unmatched brackets
|
||||
* `bracket-level-N` - brackets with nest level N
|
||||
|
||||
|
@ -21,6 +21,7 @@ This highlighter is active by default.
|
||||
How to tweak it
|
||||
---------------
|
||||
This highlighter defines the following styles:
|
||||
|
||||
* `unknown-token` - unknown tokens / errors
|
||||
* `reserved-word` - shell reserved words
|
||||
* `alias` - aliases
|
||||
|
@ -8,13 +8,13 @@ The tests expect the highlighter directory to contain a `test-data` directory wi
|
||||
|
||||
highlighting test
|
||||
-----------------
|
||||
[`test-highlighting.zsh`](test-highlighting.zsh) tests the correctness of the highlighting. Usage:
|
||||
[`test-highlighting.zsh`](tests/test-highlighting.zsh) tests the correctness of the highlighting. Usage:
|
||||
|
||||
zsh test-highlighting.zsh <HIGHLIGHTER NAME>
|
||||
|
||||
|
||||
performance test
|
||||
----------------
|
||||
[`test-perfs.zsh`](test-highlighting.zsh) measures the time spent doing the highlighting. Usage:
|
||||
[`test-perfs.zsh`](tests/test-perfs.zsh) measures the time spent doing the highlighting. Usage:
|
||||
|
||||
zsh test-perfs.zsh <HIGHLIGHTER NAME>
|
||||
|
Loading…
x
Reference in New Issue
Block a user