File tree 2 files changed +54
-0
lines changed
2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Syntax highlighting for GNU nano
2
+
3
+ This is a syntax highlighting file the [ GNU nano] ( https://nano-editor.org/ ) text
4
+ editor.
5
+
6
+ ## Installation
7
+
8
+ To install place the ` prql.nanorc ` file in the ` ~/.nano/ ` directory and and
9
+ include the following line in your ` .nanorc ` file.
10
+
11
+ include "~/.nano/prql.nanorc"
12
+
13
+ You can append it with this command:
14
+
15
+ echo 'include "~/.nano/prql.nanorc"' >> ~/.nanorc
Original file line number Diff line number Diff line change
1
+ # # Syntax highlighting for PRQL.
2
+
3
+ syntax python " \. prql$ "
4
+ magic " PRQL script"
5
+ comment " #"
6
+
7
+ # Types.
8
+ color green " \< (int(8| 16| 32| 64| 128)? | float(32| 64)| bool| text| date| time| timestamp)\> "
9
+
10
+ # Keywords.
11
+ color yellow " \< let| module| prql\> "
12
+
13
+ # Transforms.
14
+ color brightcyan " \< (aggregate| derive| filter| from| group| join| select| sort| take| window)\> "
15
+
16
+ # Special values.
17
+ color brightmagenta " \< (false| null| true| this| that)\> "
18
+
19
+ # Decorators.
20
+ color cyan start =" @\{ " end =" \} "
21
+
22
+ # Mono-quoted strings.
23
+ color brightgreen " [frs ]? '([^ ' \] | \\ . )* ' | [frs ]? "([^ " \] | \\ . )* " | ''' | """"
24
+ color normal "''' | """"
25
+ # Comments .
26
+ color gray " (^| [[:blank :] ])#. * "
27
+ # Triple-quoted strings.
28
+ color brightgreen start="[frs ]? '''([^ ' ), ]| $ )" end="(^ | [^ (\] )'''"
29
+ color brightgreen start=" [frs ]? """([^ " ), ]| $ )" end="(^ | [^ (\] )""""
30
+
31
+ # Backslash escapes .
32
+ color lime " \\ ($| [\' "bfnrt ]| [0 -3 ]? [0 -7 ]? [0 -7 ]| x[[:xdigit :] ]{2 } )"
33
+ color lime "\\ (N\{ [[:alpha :] ]+ \} | u\{ [[:xdigit :] ]{1 ,6 } \} )"
34
+
35
+ # Reminders.
36
+ color brightwhite,yellow "\< (FIXME| TODO)\> "
37
+
38
+ # Trailing whitespace.
39
+ color ,green "[[:space :] ]+ $ "
You can’t perform that action at this time.
0 commit comments