Add highlight for lyric (#949)

* Add highlight for lyric files

* Add highlight theme nyx-bold

* Update the documents

* Add highlight for subtitle files
This commit is contained in:
SasakiSaki 2020-02-21 21:14:25 +08:00 committed by GitHub
parent a3223ebb66
commit 073e24659d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 2272 additions and 6 deletions

View file

@ -80,6 +80,7 @@ Here is a full list of supported languages and their short names:
- Lisp -> ["cl", "clisp", "el", "fasl", "l", "lisp", "lsp", "mud", "scm", "ss"] - Lisp -> ["cl", "clisp", "el", "fasl", "l", "lisp", "lsp", "mud", "scm", "ss"]
- Literate Haskell -> ["lhs"] - Literate Haskell -> ["lhs"]
- Lua -> ["lua"] - Lua -> ["lua"]
- Lyric -> ["lyric", "lrc"]
- Makefile -> ["GNUmakefile", "Makefile", "Makefile.am", "Makefile.in", "OCamlMakefile", "mak", "make", "makefile", "makefile.am", "makefile.in", "mk"] - Makefile -> ["GNUmakefile", "Makefile", "Makefile.am", "Makefile.in", "OCamlMakefile", "mak", "make", "makefile", "makefile.am", "makefile.in", "mk"]
- Markdown -> ["markdn", "markdown", "md", "mdown"] - Markdown -> ["markdn", "markdown", "md", "mdown"]
- MATLAB -> ["matlab"] - MATLAB -> ["matlab"]
@ -110,6 +111,7 @@ Here is a full list of supported languages and their short names:
- Scala -> ["sbt", "scala"] - Scala -> ["sbt", "scala"]
- SQL -> ["ddl", "dml", "sql"] - SQL -> ["ddl", "dml", "sql"]
- SQL (Rails) -> ["erbsql", "sql.erb"] - SQL (Rails) -> ["erbsql", "sql.erb"]
- Subtitle -> ["srt", "subrip"]
- SWI-Prolog -> ["pro"] - SWI-Prolog -> ["pro"]
- Swift -> ["swift"] - Swift -> ["swift"]
- Tcl -> ["tcl"] - Tcl -> ["tcl"]

View file

@ -132,6 +132,9 @@ Zola currently has the following highlight themes available:
- [agola-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Agola%20Dark) - [agola-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Agola%20Dark)
- [ascetic-white](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Ascetic%20White) - [ascetic-white](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Ascetic%20White)
- [axar](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Axar) - [axar](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Axar)
- [ayu-dark](https://github.com/dempfi/ayu)
- [ayu-light](https://github.com/dempfi/ayu)
- [ayu-mirage](https://github.com/dempfi/ayu)
- [base16-ocean-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Base16%20Ocean%20Dark) - [base16-ocean-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Base16%20Ocean%20Dark)
- [base16-ocean-light](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Base16%20Ocean%20Light) - [base16-ocean-light](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Base16%20Ocean%20Light)
- [bbedit](https://tmtheme-editor.herokuapp.com/#!/editor/theme/BBEdit) - [bbedit](https://tmtheme-editor.herokuapp.com/#!/editor/theme/BBEdit)
@ -152,16 +155,14 @@ Zola currently has the following highlight themes available:
- [material-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Material%20Dark) - [material-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Material%20Dark)
- [material-light](https://github.com/morhetz/gruvbox) - [material-light](https://github.com/morhetz/gruvbox)
- [monokai](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Monokai) - [monokai](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Monokai)
- [nyx-bold](https://github.com/GalAster/vscode-theme-nyx)
- [one-dark](https://github.com/andresmichel/one-dark-theme)
- [solarized-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Solarized%20(dark)) - [solarized-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Solarized%20(dark))
- [solarized-light](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Solarized%20(light)) - [solarized-light](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Solarized%20(light))
- [subway-madrid](https://github.com/idleberg/Subway.tmTheme) - [subway-madrid](https://github.com/idleberg/Subway.tmTheme)
- [subway-moscow](https://github.com/idleberg/Subway.tmTheme) - [subway-moscow](https://github.com/idleberg/Subway.tmTheme)
- [visual-studio-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Visual%20Studio%20Dark)
- [ayu-light](https://github.com/dempfi/ayu)
- [ayu-dark](https://github.com/dempfi/ayu)
- [ayu-mirage](https://github.com/dempfi/ayu)
- [Tomorrow](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Tomorrow) - [Tomorrow](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Tomorrow)
- [one-dark](https://github.com/andresmichel/one-dark-theme) - [visual-studio-dark](https://tmtheme-editor.herokuapp.com/#!/editor/theme/Visual%20Studio%20Dark)
- [zenburn](https://github.com/colinta/zenburn) - [zenburn](https://github.com/colinta/zenburn)
Zola uses the Sublime Text themes, making it very easy to add more. Zola uses the Sublime Text themes, making it very easy to add more.

View file

@ -0,0 +1,27 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
scope: source.lyric
file_extensions:
- lrc
- lyric
contexts:
main:
- match: '\[([0-5][0-9]:[0-5][0-9]\.[0-9][0-9])\]'
captures:
1: constant.other.time.lyric
push:
- match: '(.*)[\n\r]+'
captures:
1: string.literal.lyric
pop: true
- match: '(\[)([a-zA-Z].*)(:)(.*)(\])'
captures:
1: punctuation.definition.meta.lyric
2: entity.name.function.lyric
3: punctuation.definition.split.lyric
4: meta.object-literal.key.lyric
5: punctuation.definition.meta.lyric
- match: (.*)
captures:
1: invalid.illegal.lyric

View file

@ -0,0 +1,35 @@
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
scope: source.subrip
file_extensions:
- srt
- subrip
contexts:
main:
- match: "^([1-9][0-9]*)$"
scope: variable.other.readwrite.subrip
- match: '^(\d{2}:[0-5][0-9]:[0-5][0-9],\d{3}) (-->) (\d{2}:[0-5][0-9]:[0-5][0-9],\d{3})$'
captures:
1: constant.other.time.subrip
2: keyword.operator.assignment.subrip
3: constant.other.time.subrip
- match: .+
push:
- meta_scope: string.literal.subrip
- match: (\n\r|\n)
pop: true
- match: (\</?)((?i:b|i|u|font)\b)
captures:
1: punctuation.definition.tag.begin.html
2: entity.name.tag.inline.any.html
push:
- match: '((?: ?/)?\>)'
captures:
1: punctuation.definition.tag.end.html
pop: true
- match: (<b>)(.*)(<\/b>)
captures:
1: punctuation.definition.tag.begin.html
2: entity.name.tag.inline.any.html
3: punctuation.definition.tag.end.html

File diff suppressed because it is too large Load diff