]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/gentoo-ebuild.micro
Add support for tabs
[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 brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
6 ## Highlight bash related syntax
7 color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\>"
8 color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
9 color green "-(e|d|f|r|g|u|w|x|L)\>"
10 color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
11 ## Highlight variables ... official portage ones in red, all others in bright red
12 color brightred "\$\{?[a-zA-Z_0-9]+\}?"
13 color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>"
14 color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
15 ## Highlight portage commands
16 color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*"
17 color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\>"
18 color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>"
19 color brightblue "\<(do|new)(ins|s?bin|doc|lib(\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
20 color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
21 color brightblue "prepall(docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)"
22 color brightblue "\<(doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>"
23 ## Highlight common commands used in ebuilds
24 color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>"
25 ## Highlight comments (doesnt work that well)
26 color yellow "#.*$"
27 ## Highlight strings (doesnt work that well)
28 color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
29 ## Trailing space is bad!
30 color ,green "[[:space:]]+$"