aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorjgmdev <jgmdev@gmail.com>2022-03-01 22:03:18 -0400
committerjgmdev <jgmdev@gmail.com>2022-03-01 22:06:50 -0400
commit0b71e55c2f2b7599175b7a549f57cda301e165d4 (patch)
tree9f7ed6c1947fc8fc0a7cd52e743c1becde424494 /plugins
parent7c179ac113e66ba8ccb77a9fa82a70ebe3b0e146 (diff)
downloadlite-xl-plugins-0b71e55c2f2b7599175b7a549f57cda301e165d4.tar.gz
lite-xl-plugins-0b71e55c2f2b7599175b7a549f57cda301e165d4.zip
language_pkgbuild: added arch specific keywords and params count expression fix from language_sh.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/language_pkgbuild.lua288
1 files changed, 190 insertions, 98 deletions
diff --git a/plugins/language_pkgbuild.lua b/plugins/language_pkgbuild.lua
index 486a8a6..de38d5c 100644
--- a/plugins/language_pkgbuild.lua
+++ b/plugins/language_pkgbuild.lua
@@ -6,6 +6,8 @@ syntax.add {
files = "/*PKGBUILD$",
comment = "#",
patterns = {
+ -- Don't colorize number of arguments expression as comment
+ { pattern = "$#", type = "keyword2" },
{ pattern = "#.*\n", type = "comment" },
-- Strings
{ pattern = { '"', '"', '\\' }, type = "string" },
@@ -55,105 +57,195 @@ syntax.add {
},
symbols = {
-- Bash keywords
- ["true"] = "literal",
- ["false"] = "literal",
- ["case"] = "keyword",
- ["in"] = "keyword",
- ["esac"] = "keyword",
- ["if"] = "keyword",
- ["then"] = "keyword",
- ["elif"] = "keyword",
- ["else"] = "keyword",
- ["fi"] = "keyword",
- ["until"] = "keyword",
- ["while"] = "keyword",
- ["do"] = "keyword",
- ["done"] = "keyword",
- ["for"] = "keyword",
- ["break"] = "keyword",
- ["continue"] = "keyword",
- ["shift"] = "keyword",
- ["function"] = "keyword",
- ["local"] = "keyword",
- ["echo"] = "keyword",
- ["return"] = "keyword",
- ["exit"] = "keyword",
- ["alias"] = "keyword",
- ["test"] = "keyword",
- ["select"] = "keyword",
- ["type"] = "keyword",
- ["declare"] = "keyword",
- ["set"] = "keyword",
- ["unalias"] = "keyword",
- ["unset"] = "keyword",
- ["enable"] = "keyword",
- ["eval"] = "keyword",
- ["exec"] = "keyword",
- ["export"] = "keyword",
- ["getopts"] = "keyword",
- ["hash"] = "keyword",
- ["history"] = "keyword",
- ["help"] = "keyword",
- ["jobs"] = "keyword",
- ["kill"] = "keyword",
- ["let"] = "keyword",
+ ["true"] = "literal",
+ ["false"] = "literal",
+ ["case"] = "keyword",
+ ["in"] = "keyword",
+ ["esac"] = "keyword",
+ ["if"] = "keyword",
+ ["then"] = "keyword",
+ ["elif"] = "keyword",
+ ["else"] = "keyword",
+ ["fi"] = "keyword",
+ ["until"] = "keyword",
+ ["while"] = "keyword",
+ ["do"] = "keyword",
+ ["done"] = "keyword",
+ ["for"] = "keyword",
+ ["break"] = "keyword",
+ ["continue"] = "keyword",
+ ["shift"] = "keyword",
+ ["function"] = "keyword",
+ ["local"] = "keyword",
+ ["echo"] = "keyword",
+ ["return"] = "keyword",
+ ["exit"] = "keyword",
+ ["alias"] = "keyword",
+ ["test"] = "keyword",
+ ["select"] = "keyword",
+ ["type"] = "keyword",
+ ["declare"] = "keyword",
+ ["set"] = "keyword",
+ ["unalias"] = "keyword",
+ ["unset"] = "keyword",
+ ["enable"] = "keyword",
+ ["eval"] = "keyword",
+ ["exec"] = "keyword",
+ ["export"] = "keyword",
+ ["getopts"] = "keyword",
+ ["hash"] = "keyword",
+ ["history"] = "keyword",
+ ["help"] = "keyword",
+ ["jobs"] = "keyword",
+ ["kill"] = "keyword",
+ ["let"] = "keyword",
+ ["mapfile"] = "keyword",
+ ["readarray"] = "keyword",
-- Commands
- ["mapfile"] = "keyword",
- ["printf"] = "keyword",
- ["read"] = "keyword",
- ["readarray"] = "keyword",
- ["pwd"] = "keyword",
- ["time"] = "keyword",
- ["cd"] = "keyword",
- ["cp"] = "keyword",
- ["mv"] = "keyword",
- ["mkdir"] = "keyword",
- ["rm"] = "keyword",
- ["rmdir"] = "keyword",
- ["chown"] = "keyword",
- ["chmod"] = "keyword",
- ["touch"] = "keyword",
- ["ln"] = "keyword",
- ["cat"] = "keyword",
- ["sed"] = "keyword",
- ["awk"] = "keyword",
- ["find"] = "keyword",
- ["grep"] = "keyword",
- ["head"] = "keyword",
- ["less"] = "keyword",
- ["gcc"] = "keyword",
- ["gpp"] = "keyword",
- ["make"] = "keyword",
- ["qmake"] = "keyword",
+ ["printf"] = "keyword",
+ ["read"] = "keyword",
+ ["pwd"] = "keyword",
+ ["time"] = "keyword",
+ ["cd"] = "keyword",
+ ["cp"] = "keyword",
+ ["mv"] = "keyword",
+ ["mkdir"] = "keyword",
+ ["rm"] = "keyword",
+ ["rmdir"] = "keyword",
+ ["chown"] = "keyword",
+ ["chmod"] = "keyword",
+ ["touch"] = "keyword",
+ ["ln"] = "keyword",
+ ["cat"] = "keyword",
+ ["sed"] = "keyword",
+ ["awk"] = "keyword",
+ ["find"] = "keyword",
+ ["grep"] = "keyword",
+ ["head"] = "keyword",
+ ["less"] = "keyword",
+ ["gcc"] = "keyword",
+ ["gpp"] = "keyword",
+ ["make"] = "keyword",
+ ["qmake"] = "keyword",
-- PKGBUILD keywords
- ["pkgbase"] = "literal",
- ["pkgname"] = "literal",
- ["pkgver"] = "literal",
- ["pkgrel"] = "literal",
- ["epoch"] = "literal",
- ["pkgdesc"] = "literal",
- ["arch"] = "literal",
- ["url"] = "literal",
- ["license"] = "literal",
- ["groups"] = "literal",
- ["depends"] = "literal",
- ["makedepends"] = "literal",
- ["checkdepends"] = "literal",
- ["optdepends"] = "literal",
- ["provides"] = "literal",
- ["conflicts"] = "literal",
- ["replaces"] = "literal",
- ["backup"] = "literal",
- ["options"] = "literal",
- ["changelog"] = "literal",
- ["noextract"] = "literal",
- ["validpgpkeys"] = "literal",
- ["md5sums"] = "literal",
- ["sha1sums"] = "literal",
- ["sha256sums"] = "literal",
- ["sha224sums"] = "literal",
- ["sha384sums"] = "literal",
- ["sha512sums"] = "literal",
- ["b2sums"] = "literal"
+ ["pkgbase"] = "literal",
+ ["pkgname"] = "literal",
+ ["pkgver"] = "literal",
+ ["pkgrel"] = "literal",
+ ["epoch"] = "literal",
+ ["pkgdesc"] = "literal",
+ ["arch"] = "literal",
+ ["url"] = "literal",
+ ["license"] = "literal",
+ ["groups"] = "literal",
+ ["depends"] = "literal",
+ ["depends_arm"] = "literal",
+ ["depends_armv6h"] = "literal",
+ ["depends_armv7h"] = "literal",
+ ["depends_aarch64"] = "literal",
+ ["depends_i686"] = "literal",
+ ["depends_x86_64"] = "literal",
+ ["makedepends"] = "literal",
+ ["makedepends_arm"] = "literal",
+ ["makedepends_armv6h"] = "literal",
+ ["makedepends_armv7h"] = "literal",
+ ["makedepends_aarch64"] = "literal",
+ ["makedepends_i686"] = "literal",
+ ["makedepends_x86_64"] = "literal",
+ ["checkdepends"] = "literal",
+ ["checkdepends_arm"] = "literal",
+ ["checkdepends_armv6h"] = "literal",
+ ["checkdepends_armv7h"] = "literal",
+ ["checkdepends_aarch64"] = "literal",
+ ["checkdepends_i686"] = "literal",
+ ["checkdepends_x86_64"] = "literal",
+ ["optdepends"] = "literal",
+ ["optdepends_arm"] = "literal",
+ ["optdepends_armv6h"] = "literal",
+ ["optdepends_armv7h"] = "literal",
+ ["optdepends_aarch64"] = "literal",
+ ["optdepends_i686"] = "literal",
+ ["optdepends_x86_64"] = "literal",
+ ["provides"] = "literal",
+ ["provides_arm"] = "literal",
+ ["provides_armv6h"] = "literal",
+ ["provides_armv7h"] = "literal",
+ ["provides_aarch64"] = "literal",
+ ["provides_i686"] = "literal",
+ ["provides_x86_64"] = "literal",
+ ["conflicts"] = "literal",
+ ["conflicts_arm"] = "literal",
+ ["conflicts_armv6h"] = "literal",
+ ["conflicts_armv7h"] = "literal",
+ ["conflicts_aarch64"] = "literal",
+ ["conflicts_i686"] = "literal",
+ ["conflicts_x86_64"] = "literal",
+ ["replaces"] = "literal",
+ ["replaces_arm"] = "literal",
+ ["replaces_armv6h"] = "literal",
+ ["replaces_armv7h"] = "literal",
+ ["replaces_aarch64"] = "literal",
+ ["replaces_i686"] = "literal",
+ ["replaces_x86_64"] = "literal",
+ ["backup"] = "literal",
+ ["options"] = "literal",
+ ["changelog"] = "literal",
+ ["source_arm"] = "literal",
+ ["source_armv6h"] = "literal",
+ ["source_armv7h"] = "literal",
+ ["source_aarch64"] = "literal",
+ ["source_i686"] = "literal",
+ ["source_x86_64"] = "literal",
+ ["noextract"] = "literal",
+ ["validpgpkeys"] = "literal",
+ ["md5sums"] = "literal",
+ ["md5sums_arm"] = "literal",
+ ["md5sums_armv6h"] = "literal",
+ ["md5sums_armv7h"] = "literal",
+ ["md5sums_aarch64"] = "literal",
+ ["md5sums_i686"] = "literal",
+ ["md5sums_x86_64"] = "literal",
+ ["sha1sums"] = "literal",
+ ["sha1sums_arm"] = "literal",
+ ["sha1sums_armv6h"] = "literal",
+ ["sha1sums_armv7h"] = "literal",
+ ["sha1sums_aarch64"] = "literal",
+ ["sha1sums_i686"] = "literal",
+ ["sha1sums_x86_64"] = "literal",
+ ["sha256sums"] = "literal",
+ ["sha256sums_arm"] = "literal",
+ ["sha256sums_armv6h"] = "literal",
+ ["sha256sums_armv7h"] = "literal",
+ ["sha256sums_aarch64"] = "literal",
+ ["sha256sums_i686"] = "literal",
+ ["sha256sums_x86_64"] = "literal",
+ ["sha224sums"] = "literal",
+ ["sha224sums_arm"] = "literal",
+ ["sha224sums_armv6h"] = "literal",
+ ["sha224sums_armv7h"] = "literal",
+ ["sha224sums_aarch64"] = "literal",
+ ["sha224sums_i686"] = "literal",
+ ["sha224sums_x86_64"] = "literal",
+ ["sha384sums"] = "literal",
+ ["sha384sums_arm"] = "literal",
+ ["sha384sums_armv6h"] = "literal",
+ ["sha384sums_armv7h"] = "literal",
+ ["sha384sums_aarch64"] = "literal",
+ ["sha384sums_i686"] = "literal",
+ ["sha384sums_x86_64"] = "literal",
+ ["sha512sums"] = "literal",
+ ["sha512sums_arm"] = "literal",
+ ["sha512sums_armv6h"] = "literal",
+ ["sha512sums_armv7h"] = "literal",
+ ["sha512sums_aarch64"] = "literal",
+ ["sha512sums_i686"] = "literal",
+ ["sha512sums_x86_64"] = "literal",
+ ["b2sums"] = "literal",
+ ["b2sums_arm"] = "literal",
+ ["b2sums_armv6h"] = "literal",
+ ["b2sums_armv7h"] = "literal",
+ ["b2sums_aarch64"] = "literal",
+ ["b2sums_i686"] = "literal",
+ ["b2sums_x86_64"] = "literal",
},
}