From 21f52cd3cfc73af05c3669351c9acfd32c96eb50 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Sat, 8 Jun 2024 23:58:51 +0200 Subject: [PATCH 1/3] feat: Add syntax highlight file for GNU nano --- grammars/nano/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 grammars/nano/README.md diff --git a/grammars/nano/README.md b/grammars/nano/README.md new file mode 100644 index 000000000000..2155901cfac3 --- /dev/null +++ b/grammars/nano/README.md @@ -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 From fb1dc17f2c5497e2f487c38f7e20473d6c48bccc Mon Sep 17 00:00:00 2001 From: Jonathan Date: Sat, 8 Jun 2024 23:59:53 +0200 Subject: [PATCH 2/3] Create prql.nanorc --- grammars/nano/prql.nanorc | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 grammars/nano/prql.nanorc diff --git a/grammars/nano/prql.nanorc b/grammars/nano/prql.nanorc new file mode 100644 index 000000000000..a8d7317bbe01 --- /dev/null +++ b/grammars/nano/prql.nanorc @@ -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 "\" + +# 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:]]+$" From 698a2988314651508681db111e8419ae54612e51 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 8 Jun 2024 22:02:22 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- grammars/nano/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grammars/nano/README.md b/grammars/nano/README.md index 2155901cfac3..92a1f2797ac3 100644 --- a/grammars/nano/README.md +++ b/grammars/nano/README.md @@ -1,12 +1,12 @@ # Syntax highlighting for GNU nano -This is a syntax highlighting file the [GNU nano](https://nano-editor.org/) -text editor. +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. +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"