]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/gentoo-ebuild.micro
Added some SCSS keywords for the css/scss highlighting
[micro.git] / runtime / syntax / gentoo-ebuild.micro
1 ## Here is an example for ebuilds/eclasses
2 ##
3 syntax "ebuild" "\.e(build|class)$"
4 ## All the standard portage functions
5 color identifier "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
6 ## Highlight bash related syntax
7 color statement "\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\b"
8 color statement "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
9 color statement "-(e|d|f|r|g|u|w|x|L)\b"
10 color statement "-(eq|ne|gt|lt|ge|le|s|n|z)\b"
11 ## Highlight variables ... official portage ones in red, all others in bright red
12 color preproc "\$\{?[a-zA-Z_0-9]+\}?"
13 color special "\b(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\b"
14 color special "\b(S|D|T|PV|PF|P|PN|A)\b" "\bC(XX)?FLAGS\b" "\bLDFLAGS\b" "\bC(HOST|TARGET|BUILD)\b"
15 ## Highlight portage commands
16 color identifier "\buse(_(with|enable))?\b [!a-zA-Z0-9_+ -]*" "inherit.*"
17 color statement "\be(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\b"
18 color statement "\bdie\b" "\buse(_(with|enable))?\b" "\binherit\b" "\bhas\b" "\b(has|best)_version\b" "\bunpack\b"
19 color statement "\b(do|new)(ins|s?bin|doc|lib(\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\b"
20 color statement "\bdo(python|sed|dir|hard|sym|html|jar|mo)\b" "\bkeepdir\b"
21 color statement "prepall(docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)"
22 color statement "\b(doc|ins|exe)into\b" "\bf(owners|perms)\b" "\b(exe|ins|dir)opts\b"
23 ## Highlight common commands used in ebuilds
24 color type "\bmake\b" "\b(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\b"
25 ## Highlight comments (doesnt work that well)
26 color comment "#.*$"
27 ## Highlight strings (doesnt work that well)
28 color constant.string ""(\\.|[^\"])*"" "'(\\.|[^'])*'"