-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add syntax highlight file for GNU nano (#4560)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
ff492a5
commit f718695
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Syntax highlighting for GNU nano | ||
|
||
This is a syntax highlighting file the [GNU nano](https://nano-editor.org/) text | ||
editor. | ||
|
||
## Installation | ||
|
||
To install place the `prql.nanorc` file in the `~/.nano/` directory and and | ||
include the following line in your `.nanorc` file. | ||
|
||
include "~/.nano/prql.nanorc" | ||
|
||
You can append it with this command: | ||
|
||
echo 'include "~/.nano/prql.nanorc"' >> ~/.nanorc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
## Syntax highlighting for PRQL. | ||
|
||
syntax python "\.prql$" | ||
magic "PRQL script" | ||
comment "#" | ||
|
||
# Types. | ||
color green "\<(int(8|16|32|64|128)?|float(32|64)|bool|text|date|time|timestamp)\>" | ||
|
||
# Keywords. | ||
color yellow "\<let|module|prql\>" | ||
|
||
# Transforms. | ||
color brightcyan "\<(aggregate|derive|filter|from|group|join|select|sort|take|window)\>" | ||
|
||
# Special values. | ||
color brightmagenta "\<(false|null|true|this|that)\>" | ||
|
||
# Decorators. | ||
color cyan start="@\{" end="\}" | ||
|
||
# Mono-quoted strings. | ||
color brightgreen "[frs]?'([^'\]|\\.)*'|[frs]?"([^"\]|\\.)*"|'''|"""" | ||
color normal "'''|"""" | ||
# Comments. | ||
color gray "(^|[[:blank:]])#.*" | ||
# Triple-quoted strings. | ||
color brightgreen start="[frs]?'''([^'),]|$)" end="(^|[^(\])'''" | ||
color brightgreen start="[frs]?"""([^"),]|$)" end="(^|[^(\])"""" | ||
# Backslash escapes. | ||
color lime "\\($|[\'"bfnrt]|[0-3]?[0-7]?[0-7]|x[[:xdigit:]]{2})" | ||
color lime "\\(N\{[[:alpha:]]+\}|u\{[[:xdigit:]]{1,6}\})" | ||
# Reminders. | ||
color brightwhite,yellow "\<(FIXME|TODO)\>" | ||
# Trailing whitespace. | ||
color ,green "[[:space:]]+$" |